From c455ce0fe8d3e0a6d663d7ab79445c1e23b909a5 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 16 Oct 2025 11:00:05 -0400 Subject: [PATCH 1/2] Build distribution package on macOS instead of Linux --- .github/workflows/build-and-publish-package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-package.yml b/.github/workflows/build-and-publish-package.yml index 0e0ad36b..7a523aa0 100644 --- a/.github/workflows/build-and-publish-package.yml +++ b/.github/workflows/build-and-publish-package.yml @@ -6,7 +6,10 @@ on: jobs: build: - runs-on: ubuntu-latest + # This job runs on macOS because we can't upload binary wheels to PyPI for Linux. + # Hence, we produce both a binary *and* a source distribution in this job, but the + # binary distribution is only valid for macOS. + runs-on: macos-latest name: Build LNT package steps: - uses: actions/checkout@v5 From ab7da73390cbdadd452b3c1b66247507004b288d Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 16 Oct 2025 11:10:34 -0400 Subject: [PATCH 2/2] Just distribute source dist instead, macOS jobs take forever --- .github/workflows/build-and-publish-package.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-publish-package.yml b/.github/workflows/build-and-publish-package.yml index 7a523aa0..07286614 100644 --- a/.github/workflows/build-and-publish-package.yml +++ b/.github/workflows/build-and-publish-package.yml @@ -6,10 +6,7 @@ on: jobs: build: - # This job runs on macOS because we can't upload binary wheels to PyPI for Linux. - # Hence, we produce both a binary *and* a source distribution in this job, but the - # binary distribution is only valid for macOS. - runs-on: macos-latest + runs-on: ubuntu-latest name: Build LNT package steps: - uses: actions/checkout@v5 @@ -20,10 +17,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" + # We only build a source distribution because binary distributions for Linux can't be uploaded + # to PyPI. Our source distribution is trivial to build anyway. - name: Build the source tarball run: | python -m pip install build - python -m build + python -m build --sdist - name: Store the distribution packages uses: actions/upload-artifact@v4 with: