Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
joostvanzwieten committed May 7, 2024
1 parent a865dcb commit 1f3174e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
for ibuild, input in enumerate(targets):
test_runner = False
test_container = False
maturin_manylinux = 'auto'
if input['python'].startswith('cp3'):
python_version = '3.' + input['python'][3:]
Expand All @@ -67,15 +68,20 @@ jobs:
python_arch = 'x64'
if input['os'] == 'musllinux':
maturin_target = f'{arch}-unknown-linux-musl'
maturin_manylinux = 'musllinux_1_1'
else:
maturin_target = arch
maturin_manylinux = 'manylinux_2_17'
if (input['os'] == 'musllinux' or arch != 'x86_64') and input.get('test', True):
if arch not in ('x86_64', 'aarch64', 'i686'):
print(f'input: {json.dumps(input)}')
print(f'::error::no test container defined for arch {arch}')
raise SystemExit(1)
tag = dict(linux='manylinux_2_28', musllinux='musllinux_1_2')[input['os']]
test_container = f'quay.io/pypa/{tag}_{arch}'
if maturin_manylinux == 'manylinux_2_17':
# see https://peps.python.org/pep-0600/#legacy-manylinux-tags
test_container = f'quay.io/pypa/manylinux2014_{arch}'
else:
test_container = f'quay.io/pypa/{maturin_manylinux}_{arch}'
elif input['os'] == 'macos':
runner_os = 'macos-latest'
python_arch = 'arm64'
Expand Down Expand Up @@ -109,11 +115,12 @@ jobs:
'python-version': python_version,
'python-arch': python_arch,
'maturin-target': maturin_target,
'maturin-manylinux': maturin_manylinux,
'test-runner': test_runner,
'test-container': test_container,
'artifact': f'_workflow_maturin_binary_{ibuild}',
}
del runner_os, python_version, python_arch, maturin_target, test_runner, test_container
del runner_os, python_version, python_arch, maturin_target, maturin_manylinux, test_runner, test_container
build_matrix.append(output)
print(json.dumps(output))
Expand All @@ -136,7 +143,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.maturin-target }}
manylinux: auto
manylinux: ${{ matrix.maturin-manylinux }}
args: --release
- name: Locate wheel
id: locate-wheel
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- release/*
- test
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
Expand Down

0 comments on commit 1f3174e

Please sign in to comment.