From acf896bb1dfdf3e6da6755210cd166054a589350 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Fri, 26 Apr 2024 15:44:03 -0400 Subject: [PATCH 1/3] Update runs-on value in build.yaml to use macos-12 for macOS target --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 47c6c08..dc530ee 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: - os: macos-latest python-version: '3.11' target: macos-x86 - runs-on: macos-latest + runs-on: macos-12 - os: ubuntu-latest python-version: '3.11' target: linux From 41c56f73e44508444c7492282960c8a13d28d702 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Fri, 26 Apr 2024 15:54:12 -0400 Subject: [PATCH 2/3] Update runs-on value in build.yaml to use macos-14-arm64 for macOS target --- .github/workflows/build.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dc530ee..7f6e40e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,12 +16,16 @@ jobs: needs: check-format strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-x86, macos-arm64, windows-latest] include: - - os: macos-latest + - os: macos-x86 python-version: '3.11' target: macos-x86 runs-on: macos-12 + - os: macos-arm64 + python-version: '3.11' + target: macos-arm64 + runs-on: macos-14-arm64 - os: ubuntu-latest python-version: '3.11' target: linux @@ -48,7 +52,7 @@ jobs: python -m pip install tesserocr-2.6.0-cp311-cp311-win_amd64.whl - name: Install tesserocr for MacOS arm64 - if: matrix.os == 'macos-latest-xlarge' + if: matrix.os == 'macos-arm64' run: | brew install tesseract pip install --no-binary tesserocr tesserocr @@ -69,7 +73,7 @@ jobs: python -m pip install -r requirements.txt - name: Install MacOS dependencies - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | pip install -r requirements-mac.txt @@ -79,7 +83,7 @@ jobs: python -m pip install -r requirements-win.txt - name: Import Apple Certificate - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | if security list-keychains | grep -q "github_build.keychain"; then security delete-keychain github_build.keychain @@ -98,13 +102,13 @@ jobs: APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - name: Unlock keychain on Mac - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | security unlock-keychain -p "" github_build.keychain security set-key-partition-list -S apple-tool:,apple: -k "" -D "Developer" -t private github_build.keychain - name: List available signing identities - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | security find-identity -v -p codesigning @@ -132,7 +136,7 @@ jobs: cd .. - name: Build with PyInstaller (MacOS) - if: matrix.os == 'macos-latest' || matrix.os == 'macos-latest-xlarge' + if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | pyinstaller --clean --noconfirm scoresight.spec -- --mac_osx env: @@ -153,12 +157,12 @@ jobs: pyinstaller --clean --noconfirm scoresight.spec - name: Zip Application for Notarization - if: matrix.os == 'macos-latest' && github.event_name != 'pull_request' + if: (matrix.os == 'macos-x86' || matrix.os == 'macos-arm64') && github.event_name != 'pull_request' run: | ditto -c -k --keepParent dist/scoresight.app scoresight.zip - name: Notarize and Staple - if: matrix.os == 'macos-latest' && github.event_name != 'pull_request' + if: (matrix.os == 'macos-x86' || matrix.os == 'macos-arm64') && github.event_name != 'pull_request' run: | xcrun notarytool submit scoresight.zip --apple-id \ "${{ secrets.APPLE_DEVELOPER_ID_USER }}" --password \ @@ -168,7 +172,7 @@ jobs: xcrun stapler staple dist/scoresight.app - name: Verify Notarization - if: matrix.os == 'macos-latest' && github.event_name != 'pull_request' + if: (matrix.os == 'macos-x86' || matrix.os == 'macos-arm64') && github.event_name != 'pull_request' run: | spctl -a -v dist/scoresight.app rm scoresight.zip @@ -195,7 +199,7 @@ jobs: tar -cvf scoresight.tar -C dist scoresight - name: Create dmg MacOS - if: matrix.os == 'macos-latest' || matrix.os == 'macos-latest-xlarge' + if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | chmod a+x dist/scoresight.app hdiutil create -volname "ScoreSight" -srcfolder dist/scoresight.app -ov -format UDRO scoresight.dmg From 0ada851881d02d99e7590691d2048a8154340185 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Fri, 26 Apr 2024 16:00:48 -0400 Subject: [PATCH 3/3] Update runs-on value in build.yaml to use macos-latest for macOS target --- .github/workflows/build.yaml | 6 +++--- .github/workflows/release.yaml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7f6e40e..100944d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,7 +25,7 @@ jobs: - os: macos-arm64 python-version: '3.11' target: macos-arm64 - runs-on: macos-14-arm64 + runs-on: macos-latest - os: ubuntu-latest python-version: '3.11' target: linux @@ -202,7 +202,7 @@ jobs: if: matrix.os == 'macos-x86' || matrix.os == 'macos-arm64' run: | chmod a+x dist/scoresight.app - hdiutil create -volname "ScoreSight" -srcfolder dist/scoresight.app -ov -format UDRO scoresight.dmg + hdiutil create -volname "ScoreSight" -srcfolder dist/scoresight.app -ov -format UDRO scoresight-${{ matrix.target }}.dmg - name: Create zip on Windows if: matrix.os == 'windows-latest' @@ -216,6 +216,6 @@ jobs: name: scoresight-${{ matrix.target }} # only upload exe on windows, tar on linux, dmg on macos path: | - scoresight.dmg + scoresight-${{ matrix.target }}.dmg scoresight.tar scoresight.zip diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2565a73..4209caa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -79,6 +79,7 @@ jobs: variants=( 'linux' 'macos-x86' + 'macos-arm64' 'windows' )