From 7962d7945baa4cbccd380fdb3e552f49a337c0af Mon Sep 17 00:00:00 2001 From: ijl Date: Sun, 6 Aug 2023 18:18:00 +0000 Subject: [PATCH] CI for Python 3.12, 32-bit Windows --- .github/workflows/linux.yaml | 2 + README.md | 6 +- ci/azure-pipelines.yml | 139 ++++++++++++++++++++++++++++++++++- ci/azure-win.yml | 9 ++- 4 files changed, 146 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 6365d520..b82df45b 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -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' }, @@ -108,6 +109,7 @@ jobs: fail-fast: false matrix: python: [ + { version: '3.12' }, { version: '3.11' }, { version: '3.10' }, { version: '3.9' }, diff --git a/README.md b/README.md index 8b1fc0ae..3c12007f 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 35af4c32..f64211ab 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -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 @@ -24,7 +39,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.11.0' + versionSpec: '3.11.4' addToPath: true allowUnstable: true - checkout: self @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/ci/azure-win.yml b/ci/azure-win.yml index bad5950d..cd23e856 100644 --- a/ci/azure-win.yml +++ b/ci/azure-win.yml @@ -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