Skip to content

Commit

Permalink
Add macOS arm64 support and use latest runners for cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier2k6 committed Feb 10, 2024
1 parent 3770d17 commit 2f7aaa1
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
install_cibuildwheel_script:
- $PYTHON -m pip install cibuildwheel==2.16.3
- $PYTHON -m pip install cibuildwheel==2.16.5

run_cibuildwheel_script:
- cibuildwheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ jobs:
MATRIX_PULL_REQUEST: |
{
"include": [
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-12", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2022", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"}
{"os": "ubuntu-latest", "python": "39", "platform_id": "manylinux_x86_64"},
{"os": "ubuntu-latest", "python": "39", "platform_id": "musllinux_x86_64"},
{"os": "macos-latest", "python": "39", "platform_id": "macosx_x86_64"},
{"os": "macos-latest", "python": "39", "platform_id": "macosx_arm64"},
{"os": "windows-latest", "python": "39", "platform_id": "win_amd64"}
]
}
MATRIX_WORKFLOW_DISPATCH: |
Expand All @@ -58,9 +59,10 @@ jobs:
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "macos-12", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"},
{"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"}
{"os": "macos-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-latest", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "arm64"},
{"os": "windows-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"},
{"os": "windows-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"}
]
}
Expand All @@ -86,25 +88,27 @@ jobs:

env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.CIBW_BUILD }}
CIBW_ARCHS: ${{ matrix.CIBW_ARCHS }}
CIBW_ARCHS_LINUX: "x86_64, aarch64"
CIBW_ARCHS_MACOS: "x86_64, arm64"
CIBW_ARCHS_WINDOWS: "32, 64"
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_TEST_SKIP: "*-win32"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache-wheel
with:
path: wheelhouse
key: wheel-${{ matrix.CIBW_BUILD }}-${{ matrix.CIBW_ARCHS }}-${{ github.sha }}

- uses: docker/setup-qemu-action@v2
- uses: docker/setup-qemu-action@v3
if: steps.cache-wheel.outputs.cache-hit != 'true' && runner.os == 'Linux'

- uses: pypa/cibuildwheel@v2.12.3
- uses: pypa/cibuildwheel@v2.16.5
if: steps.cache-wheel.outputs.cache-hit != 'true'

- uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -36,27 +36,27 @@ jobs:
- name: After Prepare (cpp)
if: ${{ matrix.language == 'cpp' }}
run: 'wget -q "https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2-linux-x86_64.tar.gz"
run: 'wget -q "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz"
tar xzf cmake-3.21.2-linux-x86_64.tar.gz
tar xzf cmake-3.28.3-linux-x86_64.tar.gz
'

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Build cpp
if: ${{ matrix.language == 'cpp' }}
run: './cmake-3.21.2-linux-x86_64/bin/cmake -Dbuild_examples=ON -Dbuild_tests=ON -Dbuild_tools=ON -GNinja .
run: './cmake-3.28.3-linux-x86_64/bin/cmake -Dbuild_examples=ON -Dbuild_tests=ON -Dbuild_tools=ON -GNinja .
./cmake-3.21.2-linux-x86_64/bin/cmake --build .
./cmake-3.28.3-linux-x86_64/bin/cmake --build .
'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: update package lists
continue-on-error: true
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
# TODO: matrix across python version and os
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1

build:
name: build
Expand All @@ -34,7 +34,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
b2 ${{ matrix.config }} -l500 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests
- name: run tests (flaky)
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
retry_wait_seconds: 4
Expand All @@ -263,7 +263,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -331,9 +331,9 @@ jobs:
- name: build tarball
run: AAFIGURE=~/.local/bin/aafigure RST2HTML=rst2html make dist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: tarball
name: tarball-${{ matrix.os }}
path: libtorrent-rasterbar-*.tar.gz

- name: test-tarball (b2 install)
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -41,7 +41,7 @@ jobs:
run: (cd test; b2 ${{ matrix.config }} -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests)

- name: run tests (flaky)
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
retry_wait_seconds: 1
Expand All @@ -55,7 +55,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -114,7 +114,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
os: [ubuntu-20.04, macos-latest, windows-latest ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: install openssl (windows)
if: runner.os == 'Windows'
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
shell: cmd
timeout_minutes: 5
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: install openssl (64 bit)
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
retry_wait_seconds: 4
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
b2 --hash release address-model=64 link=static debug-iterators=off invariant-checks=on define=BOOST_ASIO_DISABLE_IOCP asserts=on testing.execute=off
- name: run sims
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 3
timeout_minutes: 120
Expand All @@ -138,7 +138,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -149,7 +149,7 @@ jobs:
bootstrap.bat
- name: install openssl (64 bit)
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
retry_wait_seconds: 4
Expand Down Expand Up @@ -195,12 +195,12 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: install openssl (64 bit)
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
retry_wait_seconds: 4
Expand Down
Loading

0 comments on commit 2f7aaa1

Please sign in to comment.