Skip to content

Commit

Permalink
Downgrading all runners from macos-latest to macos-13, which should n…
Browse files Browse the repository at this point in the history
…ot be using M1 CPUs. RE:natcap#1581
  • Loading branch information
phargogh committed May 28, 2024
1 parent 2dc32f1 commit 9ac247e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [windows-latest, macos-latest]
os: [windows-latest, macos-13]
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [windows-latest, macos-latest]
os: [windows-latest, macos-13]
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -203,17 +203,17 @@ jobs:
# overwrite artifacts or have duplicates (mac/windows sdists have
# different extensions)
- name: Authenticate GCP
if: github.event_name != 'pull_request' && matrix.os == 'macos-latest' && matrix.python-version == env.LATEST_SUPPORTED_PYTHON_VERSION
if: github.event_name != 'pull_request' && matrix.os == 'macos-13' && matrix.python-version == env.LATEST_SUPPORTED_PYTHON_VERSION
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GOOGLE_SERVICE_ACC_KEY }}

- name: Set up GCP
if: github.event_name != 'pull_request' && matrix.os == 'macos-latest' && matrix.python-version == env.LATEST_SUPPORTED_PYTHON_VERSION
if: github.event_name != 'pull_request' && matrix.os == 'macos-13' && matrix.python-version == env.LATEST_SUPPORTED_PYTHON_VERSION
uses: google-github-actions/setup-gcloud@v0

- name: Deploy artifacts to GCS
if: github.event_name != 'pull_request' && matrix.os == 'macos-latest' && matrix.python-version == env.LATEST_SUPPORTED_PYTHON_VERSION
if: github.event_name != 'pull_request' && matrix.os == 'macos-13' && matrix.python-version == env.LATEST_SUPPORTED_PYTHON_VERSION
run: make deploy

validate-resources:
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
os: [windows-latest, macos-latest]
os: [windows-latest, macos-13]

steps:
- name: Check out repo
Expand Down Expand Up @@ -298,9 +298,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
os: [macos-13, windows-latest]
include:
- os: macos-latest
- os: macos-13
puppeteer-log: ~/Library/Logs/invest-workbench/
workspace-path: InVEST-failed-mac-workspace.tar
binary-extension: dmg
Expand Down Expand Up @@ -386,7 +386,7 @@ jobs:
yarn run dist
- name: Build Workbench (macOS)
if: github.event_name != 'pull_request' && matrix.os == 'macos-latest' # secrets not available in PR
if: github.event_name != 'pull_request' && matrix.os == 'macos-13' # secrets not available in PR
working-directory: workbench
env:
GH_TOKEN: env.GITHUB_TOKEN
Expand Down Expand Up @@ -416,7 +416,7 @@ jobs:
run: npx cross-env CI=true yarn run test-electron-app

- name: Sign binaries (macOS)
if: github.event_name != 'pull_request' && matrix.os == 'macos-latest' # secrets not available in PR
if: github.event_name != 'pull_request' && matrix.os == 'macos-13' # secrets not available in PR
env:
CERT_FILE: 2025-01-16-Expiry-AppStore-App.p12
CERT_PASS: ${{ secrets.MACOS_CODESIGN_CERT_PASS }}
Expand Down Expand Up @@ -468,7 +468,7 @@ jobs:
run: make invest_autotest

- name: Tar the workspace to preserve permissions (macOS)
if: failure() && matrix.os == 'macos-latest'
if: failure() && matrix.os == 'macos-13'
run: tar -cvf ${{ matrix.workspace-path}} ${{ github.workspace }}

- name: Upload workspace on failure
Expand Down
16 changes: 2 additions & 14 deletions workbench/electron-builder-config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
const { execFileSync } = require('child_process');

const OS = process.platform;

// github actions now defaults to ARM builds, so fall back to x64.
let ARCH;
if (OS === 'darwin') {
ARCH = 'x64';
} else {
ARCH = process.arch;
}
const ARCH = process.arch;
const EXT = OS === 'win32' ? 'exe' : 'dmg';

// Uniquely identify the changeset we're building & packaging.
Expand Down Expand Up @@ -65,12 +58,7 @@ const config = {
mac: {
category: 'public.app-category.business',
icon: 'resources/InVEST-2-574x574.ico',
target: [
{
target: 'dmg',
arch: ['x64'], // force build of x64 even on ARM macs
},
],
target: 'dmg',
},
win: {
target: 'nsis',
Expand Down

0 comments on commit 9ac247e

Please sign in to comment.