name: Build on: [push, pull_request] jobs: build: name: Build on ${{ matrix.os }} runs-on: ${{ matrix.os }} env: BUILD_TOOLS_PATH: C:\apps\build-tools\ strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - run: echo $env:BUILD_TOOLS_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append if: startsWith(matrix.os, 'windows') - uses: actions/checkout@v4 - name: Cache conan uses: actions/cache@v4 with: key: conan-${{ matrix.os }}-${{ hashFiles('conanfile.txt') }} path: ~/.conan2/ - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1 - name: Install dependencies (Ubuntu) if: startsWith(matrix.os, 'ubuntu') run: | curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash sudo apt-get update sudo apt-get -y install ninja-build conan profile detect --force echo "tools.system.package_manager:mode = install" > ~/.conan2/global.conf echo "tools.system.package_manager:sudo = True" >> ~/.conan2/global.conf - name: Install dependencies (Windows) if: startsWith(matrix.os, 'windows') shell: cmd run: git clone https://git.anotherfoxguy.com/AnotherFoxGuy/build-tools.git %BUILD_TOOLS_PATH% - name: Install dependencies if: startsWith(matrix.os, 'macos') run: brew install conan ninja - name: Configure run: | cmake . -GNinja -DCMAKE_BUILD_TYPE=Release -Bbuild -DBUILD_TEST=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake" - name: Build run: | cd build ninja - name: Test run: | cd build ctest --output-on-failure - name: Clean Conan pkgs run: conan cache clean "*" -sbd