Update CI -7 release #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ceylon-Release | |
on: | |
push: | |
branches: | |
- release | |
tags: | |
- 'v*' | |
permissions: | |
contents: read | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
target: [x86_64, i686] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup GCC | |
uses: egor-tensin/[email protected] | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }}-unknown-linux-gnu | |
- name: Install OpenSSL and other dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libssl-dev pkg-config | |
pip install uniffi-bindgen maturin | |
- name: Set OpenSSL environment variables | |
run: | | |
echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV | |
echo "OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV | |
echo "OPENSSL_INCLUDE_DIR=/usr/include/openssl" >> $GITHUB_ENV | |
- name: Build Wheels | |
run: | | |
cd bindings/ceylon | |
cargo build --verbose | |
maturin build --release --out dist -i python${{ matrix.python-version }} --verbose | |
env: | |
RUST_BACKTRACE: full | |
- name: List build artifacts | |
run: ls -R bindings/ceylon/dist | |
- name: Install build wheel | |
if: matrix.target == 'x86_64' | |
run: | | |
pip install --force-reinstall bindings/ceylon/dist/ceylon*.whl | |
python -c 'import ceylon; print(ceylon.__file__)' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels | |
path: bindings/ceylon/dist | |
macos: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
matrix: | |
platform: | |
- runner: macos-latest | |
target: x86_64 | |
- runner: macos-14 | |
target: aarch64 | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
brew install openssl@3 | |
pip install uniffi-bindgen maturin | |
- name: Set OpenSSL environment variables | |
run: | | |
echo "OPENSSL_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV | |
echo "OPENSSL_INCLUDE_DIR=$(brew --prefix openssl@3)/include" >> $GITHUB_ENV | |
echo "OPENSSL_LIB_DIR=$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV | |
- name: Build wheels | |
run: | | |
cd bindings/ceylon | |
maturin build --release --out dist -i python${{ matrix.python-version }} --verbose | |
- name: Install build wheel | |
run: | | |
pip install --force-reinstall bindings/ceylon/dist/ceylon*.whl | |
python -c 'import ceylon; print(ceylon.__file__)' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels | |
path: bindings/ceylon/dist | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
target: [x64, x86] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.target }} | |
- name: Install dependencies | |
run: | | |
pip install uniffi-bindgen maturin | |
- name: Build wheels | |
run: | | |
cd bindings/ceylon | |
maturin build --release --out dist -i python${{ matrix.python-version }} --verbose | |
- name: Install build wheel | |
shell: bash | |
run: | | |
pip install --force-reinstall bindings/ceylon/dist/ceylon*.whl | |
python -c 'import ceylon; print(ceylon.__file__)' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels | |
path: bindings/ceylon/dist | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [linux, macos, windows] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: wheels | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Publish to PyPI | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
with: | |
command: upload | |
args: --non-interactive --skip-existing * |