Skip to content

Commit

Permalink
Derive the build ID's arch from the target archs
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Oct 4, 2024
1 parent a337881 commit ca87858
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ jobs:
path: aqtinstall.log
if-no-files-found: error
- name: Choose target architectures
id: arch
run: |
# Qt Online Installer only provides x86-64 binaries (not arm64) prior to Qt 6.2.0.
if [[ '${{ matrix.qt }}' =~ ^(5|6\.[01])\. ]]; then arch=x86_64
Expand All @@ -222,13 +223,14 @@ jobs:
if [[ '${{ matrix.os }}' == 'macos-13' ]]; then arx='x86_64'; else arch='arm64'; fi
# Otherwise, default to universal binaries, where possible.
else arch='arm64;x86_64'; fi
echo "CMAKE_OSX_ARCHITECTURES=${arch}" >> $GITHUB_ENV
echo "CMAKE_OSX_ARCHITECTURES=${arch}" | tee -a "$GITHUB_ENV"
echo "buildId=${arch//;/-}" | tee -a "$GITHUB_OUTPUT"
- name: Build
id: build
env:
CC: ${{ matrix.env.cc }}
CXX: ${{ matrix.env.cxx }}
PROJECT_BUILD_ID: ${{ github.run_number }}.${{ matrix.os }}.${{ startsWith(matrix.qt, '6') && 'arm64-' || '' }}x86_64.${{ matrix.env.cc }}${{ matrix.env.coverage && '-cov' || '' }}.qt-${{ matrix.qt }}
PROJECT_BUILD_ID: ${{ github.run_number }}.${{ matrix.os }}.${{ steps.arch.output.buildId }}.${{ matrix.env.cc }}${{ matrix.env.coverage && '-cov' || '' }}.qt-${{ matrix.qt }}
run: |
cmake -D CMAKE_BUILD_TYPE=Release \
-D CODECOV_GCOV=${{ startsWith(matrix.env.cc, 'gcc') && '/usr/local/bin/gcov-12' || '/usr/bin/gcov'}} \
Expand Down

0 comments on commit ca87858

Please sign in to comment.