From 64cf3a236a66fe4c4c3e812d9039d3518eb31d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C5=93ur?= Date: Sun, 20 Oct 2024 18:44:43 +0200 Subject: [PATCH] ci: fix macos-12-x86_64-from-tarball from GitHub workflows (#7169) --- .github/workflows/actions.yml | 90 +++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 14 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 0f93702c5..c501072b3 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -179,7 +179,7 @@ jobs: run: cmake -E chdir obj ctest -j $(nproc) --build-config Debug --output-on-failure sanitizer-tests-macos: - runs-on: macos-14 + runs-on: macos-15 needs: [ what-to-make ] if: ${{ needs.what-to-make.outputs.make-tests == 'true' }} steps: @@ -309,8 +309,8 @@ jobs: run: | if (Select-String -Path makelog -Pattern 'warning:') { exit 1 } - macos-14-project: - runs-on: macos-14 + macos-15-project: + runs-on: macos-15 needs: [ what-to-make ] if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-mac == 'true' || needs.what-to-make.outputs.make-utils == 'true' }} steps: @@ -331,8 +331,8 @@ jobs: name: binaries-${{ github.job }} path: pfx/**/* - macos-14-arm64: - runs-on: macos-14 + macos-15-arm64: + runs-on: macos-15 needs: [ what-to-make ] if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-mac == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }} steps: @@ -608,10 +608,10 @@ jobs: name: source-tarball path: obj/transmission*.tar.* - macos-14-universal-from-tarball: + macos-15-universal-from-tarball: needs: [ make-source-tarball, what-to-make ] if: ${{ needs.what-to-make.outputs.make-mac == 'true' }} - runs-on: macos-14 + runs-on: macos-15 steps: - name: Show Configuration run: | @@ -668,10 +668,11 @@ jobs: name: binaries-${{ github.job }} path: pfx/**/* - macos-12-x86_64-from-tarball: + # Oldest GitHub support for QT on Mac + macos-13-x86_64-from-tarball: needs: [ make-source-tarball, what-to-make ] - if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-mac == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }} - runs-on: macos-12 + if: ${{ needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' }} + runs-on: macos-13 steps: - name: Show Configuration run: | @@ -681,9 +682,6 @@ jobs: - name: Get Dependencies run: | brew install cmake gettext ninja node pkg-config - - name: Get Dependencies (GTK) - if: ${{ needs.what-to-make.outputs.make-gtk == 'true' }} - run: brew install gtkmm3 - name: Get Dependencies (Qt) if: ${{ needs.what-to-make.outputs.make-qt == 'true' }} run: brew install qt @@ -703,11 +701,75 @@ jobs: -DCMAKE_INSTALL_PREFIX=pfx \ -DCMAKE_OSX_ARCHITECTURES='x86_64' \ -DCMAKE_PREFIX_PATH=`brew --prefix`/opt/qt \ + -DENABLE_CLI=OFF \ + -DENABLE_DAEMON=OFF \ + -DENABLE_GTK=OFF \ + -DENABLE_MAC=OFF \ + -DENABLE_QT=ON \ + -DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} \ + -DENABLE_UTILS=OFF \ + -DREBUILD_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \ + -DENABLE_WERROR=ON \ + -DRUN_CLANG_TIDY=OFF \ + -DUSE_SYSTEM_EVENT2=OFF \ + -DUSE_SYSTEM_DEFLATE=OFF \ + -DUSE_SYSTEM_DHT=OFF \ + -DUSE_SYSTEM_MINIUPNPC=OFF \ + -DUSE_SYSTEM_NATPMP=OFF \ + -DUSE_SYSTEM_UTP=OFF \ + -DUSE_SYSTEM_B64=OFF \ + -DUSE_SYSTEM_PSL=OFF + - name: Make + run: cmake --build obj --config RelWithDebInfo + - name: Test + if: ${{ needs.what-to-make.outputs.make-tests == 'true' }} + env: + TMPDIR: /private/tmp + run: cmake -E chdir obj ctest -j $(sysctl -n hw.logicalcpu) --build-config RelWithDebInfo --output-on-failure + - name: Install + run: cmake --build obj --config RelWithDebInfo --target install/strip + - uses: actions/upload-artifact@v4 + with: + name: binaries-${{ github.job }} + path: pfx/**/* + + # Oldest GitHub support for CLI and GTK on Mac + macos-12-x86_64-from-tarball: + needs: [ make-source-tarball, what-to-make ] + if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-mac == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }} + runs-on: macos-12 + steps: + - name: Show Configuration + run: | + echo '${{ toJSON(needs) }}' + echo '${{ toJSON(runner) }}' + sw_vers + - name: Get Dependencies + run: | + brew install cmake gettext ninja node pkg-config + - name: Get Dependencies (GTK) + if: ${{ needs.what-to-make.outputs.make-gtk == 'true' }} + run: brew install gtkmm3 + - name: Get Source + uses: actions/download-artifact@v4 + with: + name: source-tarball + - name: Extract Source + run: mkdir src && tar xf transmission*.tar.* -C src --strip-components 1 + - name: Configure + run: | + cmake \ + -S src \ + -B obj \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=pfx \ + -DCMAKE_OSX_ARCHITECTURES='x86_64' \ -DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \ -DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \ -DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \ -DENABLE_MAC=${{ (needs.what-to-make.outputs.make-mac == 'true') && 'ON' || 'OFF' }} \ - -DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \ + -DENABLE_QT=OFF \ -DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} \ -DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \ -DREBUILD_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \