Skip to content

Commit 1e5d457

Browse files
committed
py3.13 runtime
1 parent 3d9d7c0 commit 1e5d457

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,43 @@ jobs:
55
weasyprint-build:
66
name: Build WeasyPrint
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
version: ["3.12", "3.13"]
11+
env:
12+
RUNTIME: ${{ matrix.version }}
813
steps:
914
- uses: actions/checkout@v4
1015
- name: Build Layer
11-
run: make build/weasyprint-layer-python3.12.zip
16+
run: make build/weasyprint-layer-python${{ matrix.version }}.zip
1217
- name: Test weasyprint
1318
run: |
1419
mkdir output
1520
make test.start.container &
1621
sleep 1
17-
TEST_FILENAME=output/report.pdf make test.print.report
22+
make test.print.report
1823
rm -rf build/opt
24+
env:
25+
TEST_FILENAME: build/test-report-${{ matrix.version }}.pdf
1926
- name: Upload Build
2027
uses: actions/upload-artifact@v4
2128
with:
22-
name: WeasyPrint Layer Build
29+
name: WeasyPrint Layer Build ${{ matrix.version }}
2330
path: build
24-
- name: Upload Test PDF
25-
uses: actions/upload-artifact@v4
31+
weasyprint-release:
32+
name: Release WeasyPrint
33+
runs-on: ubuntu-latest
34+
needs: [weasyprint-build]
35+
if: startsWith(github.ref, 'refs/tags/weasyprint-')
36+
steps:
37+
- name: Download build
38+
uses: actions/download-artifact@v4
2639
with:
27-
name: WeasyPrint Test Results
28-
path: output
40+
path: artifacts
2941
- name: Create WeasyPrint Release
30-
if: startsWith(github.ref, 'refs/tags/weasyprint-')
3142
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
3243
with:
33-
files: |
34-
./build/weasyprint-layer-python3.12.zip
35-
./build/weasyprint-layer-python3.12-no-fonts.zip
44+
files: ./artifacts/**/weasyprint-layer-python*
3645

3746
ghostscript-build:
3847
name: Build GhostScript

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PLATFORM ?= linux/amd64
22
RUNTIME ?= 3.12
33
TEST_FILENAME ?= report.pdf
4-
DOCKER_RUN=docker run --rm --platform=${PLATFORM}
4+
DOCKER_RUN=docker run --rm --platform=${PLATFORM} -e RUNTIME_VERSION=${RUNTIME}
55

66
.PHONY: stack.deploy.weasyprint clean test.start.container test.print.report
77

weasyprint/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Build layer:
1717
$ make test.print.report
1818
# a report.pdf file will generate to the current directory
1919

20+
2021
Deploy layer:
2122

2223
$ aws lambda publish-layer-version \
@@ -32,6 +33,11 @@ Lambda must be configured with these env vars:
3233

3334
If you are using the release zip files ensure your Lambda instruction set architecture is set to `x86_64` and not `arm64`.
3435

36+
37+
To build a layer for python 3.13 use:
38+
39+
RUNTIME=3.13 make build/weasyprint-layer-python3.13.zip
40+
3541
## Docker Lambda
3642

3743
Build layer:

0 commit comments

Comments
 (0)