Initial #11
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: ${{ matrix.platform.name }} | |
| runs-on: ${{ matrix.platform.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - { name: Windows MSVC 2022, os: windows-2022, compiler: msvc,flags: "" } | |
| - { name: Windows Clang 19, os: windows-latest, compiler: clang, version: 19.1.0, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| - { name: Windows Clang 20, os: windows-latest, compiler: clang, version: 20.1.0, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| - { name: MacOS Clang Latest, os: macos-latest, compiler: clang, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| - { name: Ubuntu GCC 11, os: ubuntu-latest, compiler: gcc, version: 11, flags: "-DCMAKE_CXX_COMPILER=g++" } | |
| - { name: Ubuntu GCC 12, os: ubuntu-latest, compiler: gcc, version: 12, flags: "-DCMAKE_CXX_COMPILER=g++" } | |
| - { name: Ubuntu GCC 13, os: ubuntu-latest, compiler: gcc, version: 13, flags: "-DCMAKE_CXX_COMPILER=g++" } | |
| - { name: Ubuntu GCC 14, os: ubuntu-latest, compiler: gcc, version: 14, flags: "-DCMAKE_CXX_COMPILER=g++" } | |
| # Sadly cannot install | |
| #- { name: Ubuntu GCC 15, os: ubuntu-latest, compiler: gcc, version: 15, flags: "-DCMAKE_CXX_COMPILER=g++" } | |
| - { name: Ubuntu Clang 18, os: ubuntu-latest, compiler: clang, version: 18, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| - { name: Ubuntu Clang 19, os: ubuntu-latest, compiler: clang, version: 19, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| - { name: Ubuntu Clang 20, os: ubuntu-latest, compiler: clang, version: 20, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| - { name: Ubuntu Clang 21, os: ubuntu-latest, compiler: clang, version: 21, flags: "-DCMAKE_CXX_COMPILER=clang++" } | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Install CMake and Ninja | |
| uses: lukka/get-cmake@latest | |
| - name: Setup MSVC Dev Command Prompt | |
| if: runner.os == 'Windows' && matrix.platform.compiler == 'msvc' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Setup Clang (Windows) | |
| if: runner.os == 'Windows' && matrix.platform.compiler == 'clang' | |
| run: | | |
| choco install -y llvm --version=${{ matrix.platform.version }} --force | |
| echo "C:\\Program Files\\LLVM\\bin" >> $GITHUB_PATH | |
| - name: Setup Clang (Linux) | |
| if: runner.os == 'Linux' && matrix.platform.compiler == 'clang' | |
| uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: llvm-${{matrix.platform.version}} | |
| - name: Setup GCC | |
| if: matrix.platform.compiler == 'gcc' | |
| uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: gcc-${{matrix.platform.version}} | |
| - name: Configure CMake (Debug) | |
| run: > | |
| cmake -B build | |
| -G Ninja | |
| ${{ matrix.platform.flags }} | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DLAHZAM_BUILD_TESTS=ON | |
| - name: Build (Debug) | |
| run: cmake --build build | |
| - name: Run Tests (Debug) | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Clean Build Directory | |
| run: "rm -rf build" | |
| shell: bash | |
| - name: Configure CMake (Release) | |
| run: > | |
| cmake -B build | |
| -G Ninja | |
| ${{ matrix.platform.flags }} | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DLAHZAM_BUILD_TESTS=ON | |
| - name: Build (Release) | |
| run: cmake --build build | |
| - name: Run Tests (Release) | |
| run: ctest --test-dir build --output-on-failure |