Skip to content

Commit

Permalink
CI for Python 3.12, 32-bit Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Aug 6, 2023
1 parent b74194f commit 7962d79
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
fail-fast: false
matrix:
python: [
{ version: '3.12', abi: 'cp312-cp312' },
{ version: '3.11', abi: 'cp311-cp311' },
{ version: '3.10', abi: 'cp310-cp310' },
{ version: '3.9', abi: 'cp39-cp39' },
Expand Down Expand Up @@ -108,6 +109,7 @@ jobs:
fail-fast: false
matrix:
python: [
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
{ version: '3.9' },
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ support for 64-bit
file-like objects

orjson supports CPython 3.7, 3.8, 3.9, 3.10, and 3.11. It distributes
x86_64/amd64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux,
amd64 and aarch64 wheels for macOS, and amd64 wheels for Windows.
amd64/x86_64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux,
amd64 and aarch64 wheels for macOS, and amd64 and i686/x86 wheels for Windows.
orjson does not support PyPy. Releases follow semantic versioning and
serializing a new object type without an opt-in flag is considered a
breaking change.
Expand Down Expand Up @@ -1201,7 +1201,7 @@ breaking changes.

orjson is tested for amd64, aarch64, arm7, ppc64le, and s390x on Linux. It
is tested for amd64 on macOS and cross-compiles for aarch64. For Windows
it is tested on amd64.
it is tested on amd64 and i686.

There are no runtime dependencies other than libc.

Expand Down
139 changes: 136 additions & 3 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ jobs:
- checkout: self
- template: ./azure-debug.yml

- job: macos_python312_univeral2
pool:
vmImage: macOS-11
variables:
interpreter: python3.12
macosx_deployment_target: '10.15'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.0-beta.4'
addToPath: true
allowUnstable: true
- checkout: self
- template: ./azure-macos.yml

- job: macos_python311_univeral2
pool:
vmImage: macOS-11
Expand All @@ -24,7 +39,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11.0'
versionSpec: '3.11.4'
addToPath: true
allowUnstable: true
- checkout: self
Expand Down Expand Up @@ -86,16 +101,34 @@ jobs:
- checkout: self
- template: ./azure-macos.yml

- job: win_python312_amd64
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.12.0-beta.4\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.0-beta.4'
addToPath: true
allowUnstable: true
architecture: 'x64'
- checkout: self
- template: ./azure-win.yml

- job: win_python311_amd64
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.11.0\x64\python.exe
interpreter: C:\hostedtoolcache\windows\Python\3.11.4\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11.0'
versionSpec: '3.11.4'
addToPath: true
architecture: 'x64'
- checkout: self
Expand All @@ -106,6 +139,7 @@ jobs:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.10.8\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
Expand All @@ -121,6 +155,7 @@ jobs:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
Expand All @@ -136,6 +171,7 @@ jobs:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.8.10\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
Expand All @@ -151,6 +187,7 @@ jobs:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
Expand All @@ -160,3 +197,99 @@ jobs:
architecture: 'x64'
- checkout: self
- template: ./azure-win.yml

- job: win_python312_x86
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.12.0-beta.4\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.0-beta.4'
addToPath: true
allowUnstable: true
architecture: 'x86'
- checkout: self

- job: win_python311_x86
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.11.4\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11.4'
addToPath: true
architecture: 'x86'
- checkout: self
- template: ./azure-win.yml

- job: win_python310_x86
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.10.8\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10.8'
addToPath: true
architecture: 'x86'
- checkout: self
- template: ./azure-win.yml

- job: win_python39_x86
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.9.13\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9.13'
addToPath: true
architecture: 'x86'
- checkout: self
- template: ./azure-win.yml

- job: win_python38_x86
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.8.10\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8.10'
addToPath: true
architecture: 'x86'
- checkout: self
- template: ./azure-win.yml

- job: win_python37_x86
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.7.9\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7.9'
addToPath: true
architecture: 'x86'
- checkout: self
- template: ./azure-win.yml
9 changes: 5 additions & 4 deletions ci/azure-win.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
parameters:
interpreter: ''
rustup: ''
target: ''
toolchain: ''

steps:
- script: |
curl https://win.rustup.rs/x86_64 -o rustup-init.exe
rustup-init.exe -y --default-host $(target) --default-toolchain $(toolchain) --profile minimal
curl $(rustup) -o rustup-init.exe
rustup-init.exe -y --default-host $(target) --default-toolchain $(toolchain)-$(target) --profile minimal
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
rustup default $(toolchain)
rustup default $(toolchain)-$(target)
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
displayName: rustup
- script: python.exe -m pip install --upgrade pip "maturin>=1,<2" wheel
displayName: build dependencies
- script: python.exe -m pip install -r test\requirements.txt -r integration\requirements.txt
displayName: test dependencies
- script: maturin.exe build --release --features=no-panic,yyjson --strip --interpreter $(interpreter)
- script: maturin.exe build --release --features=no-panic,yyjson --strip --interpreter $(interpreter) --target $(target)
displayName: build
- script: python.exe -m pip install orjson --no-index --find-links=D:\a\1\s\target\wheels
displayName: install
Expand Down

0 comments on commit 7962d79

Please # to comment.