Skip to content

Commit

Permalink
Merge branch 'more-tee' into install-qt-action-4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Dec 22, 2024
2 parents ed8ca2c + 5c65691 commit 60df33a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ jobs:
PROJECT_BUILD_ID: "${{ github.run_number }}.${{ matrix.os }}.${{ steps.arch.outputs.buildId }}.\
${{ matrix.cc }}.qt-${{ matrix.qt }}"
run: |
# With coverage instrumentation.
# With coverage instrumentation (except macOS 13's llvm-lcov version does not support the --sources option)
[[ '${{ matrix.os }}' == 'macos-13' && '${{ matrix.cc }}' == 'clang' ]] ||
cmake -D CMAKE_BUILD_TYPE=Release \
-D CODECOV_GCOV=/usr/local/bin/gcov-14 \
Expand Down Expand Up @@ -525,8 +525,8 @@ jobs:
if: matrix.arch == 'arm64'
shell: bash
run: |
echo "CMAKE_TOOLCHAIN_FILE=${QT_ROOT_DIR/_64/_arm64/}\lib\cmake\Qt6\qt.toolchain.cmake" >> $GITHUB_ENV
echo "qtHostPath=${QT_ROOT_DIR/_arm64/_64}" >> $GITHUB_ENV
tee -a "${GITHUB_ENV}" <<< "CMAKE_TOOLCHAIN_FILE=${QT_ROOT_DIR/_64/_arm64/}\lib\cmake\Qt6\qt.toolchain.cmake"
tee -a "${GITHUB_ENV}" <<< "qtHostPath=${QT_ROOT_DIR/_arm64/_64}"
- name: Configure MSVC
if: matrix.toolchain == 'msvc'
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -560,7 +560,7 @@ jobs:
id: post-build
shell: bash
run: |
echo "dokitVersion=$(cat "$RUNNER_TEMP/release/version.txt")" | tee -a "$GITHUB_OUTPUT"
tee -a "${GITHUB_OUTPUT}" <<< "dokitVersion=$(cat "$RUNNER_TEMP/release/version.txt")"
{ echo -n 'tap='; [[ '${{ matrix.qt }}' =~ ^5\.1[2-9]|6 ]] && echo true || echo false; } |
tee -a "$GITHUB_OUTPUT"
- name: Install DLL for tests w/ coverage
Expand Down Expand Up @@ -649,14 +649,21 @@ jobs:
collate-test-results:
needs: [ linux, mac, win ]
runs-on: ubuntu-24.04
env:
LCOV_VERSION: 2.2 # Should stay in-step, or ahead of, the Ubuntu, macOS and Windows versions.
steps:
- uses: actions/checkout@v4
- name: Install lcov
run: |
sudo apt-mark hold firefox grub-efi-amd64-signed
sudo apt update
sudo apt upgrade
sudo apt install lcov
sudo apt install libcapture-tiny-perl libdatetime-perl libtimedate-perl libjson-perl libperlio-gzip-perl
curl --location --silent \
"https://github.com/linux-test-project/lcov/releases/download/v${LCOV_VERSION}/lcov-${LCOV_VERSION}.tar.gz"|
tar --extract --gzip --directory "${RUNNER_TEMP}"
"${RUNNER_TEMP}/lcov-${LCOV_VERSION}/bin/lcov" --version
tee -a "${GITHUB_PATH}" <<< "${RUNNER_TEMP}/lcov-${LCOV_VERSION}/bin"
- name: Download test results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -673,9 +680,10 @@ jobs:
# Update source code paths from Windows tracefiles to match Linux, and remove all \r chars from line endings.
sed -i -Ee 's|\r$||' -e 's|\\|/|g' -e 's|^SF:D:/a|SF:/home/runner/work|' artifacts/*.win.*/**/coverage.info
# Combine all tracefiles into one.
tee -a "$HOME/.lcovrc" <<< 'check_data_consistency = 0'
lcov $(find artifacts -name '*.info' -type f -printf '-a %p\n') -o coverage.info
# Generate the HTML report.
echo 'genhtml_sort = 0' >> ~/.lcovrc
tee -a "$HOME/.lcovrc" <<< 'genhtml_sort = 0'
genhtml --output-directory coverage/coverage coverage.info
# Can use any of the removeHtmlDates.sh scripts here, so the Ubuntu GCC Qt6 job's version will do.
/usr/bin/env bash ./artifacts/test-results-*.gcc.qt-6/coverage/removeHtmlDates.sh
Expand Down

0 comments on commit 60df33a

Please sign in to comment.