Skip to content

Commit

Permalink
Merge pull request #9 from diceroll123/patch-2
Browse files Browse the repository at this point in the history
Try to fix CI
  • Loading branch information
nathanielfernandes authored Jan 13, 2024
2 parents e6d7f6c + 889bbfd commit 97507f6
Showing 1 changed file with 194 additions and 31 deletions.
225 changes: 194 additions & 31 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,229 @@
name: CI

on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:

# for linux
# sudo apt install pkg-config
push:
tags: ["v*"]

jobs:
linux:
runs-on: ubuntu-latest
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform:
- target: x86_64-pc-windows-msvc
arch: x64
- target: i686-pc-windows-msvc
arch: x86
- target: aarch64-pc-windows-msvc
arch: x64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.arch }}
- name: "Build wheels - windows"
uses: PyO3/maturin-action@v1
with:
args: --release -i python${{ matrix.python-version }} --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

- name: Install Perl
run: sudo apt-get install perl
macos-x86_64:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - x86_64"
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release -i python${{ matrix.python-version }} --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

- name: Install Make
run: sudo apt-get install make
macos-universal:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - universal"
uses: PyO3/maturin-action@v1
with:
args: --release -i python${{ matrix.python-version }} --target universal2-apple-darwin --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

- name: Maturin Build
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - linux"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
command: build
args: --release -o dist --find-interpreter
args: --release -i python${{ matrix.python-version }} -o dist
before-script-linux: |
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config
fi
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

windows:
runs-on: windows-latest
linux-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform:
- target: aarch64-unknown-linux-gnu
arch: aarch64
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16
- target: armv7-unknown-linux-gnueabihf
arch: armv7
- target: s390x-unknown-linux-gnu
arch: s390x
- target: powerpc64le-unknown-linux-gnu
arch: ppc64le
- target: powerpc64-unknown-linux-gnu
arch: ppc64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Maturin Build
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - linux-cross"
uses: PyO3/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release -i python${{ matrix.python-version }} -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

macos:
runs-on: macos-latest
musllinux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - musllinux"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release -i python${{ matrix.python-version }} -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

- name: Maturin Build
musllinux-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16
- target: armv7-unknown-linux-musleabihf
arch: armv7
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Build wheels - musllinux-cross"
uses: PyO3/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release -i python${{ matrix.python-version }} -o dist
docker-options: ${{ matrix.platform.maturin_docker_options }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -77,7 +233,14 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
needs: [macos, windows, linux]
needs:
- linux
- linux-cross
- macos-x86_64
- macos-universal
- musllinux
- musllinux-cross
- windows
steps:
- uses: actions/download-artifact@v3
with:
Expand Down

0 comments on commit 97507f6

Please sign in to comment.