@@ -35,11 +35,30 @@ jobs:
3535 #
3636 # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
3737 matrix :
38- os : [ubuntu-latest, ubuntu-24.04-arm] # windows-latest
39- build_type : [Release]
40- compiler :
41- - { c: gcc, cpp: g++ }
42- - { c: clang, cpp: clang++ }
38+ include :
39+ # --- Linux x64 ---
40+ # We define 'compiler' as a dictionary (object) here
41+ - os : ubuntu-latest
42+ build_type : Release
43+ compiler : { c: gcc, cpp: g++ }
44+
45+ - os : ubuntu-latest
46+ build_type : Release
47+ compiler : { c: clang, cpp: clang++ }
48+
49+ # --- Linux ARM ---
50+ - os : ubuntu-24.04-arm
51+ build_type : Release
52+ compiler : { c: gcc, cpp: g++ }
53+
54+ - os : ubuntu-24.04-arm
55+ build_type : Release
56+ compiler : { c: clang, cpp: clang++ }
57+
58+ # --- Windows ---
59+ - os : windows-latest
60+ build_type : Release
61+ compiler : { c: cl, cpp: cl }
4362
4463 steps :
4564 - uses : actions/checkout@v6
5675 run : |
5776 sudo apt-get install --yes -qq libboost-all-dev
5877
78+ - name : Install Boost via vcpkg (Windows)
79+ if : startsWith(matrix.os, 'windows')
80+ run : |
81+ # 1. Install Boost using the Microsoft Package Manager
82+ # windows-latest has vcpkg pre-installed at C:\vcpkg
83+ vcpkg install boost-test:x64-windows
84+
85+ # 2. Inform CMake where to find it
86+ echo "BOOST_ROOT=$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows" >> $env:GITHUB_ENV
87+
88+ # 3. Add vcpkg DLL path to CI before running tests
89+ echo "$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" >> $env:GITHUB_PATH
90+
5991 - name : Configure CMake Ubuntu
6092 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
6193 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
@@ -69,6 +101,15 @@ jobs:
69101 -DATOMIC_QUEUE_BUILD_EXAMPLES=ON
70102 -S ${{ github.workspace }}
71103
104+ - name : Configure CMake Windows - MSVC
105+ if : startsWith(matrix.os, 'windows') && matrix.compiler.cpp == 'cl'
106+ run : >
107+ cmake -B ${{ steps.strings.outputs.build-output-dir }}
108+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
109+ -DATOMIC_QUEUE_BUILD_TESTS=ON
110+ -DATOMIC_QUEUE_BUILD_EXAMPLES=ON
111+ -S ${{ github.workspace }}
112+
72113 - name : Build
73114 # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
74115 run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
0 commit comments