From d29edcb333ccad210fda2201017fb20a6297de4a Mon Sep 17 00:00:00 2001 From: Dan F-M Date: Mon, 18 Mar 2024 14:46:49 -0400 Subject: [PATCH 1/4] running wheel build on ARM mac --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6304ad4..f345ade 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: - main tags: - "*" - # pull_request: + pull_request: workflow_dispatch: inputs: prerelease: @@ -26,8 +26,9 @@ jobs: fail-fast: false matrix: os: - - "ubuntu-latest" - - "macos-latest" + - "ubuntu-22.04" + - "macos-12" + - "macos-14" # - "windows-latest" steps: - uses: actions/checkout@v4 From 3da1f360380886100670ea4b63569287fb665dc1 Mon Sep 17 00:00:00 2001 From: Dan F-M Date: Mon, 18 Mar 2024 14:49:37 -0400 Subject: [PATCH 2/4] Run tests on ARM too --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a23ad29..7860ff5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,10 @@ jobs: os: [ubuntu-latest] nox-session: ["tests"] include: - - os: macos-latest + - os: macos-12 + python-version: "3.11" + nox-session: "tests" + - os: macos-14 python-version: "3.11" nox-session: "tests" - os: ubuntu-latest From 67fd2a0d646a14cc4fa3fb646f666866b4372d62 Mon Sep 17 00:00:00 2001 From: Dan F-M Date: Mon, 18 Mar 2024 14:55:29 -0400 Subject: [PATCH 3/4] Don't run release on PR --- .cirrus.yml | 43 ----------------------------------- .github/workflows/release.yml | 7 +----- 2 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index cdf8988..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,43 +0,0 @@ -cirrus_wheels_macos_arm64_task: - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode:latest - env: - PATH: /opt/homebrew/opt/python@3.10/bin:$PATH - CIBW_ENVIRONMENT: > - MACOSX_DEPLOYMENT_TARGET=12.0 - _PYTHON_HOST_PLATFORM="macosx-12.0-arm64" - SPS_HOME="${CIRRUS_WORKING_DIR}/src/fsps/libfsps" - PKG_CONFIG_PATH: /opt/arm64-builds/lib/pkgconfig - CMAKE_PREFIX_PATH: /opt/arm64-builds/ - REPAIR_PATH: /usr/local/gfortran/lib:/opt/arm64-builds/lib - CIBW_REPAIR_WHEEL_COMMAND_MACOS: > - DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib delocate-listdeps {wheel} && - DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel} - - clone_script: | - if [ -z "$CIRRUS_PR" ]; then - git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR - git reset --hard $CIRRUS_CHANGE_IN_REPO - else - git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR - git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR - git reset --hard $CIRRUS_CHANGE_IN_REPO - fi - - setup_python_script: - - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python - - which python - - system_info_script: - - uname -m - - python -c "import platform;print(platform.python_version());print(platform.system());print(platform.machine())" - - install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.14.1 - - cibuildwheel_script: - - cibuildwheel - - artifacts: - path: "wheelhouse/*" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f345ade..48edb1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: - main tags: - "*" - pull_request: + # pull_request: workflow_dispatch: inputs: prerelease: @@ -78,11 +78,6 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') steps: - - name: Get macOS arm64 wheels from Cirrus CI - uses: getsentry/action-wait-for-cirrus@v1.0.0 - with: - task: cirrus_wheels_macos_arm64 - timeout-minutes: 15 - uses: actions/download-artifact@v4 with: path: dist From 34c092d422fa15560ac68a024af1bcd346a8f61a Mon Sep 17 00:00:00 2001 From: Dan F-M Date: Mon, 18 Mar 2024 15:01:49 -0400 Subject: [PATCH 4/4] use matrix.os for cache key instead of runner.os --- .github/workflows/tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7860ff5..4ca4eef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,17 +52,17 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/noxfile.py') }} + key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/noxfile.py') }} restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/pyproject.toml') }}- - ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}- + ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/pyproject.toml') }}- + ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}- - name: Cache nox session files uses: actions/cache@v4 with: path: .nox - key: ${{ runner.os }}-nox-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/noxfile.py') }} + key: ${{ matrix.os }}-nox-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/noxfile.py') }} restore-keys: | - ${{ runner.os }}-nox-${{ matrix.python-version }}-${{ matrix.nox-session }}- + ${{ matrix.os }}-nox-${{ matrix.python-version }}-${{ matrix.nox-session }}- - name: Install dependencies run: | python -m pip install -U pip