Skip to content

Commit

Permalink
Update CI for Python 3.10 wheels (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmang9 committed Jan 9, 2022
1 parent df1bd20 commit b0e9856
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 49 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/build-aarch64.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -29,27 +29,16 @@ jobs:
source venv/bin/activate
python -m pip install --upgrade pip
pip install wheel
pip install cibuildwheel==1.10.0
- name: Lint source with flake8
run: |
source venv/bin/activate
pip install flake8
flake8 tests setup.py
- name: Lint source with mypy
run: |
source venv/bin/activate
pip install mypy
mypy --config-file mypi.ini setup.py tests
pip install cibuildwheel==2.3.1
- name: Build wheels and test
run: |
source venv/bin/activate
python -m cibuildwheel --output-dir dist
env:
# build python 3.7 and 3.8
CIBW_BUILD: 'cp37-* cp38-* cp39-*'
CIBW_BUILD: 'cp37-* cp38-* cp39-* cp310-*'
CIBW_SKIP: '*-musllinux_*'
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY_LINUX: 0
# we need boost
Expand Down
51 changes: 34 additions & 17 deletions .github/workflows/build-m1-wheel.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -21,29 +21,46 @@ jobs:
with:
fetch-depth: 0

- name: Lint source with flake8
- name: Ensure dependencies are present
run: |
arch -arm64 python -m pip install --upgrade pip
arch -arm64 pip install flake8
arch -arm64 flake8 tests setup.py
arch -arm64 brew install python@3.9
arch -arm64 brew install python@3.10
- name: Lint source with mypy
- name: Build ${{ matrix.os }} wheels
run: |
arch -arm64 pip install mypy
arch -arm64 mypy --config-file mypi.ini setup.py tests
- name: Build ${{ matrix.os }} wheels and test
run: |
arch -arm64 pip wheel -w dist .
arch -arm64 delocate-wheel -v dist/*.whl
rm -rf venv
arch -arm64 $(brew --prefix python@3.9)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip wheel -w dist --no-deps .
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp39*.whl
deactivate
rm -rf venv
arch -arm64 $(brew --prefix python@3.10)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip wheel -w dist --no-deps .
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp310*.whl
deactivate
rm -rf venv
- name: Test wheel
run: |
arch -arm64 python3 -m venv venv
. ./venv/bin/activate
arch -arm64 pip install ./dist/*.whl
rm -rf venv
arch -arm64 $(brew --prefix python@3.9)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip install ./dist/*cp39*.whl
arch -arm64 pip install pytest
arch -arm64 ./venv/bin/pytest -v ./tests
deactivate
rm -rf venv
arch -arm64 $(brew --prefix python@3.10)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip install ./dist/*cp310*.whl
arch -arm64 pip install pytest
arch -arm64 ./venv/bin/py.test -v ./tests -s
arch -arm64 ./venv/bin/pytest -v ./tests
deactivate
rm -rf venv
- name: Upload wheels
uses: actions/upload-artifact@v2
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build-test-cplusplus.yml
Expand Up @@ -10,10 +10,10 @@ jobs:

- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

- name: Checkout code
uses: actions/checkout@v2

Expand All @@ -32,16 +32,16 @@ jobs:
name: ASAN ubuntu
runs-on: ubuntu-20.04
steps:

- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

- name: Checkout code
uses: actions/checkout@v2

- name: cmake, RunTests with address- and undefined sanitizer on Ubuntu
run: |
sudo fallocate -l 16G /swapfile
Expand All @@ -62,13 +62,13 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

- name: Checkout code
uses: actions/checkout@v2

- name: cmake, RunTests with thread sanitizer on Ubuntu
run: |
mkdir build-tsan
Expand All @@ -84,7 +84,7 @@ jobs:

- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -97,4 +97,4 @@ jobs:
cd build-win
cmake ..
cmake --build . --config Release -j 6
ctest -C Release -j 6
ctest -C Release -j 6
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
python -m build --sdist --outdir dist .
- name: Build ${{ matrix.os }} wheels and test
uses: joerick/cibuildwheel@v2.2.2
uses: joerick/cibuildwheel@v2.3.1
with:
output-dir: dist
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-html-pdf.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-plot.yml
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Cancel previous runs on the same branch
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plot-k27-no-bitfield.yaml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plot-k27.yaml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down

0 comments on commit b0e9856

Please sign in to comment.