Skip to content

Commit

Permalink
Add releases products (and pypi) for aarch64-apple-darwin (M1 Macs), ...
Browse files Browse the repository at this point in the history
  • Loading branch information
fxpineau committed Oct 10, 2022
1 parent aaf74de commit 304239c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 33 deletions.
85 changes: 56 additions & 29 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,42 +32,69 @@ jobs:
# Decomment if 32 bit asked one day...
#build-linux32-wheels:
# runs-on: ubuntu-latest
# # CentOS 7 32 bits Docker Hub image that 'build-linux-wheels' executes in.
# # See https://github.com/pypa/manylinux for this particular container:
# # * CPython 3.5, 3.6, 3.7, 3.8, 3.9 and 3.10, installed in /opt/python/<python tag>-<abi tag>
# container: quay.io/pypa/manylinux2014_i686
# steps:
# - name: "Checkout the full project"
# uses: actions/checkout@v1
# - name: "Install Rust"
# run: |
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-host i686-unknown-linux-gnu -y
# - name: "Build and publish wheels"
# shell: bash
# env:
# MATURIN_USERNAME: ${{ secrets.PYPI_USERNAME_FXP }}
# MATURIN_PASSWORD: ${{ secrets.PYPI_PASSWORD_FXP }}
# run: |
# source $HOME/.cargo/env
# cd crates/cli
# for PYBIN in /opt/python/cp38*/bin; do
# "${PYBIN}/pip" install maturin
# "${PYBIN}/maturin" publish -i "${PYBIN}/python" --skip-existing --no-sdist --manylinux 2014 --username "$MATURIN_USERNAME"
# done
build-linux32-wheels:
runs-on: ubuntu-latest
# CentOS 7 32 bits Docker Hub image that 'build-linux-wheels' executes in.
# See https://github.com/pypa/manylinux for this particular container:
# * CPython 3.5, 3.6, 3.7, 3.8, 3.9 and 3.10, installed in /opt/python/<python tag>-<abi tag>
container: quay.io/pypa/manylinux2014_i686
steps:
- name: "Checkout the full project"
uses: actions/checkout@v1
- name: "Install Rust"
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-host i686-unknown-linux-gnu -y
- name: "Build and publish wheels"
shell: bash
env:
MATURIN_USERNAME: ${{ secrets.PYPI_USERNAME_FXP }}
MATURIN_PASSWORD: ${{ secrets.PYPI_PASSWORD_FXP }}
run: |
source $HOME/.cargo/env
cd crates/cli
for PYBIN in /opt/python/cp38*/bin; do
"${PYBIN}/pip" install maturin
"${PYBIN}/maturin" publish -i "${PYBIN}/python" --skip-existing --no-sdist --manylinux 2014 --username "$MATURIN_USERNAME"
done
# Deploy for Windows and MoxOS 64 bits.
# If Windows 32 bits neede, check e.g. https://github.com/marketplace/actions/setup-msys2
build-macos-and-windows-wheels:
# Deploy for Windows 64 bits.
# If Windows 32 bits needed, check e.g. https://github.com/marketplace/actions/setup-msys2
build-windows-wheels:
runs-on: ${{ matrix.os }}
strategy:
# Run all matrix jobs even if one is failling (default behaviour is to stop all jobs)
# To be changed when option --skip-existing will be available in maturin
fail-fast: false
matrix:
os: [windows-latest, macOS-latest]
os: [windows-latest]
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish wheel for Python ${{ matrix.python-version }} on ${{ matrix.os }}
# We do not use environement variable for user, because it seems that the way of providing it in the command
# line is not the same for macos and for windows. We should create 2 different actions (see
# https://docs.github.com/en/actions/reference/encrypted-secrets )
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASSWORD_FXP }}
run: |
pip install maturin
cd crates/cli
maturin publish --interpreter python${{matrix.python_version}} --skip-existing --no-sdist --username fxpineau
# Deploy for MocOS 64 bits both X86 and aarch64.
build-macos-wheels:
runs-on: ${{ matrix.os }}
strategy:
# Run all matrix jobs even if one is failling (default behaviour is to stop all jobs)
# To be changed when option --skip-existing will be available in maturin
fail-fast: false
matrix:
os: [macOS-latest]
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
Expand All @@ -84,5 +111,5 @@ jobs:
run: |
pip install maturin
cd crates/cli
maturin publish --interpreter python${{matrix.python_version}} --skip-existing --no-sdist --username fxpineau
maturin publish --interpreter python${{matrix.python_version}} --universal2 --skip-existing --no-sdist --username fxpineau
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ jobs:
# Linux
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: aarch64-unknown-linux-gnu }
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: arm-unknown-linux-gnueabi }
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: armv7-unknown-linux-gnueabihf }
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: mips64el-unknown-linux-gnuabi64 }
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: powerpc64le-unknown-linux-gnu }
##- { os: ubuntu-latest, cross: true, toolchain: stable, target: i686-unknown-linux-musl }
##- { os: ubuntu-latest, cross: true, toolchain: stable, target: i686-unknown-linux-gnu }
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: i686-unknown-linux-gnu }
#- { os: ubuntu-latest, cross: false, toolchain: stable, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-latest, cross: true, toolchain: stable, target: armv7-unknown-linux-gnueabihf }
- { os: ubuntu-latest, cross: true, toolchain: stable, target: i686-unknown-linux-musl }
- { os: ubuntu-latest, cross: true, toolchain: stable, target: x86_64-unknown-linux-musl }
##- { os: ubuntu-latest, cross: false, toolchain: stable, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-latest, cross: true, toolchain: stable, target: aarch64-unknown-linux-musl }
# Android
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: aarch64-linux-android }
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: arm-linux-androideabi }
Expand All @@ -56,6 +57,7 @@ jobs:
#- { os: ubuntu-latest, cross: true, toolchain: stable, target: x86_64-linux-android }
# Macos
- { os: macos-latest, cross: false, toolchain: stable, target: x86_64-apple-darwin }
- { os: macos-latest, cross: false, toolchain: stable, target: aarch64-apple-darwin }
# iOS
#- { os: macos-latest, cross: false, toolchain: stable, target: aarch64-apple-ios }
#- { os: macos-latest, cross: false, toolchain: stable, target: x86_64-apple-ios }
Expand Down

0 comments on commit 304239c

Please sign in to comment.