Skip to content

Commit

Permalink
Import tests and cibuildwheel from master
Browse files Browse the repository at this point in the history
  • Loading branch information
honnibal committed Jan 8, 2025
1 parent 5be7fa1 commit 6960d74
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 46 deletions.
48 changes: 12 additions & 36 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ jobs:
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, macos-13, macos-14, windows-2022]
os: [ubuntu-latest, windows-2022, macos-13, macos-14]

steps:
# See https://cibuildwheel.pypa.io/en/1.x/cpp_standards/
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v4
# This is crazy slow. We'll need to wait for arm Linux
# runners.
Expand All @@ -26,10 +28,19 @@ jobs:
# uses: docker/setup-qemu-action@v3
# with:
# platforms: all
- name: Debug env
run: env
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto
DISTUTILS_USE_SDK: 1
MSSdk: 1
AR: llvm-ar
AS: llvm-as
CC: clang
RANLIB: echo
CIBW_BUILD_VERBOSITY: 5
with:
package-dir: .
output-dir: wheelhouse
Expand All @@ -39,41 +50,6 @@ jobs:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_wheels_windows:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [windows]

steps:
- uses: actions/checkout@v4
# This is crazy slow. We'll need to wait for arm Linux
# runners.
# aarch64 (arm) is built via qemu emulation on Linux
#- name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v3
# with:
# platforms: all
- name: Install older LLVM
run: |
choco install llvm --version=15.0.7 --allow-downgrade
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto
with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl


build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: tests

on:
push:
#tags-ignore:
# - '**'
paths-ignore:
- "*.md"
pull_request:
Expand All @@ -20,13 +22,8 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-22, macos-13]
os: [ubuntu-latest, windows-latest]
python_version: ["3.9", "3.10", "3.11", "3.12"]
include:
- os: windows-2019
python_version: "3.6"
- os: ubuntu-20.04
python_version: "3.6"
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -43,7 +40,7 @@ jobs:
shell: bash
if: startsWith(matrix.os, 'windows')
run: |
choco install llvm --version=15.0.7 --allow-downgrade
choco install llvm
- name: Install dependencies
run: |
Expand Down Expand Up @@ -74,20 +71,23 @@ jobs:
- name: Build wheel (Linux / gcc-9)
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.7' || matrix.python_version == '3.8')
run: |
sudo apt update
sudo apt install gcc-9
gcc-9 --version
CC=gcc-9 python -m build --wheel
- name: Build wheel (Linux / gcc-10)
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.9'
run: |
sudo apt update
sudo apt install gcc-10
gcc-10 --version
CC=gcc-10 python -m build --wheel
- name: Build wheel (Linux / clang-13)
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.10'
run: |
clang-13 --version
CC=clang-13 python -m build --wheel
clang --version
CC=clang python -m build --wheel
- name: Build wheel (Linux / gcc)
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.11' || matrix.python_version == '3.12')
Expand Down

0 comments on commit 6960d74

Please sign in to comment.