-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,21 +4,64 @@ name: Build | |
on: [push, pull_request] | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build sdist | ||
runs-on: ubuntu-latest | ||
outputs: | ||
sdist_name: ${{ steps.build_sdist.outputs.sdist_name }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Debug patch | ||
run: patch -d uwsgi -p1 < uwsgi-version-debug.txt | ||
|
||
- name: Patch packaging | ||
run: ./patch-uwsgi-packaging.sh uwsgi | ||
|
||
- name: Build sdist | ||
id: build_sdist | ||
run: | | ||
git submodule update --init | ||
make sdist | ||
echo "sdist_name=pyuwsgi-$(make print-version)" >> $GITHUB_OUTPUT | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: pre_build.sh | ||
path: tools/pre_build.sh | ||
|
||
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 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: tools/pre_build.sh | ||
path: pre_buils.sh | ||
|
||
- name: Unpack sdist | ||
run: | | ||
tar -xvzf "dist/${{ needs.build_sdist.outputs.sdist_name }}.tar.gz" | ||
rm -rf dist | ||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
|
@@ -30,7 +73,7 @@ jobs: | |
uses: pypa/[email protected] | ||
with: | ||
output-dir: dist | ||
package-dir: ./uwsgi | ||
package-dir: ./${{ needs.build_sdist.outputs.sdist_name }} | ||
env: | ||
CIBW_ARCHS_LINUX: auto aarch64 | ||
CIBW_ARCHS_MACOS: x86_64 | ||
|
@@ -42,14 +85,9 @@ jobs: | |
CIBW_SKIP: cp36-* pp* | ||
CIBW_ENVIRONMENT: APPEND_VERSION=".post0" UWSGI_PROFILE=pyuwsginossl | ||
CIBW_TEST_COMMAND: pyuwsgi --help | ||
CIBW_BEFORE_ALL: ./patch-uwsgi-packaging.sh uwsgi | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters