build.yml - use windows-2022 image for VS2022 #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ master, dev ] | |
| workflow_dispatch: | |
| permissions: | |
| statuses: write | |
| contents: read | |
| jobs: | |
| build-linux-clang: | |
| name: Linux, Clang | |
| runs-on: ubuntu-latest | |
| env: | |
| CC: clang | |
| CXX: clang++ | |
| CFLAGS: -Werror | |
| CXXFLAGS: -Werror | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Configure static library | |
| run: cmake -S . -B build-static -D ENKITS_SANITIZE=ON | |
| - name: Build static library | |
| run: cmake --build build-static --parallel | |
| - name: Test static library | |
| run: ./build-static/TestAll | |
| - name: Configure shared library | |
| run: cmake -S . -B build-shared -D ENKITS_BUILD_SHARED=ON | |
| - name: Build shared library | |
| run: cmake --build build-shared --parallel | |
| - name: Test shared library | |
| run: ./build-shared/TestAll | |
| build-linux-gcc: | |
| name: Linux, gcc | |
| runs-on: ubuntu-latest | |
| env: | |
| CC: gcc | |
| CXX: g++ | |
| CFLAGS: -Werror | |
| CXXFLAGS: -Werror | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Configure static library | |
| run: cmake -S . -B build-static -D ENKITS_SANITIZE=ON | |
| - name: Build static library | |
| run: cmake --build build-static --parallel | |
| - name: Test static library | |
| run: ./build-static/TestAll | |
| - name: Configure shared library | |
| run: cmake -S . -B build-shared -D ENKITS_BUILD_SHARED=ON | |
| - name: Build shared library | |
| run: cmake --build build-shared --parallel | |
| - name: Test shared library | |
| run: ./build-shared/TestAll | |
| build-ubuntu-zig: | |
| name: Linux, zig | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.15.1 | |
| - name: Build static library and priorities | |
| run: zig build -Dbuild_examples=true -Dshared=false -Dtask_priorities=4 | |
| - name: Test static library | |
| run: ./zig-out/bin/TestAll | |
| - name: Build shared library | |
| run: zig build -Dbuild_examples=true -Dshared=true | |
| - name: Test shared library | |
| run: ./zig-out/bin/TestAll | |
| build-macos-cocoa-clang: | |
| name: Cocoa (macOS, Clang) | |
| runs-on: macos-latest | |
| env: | |
| CFLAGS: -Werror | |
| CXXFLAGS: -Werror | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Configure static library | |
| run: cmake -S . -B build-static -D ENKITS_SANITIZE=ON | |
| - name: Build static library | |
| run: cmake --build build-static --parallel | |
| - name: Test static library | |
| run: ./build-static/TestAll | |
| - name: Configure shared library | |
| run: cmake -S . -B build-shared -D ENKITS_BUILD_SHARED=ON | |
| - name: Build shared library | |
| run: cmake --build build-shared --parallel | |
| - name: Test shared library | |
| run: ./build-shared/TestAll | |
| build-windows-win32-vs2022: | |
| name: Win32 (Windows, VS2022) | |
| runs-on: windows-2022 | |
| env: | |
| CFLAGS: /WX | |
| CXXFLAGS: /WX | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup MSVC dev command prompt | |
| uses: TheMrMilchmann/setup-msvc-dev@v3 | |
| with: | |
| arch: x64 | |
| - name: Configure static library | |
| run: cmake -S . -B build-static -G "Visual Studio 17 2022" -D ENKITS_SANITIZE=ON | |
| - name: Build static library | |
| run: cmake --build build-static --parallel | |
| - name: Test static library | |
| run: .\build-static\Debug\TestAll.exe | |
| - name: Configure shared library | |
| run: cmake -S . -B build-shared -G "Visual Studio 17 2022" -D ENKITS_BUILD_SHARED=ON | |
| - name: Build shared library | |
| run: cmake --build build-shared --parallel | |
| - name: Test shared library | |
| run: .\build-shared\Debug\TestAll.exe | |
| build-windows-win32-zig: | |
| name: Win32 (Windows, zig) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.15.1 | |
| - name: Build static library and priorities | |
| run: zig build -Dbuild_examples=true -Dshared=false -Dtask_priorities=4 | |
| - name: Test static library | |
| run: .\zig-out\bin\TestAll.exe | |
| - name: Build shared library | |
| run: zig build -Dbuild_examples=true -Dshared=true | |
| - name: Test shared library | |
| run: .\zig-out\bin\TestAll.exe |