Skip to content

Commit

Permalink
Release: testing env for JSONs
Browse files Browse the repository at this point in the history
  • Loading branch information
dvmarcilio committed Jul 12, 2024
1 parent 129dd1b commit e85b878
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/polyglot_release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Release Polyglot Piranha
on:
workflow_dispatch:
env:
# We suspect we need 20.04 due to glibc not being new enough on Debian/devpod.
os_json: '{"linux-x86":"ubuntu-20.04","linux-arm":"ubuntu-latest","macos-arm":"macos-latest"}'
# many_linux_2_28 is compatible with Debian 10: https://github.com/pypa/manylinux/tree/8e297ac3813be400a9a244a2828c18d3dd7e6969?tab=readme-ov-file#manylinux_2_28-almalinux-8-based
target_json: '{"linux-x86":"manylinux_2_28","linux-arm":"aarch64-unknown-linux-gnu","macos-arm":"universal2-apple-darwin"}'
jobs:
release:
strategy:
matrix:
target: [linux-x86, linux-arm, macos-arm]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
# We suspect we need 20.04 due to glibc not being new enough on Debian/devpod.
runs-on: ${{ fromJSON('{"linux-x86":"ubuntu-20.04","linux-arm":"ubuntu-latest","macos-arm":"macos-latest"}')[matrix.target] }}
runs-on: ${{ fromJSON(env.os_json)[matrix.target] }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -32,18 +36,10 @@ jobs:
run: |
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
- name: Build wheel with Maturin linux x86
- name: Build wheel with Maturin ${{ matrix.target }}
if: ${{ matrix.target == 'linux-x86' }}
run: |
maturin build --release -o dist -i ${{ matrix.python-version }}
- name: Build wheel with Maturin linux arm
if: ${{ matrix.target == 'linux-arm' }}
run: |
maturin build --release -o dist --target aarch64-unknown-linux-gnu -i ${{ matrix.python-version }}
- name: Build wheel with Maturin macOS
if: ${{ matrix.target == 'macos-arm' }}
run: |
maturin build --release -o dist --target universal2-apple-darwin -i ${{ matrix.python-version }}
maturin build --release -o dist --target ${{ fromJSON(env.target_json)matrix.target] }} -i ${{ matrix.python-version }}
- name: Build source distribution
if: ${{ matrix.target == 'linux-x86' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
]
name = "piranha"
description = "Polyglot Piranha is a library for performing structural find and replace with deep cleanup."
version = "0.3.252-alpha"
version = "0.3.253-alpha"
edition = "2021"
include = ["pyproject.toml", "src/"]
exclude = ["legacy"]
Expand Down

0 comments on commit e85b878

Please sign in to comment.