Skip to content

test: add ci job for s390x #768

test: add ci job for s390x

test: add ci job for s390x #768

name: Python Release Verify
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
PACKAGE_NAME: jsonschema_rs
PYTHON_ABI_VERSION: "3.10"
jobs:
wheel-smoke-test:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.10", "pypy3.11"]
name: Verify wheel for ${{ matrix.python-version }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Setup Python interpreter
run: |
uv python install ${{ matrix.python-version }}
interp=$(uv python find ${{ matrix.python-version }})
echo "PYTHON_INTERPRETER=$interp" >> "$GITHUB_ENV"
"$interp" --version
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build wheel
run: |
uvx --python "$PYTHON_INTERPRETER" maturin build --release -m crates/jsonschema-py/Cargo.toml --out dist --interpreter "$PYTHON_INTERPRETER"
- name: Install built wheel
run: |
uvx --python "$PYTHON_INTERPRETER" --with dist/${{ env.PACKAGE_NAME }}-*.whl python - <<'PY'
import jsonschema_rs
schema = {'type': 'object', 'properties': {'name': {'type': 'string'}}}
assert jsonschema_rs.is_valid(schema, {'name': 'test'}), 'Valid instance failed'
assert not jsonschema_rs.is_valid(schema, {'name': 123}), 'Invalid instance passed'
print('Validation tests passed!')
PY
cross-compile-check:
runs-on: ubuntu-24.04
timeout-minutes: 30
name: Verify cross-compilation for aarch64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_ABI_VERSION }}
- name: Build wheel for aarch64
uses: messense/maturin-action@v1
with:
target: aarch64
manylinux: 2_28
args: --release -m crates/jsonschema-py/Cargo.toml --out dist --interpreter ${{ env.PYTHON_ABI_VERSION }}