diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 444d163..17fdc05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,16 +15,24 @@ jobs: include: - os: "ubuntu-20.04" shell: "bash" + ccache-path: "~/.cache/ccache" - os: "macos-13" shell: "bash" + ccache-path: "/Users/runner/Library/Caches/ccache" - os: "windows-2022" shell: "msys2 {0}" + ccache-path: 'C:\Users\runneradmin\AppData\Local\ccache' defaults: run: shell: ${{ matrix.shell }} steps: - uses: spatial-model-editor/setup-ci@v1 - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: ${{ matrix.ccache-path }} + key: ccache-${{ github.job }}-${{ runner.os }}-${{ github.sha }} + restore-keys: ccache-${{ github.job }}-${{ runner.os }}- - name: Build script run: ./build.sh - uses: actions/upload-artifact@v4 diff --git a/build.sh b/build.sh index d58b216..42844fe 100755 --- a/build.sh +++ b/build.sh @@ -22,6 +22,7 @@ fi # export vars for duneopts script to read export CMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" export CMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} +export CMAKE_CXX_COMPILER_LAUNCHER=ccache # disable gcc 10 pstl TBB backend as it uses the old TBB API export CMAKE_CXX_FLAGS='"-fvisibility=hidden -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 -DNDEBUG"' export BUILD_SHARED_LIBS=OFF