Skip to content

Commit

Permalink
Only build sdist once
Browse files Browse the repository at this point in the history
  • Loading branch information
ipmb committed Dec 11, 2023
1 parent 3442f1a commit 124fee4
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,47 @@ name: Build
on: [push, pull_request]

jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Debug patch
run: patch -d uwsgi -p1 < uwsgi-version-debug.txt

- name: Build sdist
run: |
git submodule update --init
make sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist

build_wheels:
name: Build wheels for ${{ matrix.os }}
needs: [build_sdist]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
fail-fast: false

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
with:
submodules: true
name: dist
path: dist

- name: Debug patch
run: patch -d uwsgi -p1 < uwsgi-version-debug.txt
- name: Unpack sdist
run: |
tar -xvzf dist/*.tar.gz
rm -rf dist
- name: Set up QEMU
if: runner.os == 'Linux'
Expand Down Expand Up @@ -46,10 +72,6 @@ jobs:
CIBW_BEFORE_BUILD_MACOS: IS_MACOS=1 ./pre_build.sh
CIBW_BEFORE_BUILD_LINUX: ./pre_build.sh && (yum install -y zlib-devel || apk add zlib-dev)

- name: Create sdist
run: |
rm -rf uwsgi && git submodule update --init
pipx run build --sdist --outdir dist uwsgi
- uses: actions/upload-artifact@v3
with:
name: dist
Expand Down

0 comments on commit 124fee4

Please sign in to comment.