Skip to content

Commit

Permalink
Force macOS-13 for pypylon macOS x86_64 wheels to ensure that tests a…
Browse files Browse the repository at this point in the history
… running on real x86_64 hardware. Add action for download build pypylon wheels.
  • Loading branch information
bjoernrennfanz committed Dec 4, 2024
1 parent 7a2c5b9 commit 221b193
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,32 +281,54 @@ jobs:
build-windows
]
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ ubuntu-latest, macos-latest, macos-13, windows-latest ]
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
architecture: [ x64, arm64 ]
exclude:
# Exclude ARM64 architecture for Windows
- os: windows-latest
architecture: arm64
# Exclude ARM64 architecture macos-13
- os: macos-13
architecture: arm64
# Exclude x86_64 architecture macos-latest
- os: macos-latest
architecture: x64

runs-on: ${{ matrix.os }}
steps:
- name: Set up runner architecture
if: runner.os == 'Linux' && matrix.architecture == 'arm64'
run: |
if [[ "$(uname -m)" != "${{ matrix.architecture }}" ]]; then
if [[ "$(uname -m)" != "aarch64" ]]; then
sudo apt-get update
sudo apt-get install -y qemu-user-static
echo ":$(( $(cat /proc/sys/fs/binfmt_misc/status | grep -o enabled) | wc -l ))" | sudo tee /proc/sys/fs/binfmt_misc/qemu-aarch64
sudo service binfmt-support restart
docker run --rm --privileged multiarch/qemu-user-static:register --reset
fi
- name: Check out repository
uses: actions/checkout@v2

- uses: dkershner6/switch-case-action@v1
id: pypylon-wheel-source
with:
default: "build-results-unknown"
conditionals-with-values: |
${{ runner.os == 'Linux' && matrix.architecture == 'arm64' }} => build-results-manylinux_2_31_aarch64-cp39
${{ runner.os == 'Linux' && matrix.architecture == 'x64' }} => build-results-manylinux_2_31_x86_64-cp39
${{ runner.os == 'Windows' }} => build-results-windows
${{ runner.os == 'macOS' }} => build-results-macos
- name: Download pypylon wheels
uses: actions/download-artifact@v4
with:
name: ${{ steps.pypylon-wheel-source.outputs.value }}
path: pypylon-wheels

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

0 comments on commit 221b193

Please sign in to comment.