Skip to content

Commit

Permalink
Update actions in build_wheel workflow
Browse files Browse the repository at this point in the history
- Update Go runtime to 1.22.7
- Add support for Python 3.12, 3.13 and remove support for 3.8
- Update libwebp to 1.4.0
  • Loading branch information
tfuxu authored Sep 19, 2024
1 parent 1fb7442 commit 85a4218
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist
Expand All @@ -38,12 +38,12 @@ jobs:
- [ "arm64", "arm64" ]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20.x"
go-version: "1.22.x"

- name: Install gopy
run: go install github.com/go-python/gopy@v0.4.7
Expand All @@ -61,7 +61,7 @@ jobs:
PATH=$PATH:/usr/local/go/bin
GOARCH=${{ matrix.arch_cibw_go[1] }}
CGO_ENABLED=1
MACOSX_DEPLOYMENT_TARGET=10.15
MACOSX_DEPLOYMENT_TARGET=14
- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand All @@ -75,22 +75,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.15.0
uses: pypa/cibuildwheel@v2.16.5
with:
package-dir: .
env:
CIBW_BUILD: "cp3*_x86_64"
CIBW_BUILD_FRONTEND: "build"
CIBW_SKIP: "cp36-* cp37-* *-musllinux_x86_64"
CIBW_SKIP: "cp36-* cp37-* cp38-* *-musllinux_x86_64"
CIBW_ARCHS: "native"
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CGO_ENABLED=1
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.20.7.linux-amd64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/gopy@v0.4.7
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -109,28 +109,28 @@ jobs:
strategy:
fail-fast: false
matrix:
python3_version: [ 8, 9, 10, 11 ]
python3_version: [ 9, 10, 11, 12, 13 ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Build 3.${{ matrix.python3_version }} wheels
uses: pypa/cibuildwheel@v2.15.0
uses: pypa/cibuildwheel@v2.16.5
with:
package-dir: .
env:
CIBW_BUILD: "cp3${{ matrix.python3_version }}*_aarch64"
CIBW_BUILD_FRONTEND: "build"
CIBW_SKIP: "cp36-* cp37-* *-musllinux_aarch64"
CIBW_SKIP: "cp36-* cp37-* cp38-* *-musllinux_aarch64"
CIBW_ARCHS: "aarch64"
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CGO_ENABLED=1
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.20.7.linux-arm64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-arm64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/gopy@v0.4.7
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -149,20 +149,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python3_version: [ 8, 9, 10, 11 ]
python3_version: [ 9, 10, 11, 12, 13 ]

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build 3.${{ matrix.python3_version }} wheels via Docker
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: ./tools/Dockerfile.armv7l
Expand Down Expand Up @@ -190,13 +190,13 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20.x"
go-version: "1.22.x"

# TODO: Make a fork of this fork to update to 0.4.7
- name: Install gopy
Expand All @@ -213,19 +213,19 @@ jobs:

- name: Compile Libwebp
run: |
curl -o libwebp.tar.gz https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.1.tar.gz
curl -o libwebp.tar.gz https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz
tar -xzf libwebp.tar.gz
cd libwebp-1.3.1
cd libwebp-1.4.0
nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic OBJDIR=output
- name: Build wheels
uses: pypa/cibuildwheel@v2.15.0
uses: pypa/cibuildwheel@v2.16.5
with:
package-dir: .
env:
CIBW_BUILD: "cp3*"
CIBW_BUILD_FRONTEND: "build"
CIBW_SKIP: "cp36-* cp37-*"
CIBW_SKIP: "cp36-* cp37-* cp38-*"
CIBW_ARCHS: "native"
CIBW_ENVIRONMENT: >
GOARCH=amd64
Expand Down

0 comments on commit 85a4218

Please sign in to comment.