CI: Upload separate named artifacts, only fetch ones that are needed
This commit is contained in:
parent
02835f199b
commit
2d2bd5b95e
|
|
@ -58,6 +58,7 @@ jobs:
|
||||||
CXX: ${{ matrix.compiler.cxx }}
|
CXX: ${{ matrix.compiler.cxx }}
|
||||||
CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.debug }}
|
CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.debug }}
|
||||||
CCACHE_MAXSIZE: 128Mi # Per build matrix entry (1Gi in total)
|
CCACHE_MAXSIZE: 128Mi # Per build matrix entry (1Gi in total)
|
||||||
|
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.debug }}.tar.gz
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -81,11 +82,13 @@ jobs:
|
||||||
ccache -z
|
ccache -z
|
||||||
./ci/ci-script.bash
|
./ci/ci-script.bash
|
||||||
ccache -s
|
ccache -s
|
||||||
tar cvzf verilator-${{ matrix.os}}-${CI_COMMIT}-${{ matrix.compiler.cc }}-${{ matrix.debug }}.tgz ./bin
|
tar cvzf ${{ env.VERILATOR_ARCHIVE }} bin
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- name: Upload Verilator artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: verilator-${{ matrix.os}}-${{ env.CI_COMMIT }}-${{ matrix.compiler.cc }}-${{ matrix.debug }}.tgz
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
path: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
|
||||||
|
|
||||||
Test:
|
Test:
|
||||||
|
|
@ -112,6 +115,7 @@ jobs:
|
||||||
CXX: ${{ matrix.compiler.cxx }}
|
CXX: ${{ matrix.compiler.cxx }}
|
||||||
CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.suite }}
|
CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.suite }}
|
||||||
CCACHE_MAXSIZE: 32Mi # Per build matrix entry (960Mi in total)
|
CCACHE_MAXSIZE: 32Mi # Per build matrix entry (960Mi in total)
|
||||||
|
VERILATOR_ARCHIVE_BASE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -127,13 +131,23 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ env.CACHE_KEY }}-
|
${{ env.CACHE_KEY }}-
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- name: Download Verilator artifact (opt)
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE_BASE }}-opt.tar.gz
|
||||||
|
|
||||||
- name: Install Verilator and test dependencies
|
- name: Download Verilator artifact (dbg)
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE_BASE }}-dbg.tar.gz
|
||||||
|
|
||||||
|
- name: Unpack Verilator artifacts
|
||||||
|
run: |
|
||||||
|
tar xvzf ${{ env.VERILATOR_ARCHIVE_BASE }}-opt.tar.gz
|
||||||
|
tar xvzf ${{ env.VERILATOR_ARCHIVE_BASE }}-dbg.tar.gz
|
||||||
|
|
||||||
|
- name: Install test dependencies
|
||||||
run: |
|
run: |
|
||||||
tar xvzf artifact/verilator-${{ matrix.os}}-${CI_COMMIT}-${{ matrix.compiler.cc }}-opt.tgz
|
|
||||||
tar xvzf artifact/verilator-${{ matrix.os}}-${CI_COMMIT}-${{ matrix.compiler.cc }}-dbg.tgz
|
|
||||||
rm -rf artifact
|
|
||||||
./ci/ci-install.bash
|
./ci/ci-install.bash
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ env:
|
||||||
CI_OS_NAME: linux
|
CI_OS_NAME: linux
|
||||||
CI_COMMIT: ${{ github.sha }}
|
CI_COMMIT: ${{ github.sha }}
|
||||||
COVERAGE: 1
|
COVERAGE: 1
|
||||||
|
VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
@ -34,11 +35,13 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./ci/ci-script.bash
|
./ci/ci-script.bash
|
||||||
tar cvzf verilator-${CI_COMMIT}-coverage.tgz bin src/obj*/*.o src/obj*/*.gcno
|
tar cvzf ${{ env.VERILATOR_ARCHIVE }} bin src/obj*/*.o src/obj*/*.gcno
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- name: Upload Verilator artifact
|
||||||
with:
|
uses: actions/upload-artifact@v2
|
||||||
path: verilator-${{ env.CI_COMMIT }}-coverage.tgz
|
with:
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
path: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
|
||||||
|
|
||||||
Test:
|
Test:
|
||||||
|
|
@ -72,12 +75,18 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- name: Download Verilator artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
|
||||||
- name: Install Verilator and test dependencies
|
- name: Unapack Verilator artifact
|
||||||
run: |
|
run: |
|
||||||
tar xvzf artifact/verilator-${CI_COMMIT}-coverage.tgz
|
tar xvzf ${{ env.VERILATOR_ARCHIVE }}
|
||||||
touch src/obj*/*.o src/obj*/*.gcno
|
touch src/obj*/*.o src/obj*/*.gcno
|
||||||
|
|
||||||
|
- name: Install test dependencies
|
||||||
|
run: |
|
||||||
./ci/ci-install.bash
|
./ci/ci-install.bash
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue