diff --git a/.github/actions/cache-build-dir/action.yml b/.github/actions/cache-build-dir/action.yml new file mode 100644 index 0000000..55ebf1d --- /dev/null +++ b/.github/actions/cache-build-dir/action.yml @@ -0,0 +1,28 @@ +name: 'Cache Build' +description: 'Cache build paths' +inputs: + key: + description: 'Cache key' + required: true +runs: + using: 'composite' + steps: + - name: Cache Boost artifact + id: cache-boost + uses: actions/cache@v4 + with: + path: cmake/vendor/boost-1.85.0-cmake.tar.xz + key: ${{ runner.os }}-boost-1.85.0 + - name: Retrieve boost cache + shell: bash + if: steps.cache-boost.outputs.cache-hit != 'true' + run: echo "boost cache is not found locally" + + - name: Cache build artifacts + uses: actions/cache@v4 + with: + path: | + ${GITHUB_WORKSPACE}/ronan/build/_deps + key: ${{ inputs.key }} + restore-keys: | + ${{ inputs.key }} \ No newline at end of file diff --git a/.github/workflows/automate_build_of_repo.yml b/.github/workflows/automate_build_of_repo.yml index 24665ff..a6f0798 100644 --- a/.github/workflows/automate_build_of_repo.yml +++ b/.github/workflows/automate_build_of_repo.yml @@ -54,17 +54,11 @@ jobs: token: ${{ secrets.ACCESS_TOKEN }} ref: 'master' path: ronan - - name: Cache Boost artifact - id: cache-boost - uses: actions/cache@v4 + - name: Cache Cmake packages + uses: ./.github/actions/cache-build-dir with: - path: ronan/cmake/vendor/boost-1.85.0-cmake.tar.xz - key: ${{ runner.os }}-boost-1.85.0 - - - name: Retrieve boost cache - if: steps.cache-boost.outputs.cache-hit != 'true' - run: echo "boost cache is not found locally" - + key: ${{ runner.os }}-cmake-${{ hashFiles('**/*.cmake*', '**/CMakeLists.txt') }} + - name: Install LLVM and Clang on linux if: startsWith(matrix.target.id, 'linux-') uses: KyleMayes/install-llvm-action@v2 @@ -186,21 +180,26 @@ jobs: token: ${{ secrets.ACCESS_TOKEN }} ref: 'master' path: ronan - - name: Cache Boost artifact - id: cache-boost - uses: actions/cache@v4 - with: - path: ronan/cmake/vendor/boost-1.85.0-cmake.tar.xz - key: ${{ runner.os }}-boost-1.85.0 - - name: Retrieve boost cache - if: steps.cache-boost.outputs.cache-hit != 'true' - run: echo "boost cache is not found locally" + - name: install dependency on debian shell: bash run: | apt update apt install -y sudo ninja-build git unzip build-essential tree checkinstall zlib1g-dev libtbb-dev wget - + + - name: show layouts + shell: bash + run: | + tree -L 3 .github + ls -alSh .github/actions + ls -alSh .github/actions/cache-build-dir + ls -alSh .github/actions + + - name: Cache Cmake packages + uses: ./.github/actions/cache-build-dir + with: + key: ${{ runner.os }}-cmake-${{ hashFiles('**/*.cmake*', '**/CMakeLists.txt') }} + - name: install latest version of cmake shell: bash # if: matrix.container == 'silkeh/clang:17-bookworm' || matrix.container == 'ubuntu:24.04'