Skip to content

Commit

Permalink
Debug macOS binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed May 20, 2024
1 parent ae8c3fb commit 5fb5f94
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/build-hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,60 @@ jobs:
path: installers/*
if-no-files-found: error

macos-test-distribution:
name: Test distribution ${{ matrix.job.target }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
needs:
- distributions-dev
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job:
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-apple-darwin
os: macos-12

steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: distribution-${{ matrix.job.target }}

- name: Unpack distribution
run: tar xzf hatch-dist-${{ matrix.job.target }}.tar.gz

- name: Try to run
run: ./python/bin/python --version

macos-test-installer:
name: Test installer ${{ matrix.job.target }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job:
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-apple-darwin
os: macos-12

steps:
- name: Download installer
run: curl -Lo hatch-universal.pkg https://github.com/pypa/hatch/releases/latest/download/hatch-universal.pkg

- name: Install
run: sudo installer -pkg ./hatch-universal.pkg -target /

- name: Try to run
run: |-
/usr/local/hatch/bin/hatch --version
/usr/local/hatch/bin/hatch new testing && cd testing
/usr/local/hatch/bin/hatch run which -a python
/usr/local/hatch/bin/hatch run hatch run which -a python
macos-packaging:
name: Build macOS installer and sign/notarize artifacts
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
Expand Down Expand Up @@ -514,7 +568,7 @@ jobs:
uses: ./.github/workflows/build-distributions.yml
# This actually does not need the binary jobs but we want to prioritize
# resources for the test jobs therefore this forces these later on
needs: binaries
# needs: binaries

distributions-release:
name: Build release distributions
Expand Down

0 comments on commit 5fb5f94

Please sign in to comment.