Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resurrect release-1.15 CI #3

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
on: push
on:
push:
pull_request:
types: [ opened, synchronize, reopened ]

jobs:
sdist:
runs-on: ubuntu-20.04
steps:
- name: clone repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: build sdist
run: |
Expand All @@ -14,14 +17,15 @@ jobs:
python -m build --sdist

- name: upload sdist artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: dist
if-no-files-found: error

linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- spec: cp27-manylinux_x86_64
Expand Down Expand Up @@ -70,7 +74,7 @@ jobs:
test_args: '{project}/c'
steps:
- name: clone repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: configure docker foreign arch support
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -104,7 +108,7 @@ jobs:


- name: upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: dist
if-no-files-found: error
Expand All @@ -114,8 +118,9 @@ jobs:
defaults:
run:
shell: ${{ matrix.run_wrapper || 'bash --noprofile --norc -eo pipefail {0}' }}
runs-on: ${{ matrix.runs_on || 'macos-10.15' }}
runs-on: ${{ matrix.runs_on || 'macos-11' }}
strategy:
fail-fast: false
matrix:
include:
# build for x86_64 under the default hosted macOS 10.x x86_64 runner
Expand All @@ -131,31 +136,42 @@ jobs:
# FIXME: ? cp38-macosx_arm64 requires special handling and fails some test_zdist tests under cibw 2.1.2, skip it (so Apple's XCode python3 won't have a wheel)
- spec: cp39-macosx_arm64
deployment_target: '11.0'
runs_on: [self-hosted, macOS]
runs_on:
- ${{ vars.run_macos_arm64_jobs == 'true' && 'self-hosted' || 'ubuntu-latest' }}
- ${{ vars.run_macos_arm64_jobs == 'true' && 'macOS' || 'ubuntu-latest' }}
maybe_skip: ${{ vars.run_macos_arm64_jobs != 'true' && 'skip' }}
run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
sdkroot: macosx11.3

- spec: cp310-macosx_arm64
deployment_target: '11.0'
runs_on: [self-hosted, macOS]
runs_on:
- ${{ vars.run_macos_arm64_jobs == 'true' && 'self-hosted' || 'ubuntu-latest' }}
- ${{ vars.run_macos_arm64_jobs == 'true' && 'macOS' || 'ubuntu-latest' }}
maybe_skip: ${{ vars.run_macos_arm64_jobs != 'true' && 'skip' }}
run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
sdkroot: macosx11.3

- spec: cp311-macosx_arm64
deployment_target: '11.0'
runs_on: [self-hosted, macOS]
runs_on:
- ${{ vars.run_macos_arm64_jobs == 'true' && 'self-hosted' || 'ubuntu-latest' }}
- ${{ vars.run_macos_arm64_jobs == 'true' && 'macOS' || 'ubuntu-latest' }}
maybe_skip: ${{ vars.run_macos_arm64_jobs != 'true' && 'skip' }}
run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
sdkroot: macosx11.3


steps:
- name: clone repo
uses: actions/checkout@v2
if: ${{ matrix.maybe_skip != 'skip' }}

- name: build wheel prereqs
run: |
/usr/bin/pip3 install --user --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
brew uninstall --ignore-dependencies libffi || true
if: ${{ matrix.maybe_skip != 'skip' }}

- name: build/test wheels
env:
Expand All @@ -175,16 +191,19 @@ jobs:
fi

/usr/bin/python3 -m cibuildwheel --output-dir dist
if: ${{ matrix.maybe_skip != 'skip' }}

- name: upload artifacts
uses: actions/upload-artifact@v2
with:
path: dist
if-no-files-found: error
if: ${{ matrix.maybe_skip != 'skip' }}

windows:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- spec: cp27-win_amd64
Expand All @@ -205,7 +224,7 @@ jobs:
- spec: cp311-win32
steps:
- name: clone repo
uses: actions/checkout@v2
uses: actions/checkout@v4

# HACK: MS killed this SDK support package and removed downloads, as did chocolatey, install from a private archive
- name: install Windows Python 2.7 SDK
Expand Down Expand Up @@ -234,7 +253,7 @@ jobs:
shell: bash

- name: upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: dist
if-no-files-found: error
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/
/dist/
*.py[cod]
__pycache__/
*.egg-info/
*.so
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Testing/development tips

To run tests under CPython, run::

pip install pytest # if you don't have py.test already
pip install pytest # if you don't have pytest already
pip install pycparser
python setup.py build_ext -f -i
py.test c/ testing/
pytest c/ testing/

If you run in another directory (either the tests or another program),
you should use the environment variable ``PYTHONPATH=/path`` to point
Expand Down
Loading
Loading