Build #177
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: | |
| # schedule: | |
| # - cron: '33 8 * * *' | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| Windows-MSVC: | |
| name: ${{ matrix.icon }} windows (${{matrix.platform}}, ${{matrix.compiler}}-${{matrix.compiler-ver}}, ${{matrix.build-type}}) | |
| runs-on: ${{matrix.runs-on}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [windows-2025, windows-11-arm] | |
| sys: [windows] | |
| icon: ['⬜'] | |
| buildenv: [VS2022] | |
| compiler: ["MSVC"] | |
| mode: ["cxx23"] | |
| build-type: ["Release", "Debug"] | |
| target : ["all"] | |
| cmake-override: [""] | |
| include: | |
| - compiler: "MSVC" | |
| compiler-ver: "19" | |
| - runs-on: windows-2025 | |
| platform: "x86_64" | |
| - runs-on: windows-11-arm | |
| platform: "arm64" | |
| steps: | |
| - name: '🧰 Checkout' | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - uses: TheMrMilchmann/setup-msvc-dev@v3 | |
| with: | |
| arch: ${{matrix.platform}} | |
| - name: Configure git credentials | |
| run: | | |
| git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" | | |
| git lfs install | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 'Configure' | |
| run: cmake --preset ${{matrix.compiler}}_${{matrix.build-type}} ${{matrix.cmake-override}} | |
| - name: '🚧 Build' | |
| run: cmake --build build --target ${{matrix.target}} | |
| # Based on https://github.com/msys2/setup-msys2/blob/main/examples/cmake.yml | |
| Windows-MSYS: | |
| name: ${{ matrix.icon }} windows (${{matrix.platform}}, ${{matrix.msystem}}, ${{matrix.compiler}}-${{matrix.compiler-ver}}, ${{matrix.build-type}}) | |
| runs-on: ${{matrix.runs-on}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: ["windows-2025"] | |
| sys: [windows] | |
| icon: ["🟦"] | |
| buildenv: [msys2] | |
| msystem: [ucrt64, clang64] | |
| build-type: [Release, Debug] | |
| compiler: [gcc, clang] | |
| platform: ["x86_64"] | |
| target: ["all"] | |
| cmake-override: [""] | |
| include: | |
| - msystem: ucrt64 | |
| compiler: gcc | |
| compiler-ver: 15 | |
| add-to-pacboy: "" | |
| - msystem: ucrt64 | |
| compiler: clang | |
| compiler-ver: 21 | |
| add-to-pacboy: "clang:p" | |
| - msystem: clang64 | |
| compiler: clang | |
| compiler-ver: 21 | |
| add-to-pacboy: "" | |
| exclude: | |
| - msystem: clang64 | |
| compiler: gcc | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: "🧰 Checkout" | |
| uses: actions/checkout@v4 | |
| - name: "${{ matrix.icon }} Setup MSYS2" | |
| uses: msys2/setup-msys2@v2.27.0 | |
| with: | |
| msystem: ${{matrix.msystem}} | |
| update: true | |
| install: >- | |
| git | |
| make | |
| pacboy: >- | |
| toolchain:p | |
| ${{matrix.add-to-pacboy}} | |
| cmake:p | |
| ninja:p | |
| - name: "Configure" | |
| run: cmake --preset ${{matrix.compiler}}_${{matrix.build-type}} ${{matrix.cmake-override}} | |
| - name: "🚧 Build" | |
| run: cmake --build build --target ${{matrix.target}} | |
| # Based on https://github.com/tcbrindle/flux/blob/main/.github/workflows/linux.yml | |
| Linux-Ubuntu: | |
| name: ${{ matrix.icon }} linux (${{matrix.platform}}, ${{matrix.compiler}}-${{matrix.compiler-ver}}, ${{matrix.build-type}}) | |
| runs-on: ${{matrix.runs-on}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| icon: ["🟧"] | |
| sys: [linux] | |
| runs-on: [ubuntu-24.04, ubuntu-24.04-arm] | |
| compiler: [gcc] | |
| # compiler-ver: [15, 21] | |
| build-type: [Release, Debug] | |
| target: ["all"] | |
| cmake-override: [""] | |
| include: | |
| - runs-on: ubuntu-24.04 | |
| platform: "x86_64" | |
| - runs-on: ubuntu-24.04-arm | |
| platform: "arm64" | |
| - compiler: "gcc" | |
| compiler-setupname: "gcc" | |
| compiler-ver: "14" | |
| # install: | | |
| # sudo apt install gcc-14 g++-14 | |
| # sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 --slave /usr/bin/g++ g++ /usr/bin/g++-14 --slave /usr/bin/gcov gcov /usr/bin/gcov-14 | |
| # sudo update-alternatives --set gcc /usr/bin/gcc-14 | |
| # - compiler: "clang" | |
| # compiler-setupname: "llvm" | |
| # compiler-ver: "21" | |
| steps: | |
| - name: "🧰 Checkout" | |
| uses: actions/checkout@v4 | |
| - name: Setup Cpp | |
| uses: aminya/setup-cpp@v1 | |
| with: | |
| setup-cpp: true | |
| compiler: ${{matrix.compiler-setupname}}-${{matrix.compiler-ver}} | |
| # - name: Create Build Environment | |
| # run: | | |
| # {{matrix.install}} | |
| - name: Configure | |
| run: | | |
| cmake --preset ${{matrix.compiler}}_${{matrix.build-type}} ${{matrix.cmake-override}} | |
| - name: "🚧 Build" | |
| run: cmake --build build --target ${{matrix.target}} | |
| macOS: | |
| name: ${{ matrix.icon }} macos (${{matrix.platform}}, ${{matrix.compiler}}-${{matrix.compiler-ver}}, ${{matrix.build-type}}) | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| icon: ["⬛"] | |
| sys: [macos] | |
| runs-on: [macos-15, macos-15-intel] | |
| compiler: ["gcc", "clang"] | |
| build-type: ["Release", "Debug"] | |
| target: ["all"] | |
| include: | |
| - runs-on: macos-15 | |
| platform: "arm64" | |
| - runs-on: macos-15-intel | |
| platform: "x86_64" | |
| - compiler: "gcc" | |
| compiler-setupname: "gcc" | |
| compiler-ver: "15" | |
| cmake-override: "-DCMAKE_C_COMPILER=gcc-15 -DCMAKE_CXX_COMPILER=g++-15" | |
| - compiler: "clang" | |
| compiler-setupname: "llvm" | |
| compiler-ver: "21" | |
| cmake-override: "-DCMAKE_C_COMPILER=clang \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_CXX_FLAGS=\"-stdlib=libc++ -I$(brew --prefix llvm)/include/c++/v1\" \ | |
| -DCMAKE_EXE_LINKER_FLAGS=\"-stdlib=libc++ -L$(brew --prefix llvm)/lib/c++\"" | |
| steps: | |
| - name: "🧰 Checkout" | |
| uses: actions/checkout@v4 | |
| - name: Setup Cpp | |
| uses: aminya/setup-cpp@v1 | |
| with: | |
| setup-cpp: true | |
| compiler: ${{matrix.compiler-setupname}}-${{matrix.compiler-ver}} | |
| - name: Configure | |
| run: | | |
| cmake --preset ${{matrix.compiler}}_${{matrix.build-type}} ${{matrix.cmake-override}} | |
| - name: "🚧 Build" | |
| run: cmake --build build --target ${{matrix.target}} |