Skip to content

Commit 900d0c8

Browse files
committed
ci: Add GHA workflow with native Windows job
1 parent 75f06ee commit 900d0c8

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
10+
concurrency:
11+
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
windows-native:
16+
name: ${{ matrix.configuration.job_name }}
17+
# See: https://github.com/actions/runner-images#available-images.
18+
runs-on: windows-2025
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
configuration:
24+
- job_name: 'x64 (MSVC): Windows (VS 2022)'
25+
build_configuration: 'Release'
26+
- job_name: 'x64 (MSVC): Windows (VS 2022, fields=32)'
27+
cmake_options: '-DMINISKETCH_FIELDS=32'
28+
build_configuration: 'Release'
29+
- job_name: 'x64 (MSVC): Windows (VS 2022, debug)'
30+
build_configuration: 'Debug'
31+
# TODO: Resolve the issue and re-enable benchmark.
32+
skip_benchmark: true
33+
- job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
34+
cmake_options: '-DBUILD_SHARED_LIBS=ON'
35+
build_configuration: 'Release'
36+
- job_name: 'x64 (clang-cl): Windows (VS 2022)'
37+
cmake_options: '-T ClangCL'
38+
build_configuration: 'Release'
39+
# TODO: Resolve the issue and re-enable benchmark.
40+
skip_benchmark: true
41+
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Generate buildsystem
47+
env:
48+
CXXFLAGS: '/WX'
49+
run: cmake -B build -DMINISKETCH_BUILD_BENCHMARK=ON ${{ matrix.configuration.cmake_options }}
50+
51+
- name: Build
52+
run: cmake --build build --config ${{ matrix.configuration.build_configuration }}
53+
54+
- name: Binaries info
55+
shell: bash
56+
run: |
57+
cd build/bin/${{ matrix.configuration.build_configuration }}
58+
file * | grep "\.exe\|\.dll"
59+
60+
- name: Check
61+
working-directory: build
62+
run: ctest --output-on-failure -j $env:NUMBER_OF_PROCESSORS -C ${{ matrix.configuration.build_configuration }}
63+
64+
- name: Benchmark
65+
if: ${{ ! matrix.configuration.skip_benchmark }}
66+
working-directory: build
67+
run: bin\${{ matrix.configuration.build_configuration }}\bench.exe

0 commit comments

Comments
 (0)