diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index a5187998..778a799b 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -30,6 +30,10 @@ jobs: with: path: ~/.conan2 key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.build_type }}- + ${{ runner.os }}- - name: Generate Dockerfile run: | mkdir /tmp/osp-builder-docker @@ -75,7 +79,12 @@ jobs: - name: Build cosim run: | docker run --rm --env GITHUB_REF="$GITHUB_REF" -v $(pwd):/mnt/source:ro -v ~/.conan2:${{ env.DOCKER_CONAN_HOME }} -u root osp-builder - + - name: Save cache + id: cache-conan-save + uses: actions/cache/save@v3 + with: + path: ~/.conan2 + key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }} windows: name: Windows @@ -105,6 +114,10 @@ jobs: with: path: ~/.conan2 key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.build_type }}- + ${{ runner.os }}- - name: Install prerequisites run: | pip3 install --upgrade setuptools pip @@ -135,3 +148,9 @@ jobs: . - name: Conan upload run: conan upload --confirm --remote=osp 'libcosim/*' + - name: Save cache + id: cache-conan-save + uses: actions/cache/save@v3 + with: + path: ~/.conan2 + key: ${{ runner.os }}-${{ matrix.build_type }}-${{ env.cache-name }}-${{ hashFiles('**/conan.lock') }}