CI: fix caching in coverage build
This commit is contained in:
parent
d22df4e907
commit
1abd339863
|
|
@ -13,7 +13,6 @@ env:
|
||||||
CI_COMMIT: ${{ github.sha }}
|
CI_COMMIT: ${{ github.sha }}
|
||||||
CCACHE_COMPRESS: 1
|
CCACHE_COMPRESS: 1
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
CCACHE_MAXSIZE: 2Gi # 2GiB for clang and gcc, 4GiB in total
|
|
||||||
COVERAGE: 1
|
COVERAGE: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -24,7 +23,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI_BUILD_STAGE_NAME: build
|
CI_BUILD_STAGE_NAME: build
|
||||||
CI_RUNS_ON: ubuntu-20.04
|
CI_RUNS_ON: ubuntu-20.04
|
||||||
CACHE_KEY: ubuntu-20.04-${{ matrix.compiler.cc }}-coverage
|
CACHE_KEY: coverage-build
|
||||||
|
CCACHE_MAXSIZE: 512Mi
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.ccache
|
path: ${{ github.workspace }}/.ccache
|
||||||
key: ${{ env.CACHE_KEY }}-${{ env.cache-name }}-${{ github.sha }}
|
key: ${{ env.CACHE_KEY }}-${{ env.cache-name }}-${{ github.sha }}
|
||||||
restore-keys: coverage-${{ env.cache-name }}
|
restore-keys: ${{ env.CACHE_KEY }}-${{ env.cache-name }}
|
||||||
|
|
||||||
- name: Install packages for build
|
- name: Install packages for build
|
||||||
env:
|
env:
|
||||||
|
|
@ -46,7 +46,9 @@ jobs:
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
ccache -z
|
||||||
./ci/ci-script.bash
|
./ci/ci-script.bash
|
||||||
|
ccache -s
|
||||||
tar cvzf verilator-${CI_COMMIT}-coverage.tgz bin src/obj*/*.o src/obj*/*.gcno
|
tar cvzf verilator-${CI_COMMIT}-coverage.tgz bin src/obj*/*.o src/obj*/*.gcno
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
|
@ -80,7 +82,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI_BUILD_STAGE_NAME: test
|
CI_BUILD_STAGE_NAME: test
|
||||||
CI_RUNS_ON: ubuntu-20.04
|
CI_RUNS_ON: ubuntu-20.04
|
||||||
CACHE_KEY: ubuntu-20.04-${{ matrix.compiler.cc }}-coverage
|
CACHE_KEY: coverage-test-${{ matrix.test }}${{ matrix.num }}
|
||||||
|
CCACHE_MAXSIZE: 512Mi # Per build matrix entry
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -93,7 +96,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.ccache
|
path: ${{ github.workspace }}/.ccache
|
||||||
key: ${{ env.CACHE_KEY }}-${{ env.cache-name }}-${{ github.sha }}
|
key: ${{ env.CACHE_KEY }}-${{ env.cache-name }}-${{ github.sha }}
|
||||||
restore-keys: coverage-${{ env.cache-name }}
|
restore-keys: ${{ env.CACHE_KEY }}-${{ env.cache-name }}
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
|
|
||||||
|
|
@ -106,4 +109,7 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
env:
|
env:
|
||||||
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
||||||
run: ./ci/ci-script.bash
|
run: |
|
||||||
|
ccache -z
|
||||||
|
./ci/ci-script.bash
|
||||||
|
ccache -s
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue