From ea1a816eca0a441736f2a65e3705fa0523566fe7 Mon Sep 17 00:00:00 2001 From: dasm Date: Fri, 17 Oct 2025 11:22:12 -0700 Subject: [PATCH 1/3] Refactor packaging to be a matrix job --- .github/workflows/release.yml | 55 +++++++++++------------------------ 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 302dfe9..2eaac3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,9 +27,18 @@ jobs: exit 1 fi - Package-linux: + Package: if: github.repository == 'opendp/tumult-core' - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - name: linux + os: ubuntu-latest + - name: macos-intel + os: macos-15-intel + - name: macos-arm + os: macos-latest needs: Check-Tag-Pattern steps: - name: Checkout repository @@ -40,50 +49,20 @@ jobs: - name: Upload wheel uses: actions/upload-artifact@v4 with: - name: linux-wheel + name: ${{ matrix.name }}-wheel path: dist/*.whl - name: Upload sdist + # Only upload the sdist once + if: ${{ strategy.job-index == 0 }} uses: actions/upload-artifact@v4 with: name: sdist path: dist/*.tar.gz - Package-macos-intel: - if: github.repository == 'opendp/tumult-core' - runs-on: macos-15-intel - needs: Check-Tag-Pattern - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Set up runner - uses: opendp/tumult-tools/actions/setup@eabe1054863f0916a0087ad180fd83719049c094 - - run: uv run --only-group scripting nox -s build - - name: Upload wheel - uses: actions/upload-artifact@v4 - with: - name: macos-intel-wheel - path: dist/*.whl - - Package-macos-arm: - if: github.repository == 'opendp/tumult-core' - runs-on: macos-latest - needs: Check-Tag-Pattern - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Set up runner - uses: opendp/tumult-tools/actions/setup@eabe1054863f0916a0087ad180fd83719049c094 - - run: uv run --only-group scripting nox -s build - - name: Upload wheel - uses: actions/upload-artifact@v4 - with: - name: macos-arm-wheel - path: dist/*.whl - Test-Slow: if: github.repository == 'opendp/tumult-core' runs-on: ubuntu-latest - needs: Package-linux + needs: Package steps: - name: Checkout code repository uses: actions/checkout@v4 @@ -99,7 +78,7 @@ jobs: Benchmark: if: github.repository == 'opendp/tumult-core' runs-on: ubuntu-latest - needs: Package-linux + needs: Package steps: - name: Checkout code repository uses: actions/checkout@v4 @@ -122,7 +101,7 @@ jobs: dependencies: [oldest, newest] python: ["3.10", "3.12"] runs-on: ${{ matrix.os }} - needs: Package-linux + needs: Package steps: - name: Checkout code repository uses: actions/checkout@v4 From fbeb183e2dfa1c7f9d3614fec62e91a6ac98f023 Mon Sep 17 00:00:00 2001 From: dasm Date: Fri, 17 Oct 2025 11:49:50 -0700 Subject: [PATCH 2/3] add ubuntu arm build job --- .github/workflows/release.yml | 10 ++++++---- ext/build.py | 2 +- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2eaac3c..d30a579 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,12 +33,14 @@ jobs: strategy: matrix: include: - - name: linux + - name: linux-intel os: ubuntu-latest - name: macos-intel os: macos-15-intel - name: macos-arm os: macos-latest + - name: linux-arm + os: ubuntu-24.04-arm needs: Check-Tag-Pattern steps: - name: Checkout repository @@ -71,7 +73,7 @@ jobs: - name: Download dist uses: actions/download-artifact@v4 with: - name: linux-wheel + name: linux-intel-wheel path: dist - run: uv run nox -s test-slow @@ -87,7 +89,7 @@ jobs: - name: Download dist uses: actions/download-artifact@v4 with: - name: linux-wheel + name: linux-intel-wheel path: dist - run: uv run nox -t benchmark @@ -110,7 +112,7 @@ jobs: - name: Download dist uses: actions/download-artifact@v4 with: - name: linux-wheel + name: linux-intel-wheel path: dist - run: uv run nox -s "test_dependency_matrix(${{matrix.python}}-${{matrix.dependencies}})" env: diff --git a/ext/build.py b/ext/build.py index dab39ab..08f0150 100755 --- a/ext/build.py +++ b/ext/build.py @@ -11,7 +11,7 @@ build_command = ["bash", str(build_dir / "build.sh")] SUPPORTED_PLATFORMS = ["Linux", "Darwin"] -SUPPORTED_ARCHITECTURES = ["x86_64", "arm64"] +SUPPORTED_ARCHITECTURES = ["x86_64", "arm64", "aarch64"] def check_platform(): diff --git a/pyproject.toml b/pyproject.toml index 9803610..4ad4bcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -170,7 +170,7 @@ fi""" environment = "MACOSX_DEPLOYMENT_TARGET='11.0'" [tool.cibuildwheel.linux] -archs = ["x86_64"] +archs = ["native"] ################################################################################ From 377904876b5c81df79fda4076c6c2fddebdb1975 Mon Sep 17 00:00:00 2001 From: dasm Date: Fri, 17 Oct 2025 11:57:39 -0700 Subject: [PATCH 3/3] Add arm to the dependency matrix --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d30a579..ea5b37c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,6 +102,15 @@ jobs: os: [ubuntu-latest] dependencies: [oldest, newest] python: ["3.10", "3.12"] + include: + # Set a wheel for all intel linux runs. + - os: ubuntu-latest + wheel: linux-intel-wheel + # Add an extra run to test arm linux. + - os: ubuntu-24.04-arm + dependencies: oldest + python: "3.10" + wheel: linux-arm-wheel runs-on: ${{ matrix.os }} needs: Package steps: @@ -112,7 +121,7 @@ jobs: - name: Download dist uses: actions/download-artifact@v4 with: - name: linux-intel-wheel + name: ${{ matrix.wheel }} path: dist - run: uv run nox -s "test_dependency_matrix(${{matrix.python}}-${{matrix.dependencies}})" env: