From 7617c21cb4ff0ced9881a1819d3657bbed6c8fa9 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Thu, 11 Apr 2024 06:24:55 -0600 Subject: [PATCH] update macos github workflow (#1265) * update github macos runners. macos-11 runner is now deprecated. * update xcode versions for github * update XML_CATALOG_FILES for macos-14 runner * work around macos-14 runner brew locations * find homebrew gsed on apple silicon * generalize brew location detection in macos workflow * update python version for arm availability * push xcode versions to latest minor levels. --- .github/workflows/macos.yml | 20 ++++++++++---------- tools/fixdoc | 7 ++++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index adb6086ba..5244f8741 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,25 +19,25 @@ jobs: matrix: include: - QT_VERSION: '5.15.2' - XCODE_VERSION: '12.5.1' + XCODE_VERSION: '13.4.1' GENERATOR: 'Ninja' RELEASE: false - os: macos-11 + os: macos-12 - QT_VERSION: '6.2.4' - XCODE_VERSION: '13.4.1' + XCODE_VERSION: '14.3.1' GENERATOR: 'Xcode' RELEASE: false - os: macos-12 + os: macos-13 - QT_VERSION: '6.2.4' - XCODE_VERSION: '13.4.1' + XCODE_VERSION: '14.3.1' GENERATOR: 'Ninja' RELEASE: true - os: macos-12 + os: macos-13 - QT_VERSION: '6.5.3' - XCODE_VERSION: '14.2' + XCODE_VERSION: '15.3' GENERATOR: 'Ninja' RELEASE: false - os: macos-12 + os: macos-14 steps: - name: Checkout repository @@ -54,7 +54,7 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Qt install if: steps.cache.outputs.cache-hit != 'true' @@ -82,7 +82,7 @@ jobs: - name: Script env: - XML_CATALOG_FILES: /usr/local/etc/xml/catalog + XML_CATALOG_FILES: ${{ runner.arch == 'ARM64' && '/opt/homebrew/etc/xml/catalog' || '/usr/local/etc/xml/catalog' }} run: | source ${HOME}/Cache/qt-${{ matrix.QT_VERSION }}.env sudo xcode-select --switch /Applications/Xcode_${{ matrix.XCODE_VERSION }}.app diff --git a/tools/fixdoc b/tools/fixdoc index 4b10980de..e53749c3c 100755 --- a/tools/fixdoc +++ b/tools/fixdoc @@ -12,9 +12,10 @@ DIR=$1 TITLE=$2 SED="sed" -# MacOS using Homebrew -[ -f /usr/local/bin/gsed ] && SED=/usr/local/bin/gsed -[ -f /opt/local/bin/gsed ] && SED=/opt/local/bin/gsed +# macOS using Homebrew may be /usr/local (macOS intel) or /opt/homebrew (apple silicion) ... +if command -v gsed >/dev/null 2>&1; then + SED=$(command -v gsed) +fi [ ! -d "$DIR/tpl" ] && mkdir -p "$DIR/tpl"