Skip to content

Commit 7da6671

Browse files
ci: add windows minimal compilation test
1 parent 8219fe6 commit 7da6671

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,55 @@ jobs:
111111
with:
112112
run: bazel run //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }}
113113
token: ${{ secrets.CODSPEED_TOKEN }}
114+
115+
windows-cmake-build:
116+
strategy:
117+
matrix:
118+
codspeed-mode: ["off", "walltime"]
119+
runs-on: windows-latest
120+
steps:
121+
- name: Checkout code
122+
uses: actions/checkout@v3
123+
124+
- name: Cache build
125+
uses: actions/cache@v3
126+
with:
127+
path: examples/google_benchmark_cmake/build
128+
key: ${{ runner.os }}-build-${{ matrix.codspeed-mode }}-${{ hashFiles('**/CMakeLists.txt') }}
129+
130+
- name: Create build directory
131+
run: |
132+
if (-not (Test-Path examples\google_benchmark_cmake\build)) {
133+
mkdir examples\google_benchmark_cmake\build
134+
}
135+
shell: pwsh
136+
137+
- name: Build benchmark example
138+
run: |
139+
cd examples\google_benchmark_cmake\build
140+
cmake -DCODSPEED_MODE=${{ matrix.codspeed-mode }} ..
141+
cmake --build . --config Release
142+
shell: pwsh
143+
144+
windows-bazel-build:
145+
strategy:
146+
matrix:
147+
codspeed-mode: ["off", "walltime"]
148+
runs-on: windows-latest
149+
steps:
150+
- uses: actions/checkout@v4
151+
152+
- name: Set up Bazel
153+
uses: bazel-contrib/[email protected]
154+
with:
155+
# Avoid downloading Bazel every time.
156+
bazelisk-cache: true
157+
# Store build cache per workflow.
158+
disk-cache: ${{ github.workflow }}
159+
# Share repository cache between workflows.
160+
repository-cache: true
161+
162+
- name: Build benchmark example
163+
run: |
164+
bazel build //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }}
165+
shell: pwsh

0 commit comments

Comments
 (0)