File tree Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 8282 *.args.CACHE_ID=${{ matrix.target }}
8383 env :
8484 GIT_BRANCH : ${{ github.head_ref || github.ref_name }}
85+
86+ - name : Retrieve build artifacts
87+ if : ${{ matrix.target == 'vt-build-amd64-ubuntu-22-04-gcc-11-cpp' }}
88+ run : |
89+ # We rely on the persistence of data on cache mounts with identical IDs and builders.
90+ # This allows us to copy build artifacts from the "bake" step and use the Codecov action within the GitHub environment.
91+
92+ echo "
93+ FROM ubuntu:latest
94+ RUN --mount=type=cache,id=BUILD-${{ matrix.target }},target=/build/vt \
95+ mkdir -p /vt \
96+ && cp -p -R /build/vt/. /vt/ || true
97+ " >> tmp_dockerfile
98+
99+ docker buildx build --builder ${{ steps.setup-buildx.outputs.name }} -f tmp_dockerfile --output type=local,dest=build .
100+
101+ - name : Upload coverage
102+ if : ${{ matrix.target == 'vt-build-amd64-ubuntu-22-04-gcc-11-cpp' }}
103+ uses : codecov/codecov-action@v5
104+ with :
105+ files : build/vt/coverage.info
106+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ ARG CACHE_ID=${IMAGE}
4848ENV GIT_BRANCH=${GIT_BRANCH}
4949
5050RUN --mount=type=cache,id=${CACHE_ID},target=/build/ccache \
51+ --mount=type=cache,id=BUILD-${CACHE_ID},target=/build/vt \
5152 --mount=target=/vt,rw \
5253 if [ "${VT_TEST_SPACK}" = "1" ]; then \
5354 apt update -y -q && apt install -y -q libssl-dev unzip && \
Original file line number Diff line number Diff line change @@ -14,17 +14,10 @@ ctest --output-on-failure -L 'unit_test|example' | tee cmake-output.log
1414
1515if test " ${VT_CODE_COVERAGE:- 0} " -eq 1
1616then
17- if [ -z " $CODECOV_TOKEN " ]; then
18- echo " Error: CODECOV_TOKEN is not set"
19- exit 1
20- fi
2117 export CODECOV_TOKEN=" $CODECOV_TOKEN "
2218 lcov --capture --directory . --output-file coverage.info
2319 lcov --remove coverage.info ' /usr/*' --output-file coverage.info
2420 lcov --list coverage.info
25- pushd " $VT "
26- bash <( curl -s https://codecov.io/bash) -r DARMA-tasking/vt -f " ${VT_BUILD} /coverage.info" || echo " Codecov did not collect coverage reports"
27- popd
2821fi
2922
3023if test " ${VT_CI_TEST_LB_SCHEMA:- 0} " -eq 1
You can’t perform that action at this time.
0 commit comments