perform cache restore #18
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: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
| CMAKE_C_COMPILER_LAUNCHER: ccache | |
| CC: /usr/lib/ccache/clang-20 | |
| CXX: /usr/lib/ccache/clang++-20 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Clang | |
| run: cd /tmp; | |
| wget https://apt.llvm.org/llvm.sh; | |
| chmod +x llvm.sh; | |
| sudo ./llvm.sh 20 | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| create-symlink: true | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: '4.1.x' | |
| - name: Install Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Conan | |
| uses: conan-io/setup-conan@v1 | |
| with: | |
| cache_packages: true | |
| - name: Try and restore Conan cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| conan_cache_save.tgz | |
| key: ${{ runner.os }}-conan-cache | |
| - name: Perform Conan restore | |
| run: conan cache restore conan_cache_save.tgz | |
| continue-on-error: true # when it hasn't been found | |
| - name: Setup Conan profile | |
| run: conan profile detect --force | |
| - name: Install more system deps | |
| run: sudo apt update; sudo apt install --yes clang ninja-build | |
| - name: Build deps | |
| run: just conan | |
| - name: Generate Conan cache | |
| run: conan cache save "*" | |
| - name: Save Conan cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: conan_cache_save.tgz | |
| key: ${{ runner.os }}-conan-cache | |
| - name: Build | |
| run: just build | |
| - name: Archive artefacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: musicvis3d | |
| path: build/musicvis |