Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-armv7-musleabihf-prebuilt-release #578

Merged
merged 17 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,35 @@ jobs:
override: true
- name: Typos check with custom config file
uses: crate-ci/typos@master

cross-check:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- runner: ubuntu-20.04
target: i686-unknown-linux-gnu
- runner: ubuntu-20.04
target: aarch64-unknown-linux-gnu
- runner: ubuntu-20.04
target: aarch64-unknown-linux-musl
- runner: ubuntu-20.04
target: armv7-unknown-linux-musleabihf
- runner: macos-12
target: aarch64-apple-darwin
- runner: macos-12
target: x86_64-apple-darwin
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: r7kamura/[email protected]
- name: "Add toolchains"
run: rustup target add ${{ matrix.platform.target }}
- name: "Build"
uses: actions-rs/cargo@v1
with:
use-cross: true
command: check
args: --target ${{ matrix.platform.target }} -p dora-cli
170 changes: 134 additions & 36 deletions .github/workflows/pip-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,135 @@ on:
types:
- "published"
workflow_dispatch:
push:
branches:
- main
pull_request:

permissions:
contents: write

jobs:
linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64, x86, aarch64]
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: armv7
phil-opp marked this conversation as resolved.
Show resolved Hide resolved
# - runner: ubuntu-latest
# target: s390x
# - runner: ubuntu-latest
# target: ppc64le
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: |
pip install patchelf --upgrade
python-version: 3.8
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out dist --zig
sccache: "true"
manylinux: auto
working-directory: apis/python/node
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: apis/python/node/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
tag: ${{ github.ref }}
file_glob: true

musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --zig
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: "true"
working-directory: apis/python/node
manylinux: musllinux_1_2
working-directory: apis/python/node
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: apis/python/node/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
tag: ${{ github.ref }}
file_glob: true

musleabi:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
[
{
target: "armv7-unknown-linux-musleabihf",
image_tag: "armv7-musleabihf",
},
]
container:
image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }}
env:
CFLAGS_armv7_unknown_linux_musleabihf: "-mfpu=vfpv3-d16"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: auto
container: off
args: --release -o dist
working-directory: apis/python/node
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v3
with:
name: wheels
name: wheels-musllinux-${{ matrix.platform.target }}
path: apis/python/node/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -61,29 +150,33 @@ jobs:
file_glob: true

windows:
runs-on: windows-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x64, x86]
platform:
- runner: windows-latest
target: x64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.7"
architecture: ${{ matrix.target }}
python-version: 3.8
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: "true"
working-directory: apis/python/node
- name: Upload wheels
uses: actions/upload-artifact@v3
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-windows-${{ matrix.platform.target }}
path: apis/python/node/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -92,28 +185,34 @@ jobs:
file_glob: true

macos:
runs-on: macos-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64, aarch64]
platform:
- runner: macos-12
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: 3.8
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: "true"
working-directory: apis/python/node
- name: Upload wheels
uses: actions/upload-artifact@v3
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-macos-${{ matrix.platform.target }}
path: apis/python/node/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -132,6 +231,7 @@ jobs:
args: --out dist
working-directory: apis/python/node
- name: Upload sdist
if: github.event_name == 'release'
uses: actions/upload-artifact@v3
with:
name: wheels
Expand All @@ -140,16 +240,14 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
needs: [linux, musllinux, musleabi, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_PASS }}
with:
command: upload
args: --skip-existing *
args: --non-interactive --skip-existing wheels-*/*
Loading
Loading