Skip to content

Commit

Permalink
separate wheel name for each os
Browse files Browse the repository at this point in the history
  • Loading branch information
jalbrekt85 committed Jan 2, 2024
1 parent d1c99c9 commit dfde84c
Showing 1 changed file with 73 additions and 54 deletions.
127 changes: 73 additions & 54 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# from https://github.com/lambdaclass/cairo-rs/blob/new-poc-implementation/rust_python_ffi/.github/workflows/CI.yml
name: release

on: workflow_dispatch
Expand All @@ -7,80 +6,100 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install OpenSSL
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
- uses: actions/checkout@v3

- name: Verify OpenSSL Installation
run: |
dpkg -L libssl-dev
pkg-config --modversion openssl
pkg-config --libs --cflags openssl
openssl version
- name: Install OpenSSL
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

- name: Configure OpenSSL Environment Variables
run: |
echo "OPENSSL_DIR=$(pkg-config --variable=prefix openssl)" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=$(pkg-config --variable=libdir openssl)" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=$(pkg-config --variable=includedir openssl)" >> $GITHUB_ENV
- name: Verify OpenSSL Installation
run: |
dpkg -L libssl-dev
pkg-config --modversion openssl
pkg-config --libs --cflags openssl
openssl version
- name: Cleanup dist directory
run: rm -rf dist/
- name: Configure OpenSSL Environment Variables
run: |
echo "OPENSSL_DIR=$(pkg-config --variable=prefix openssl)" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=$(pkg-config --variable=libdir openssl)" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=$(pkg-config --variable=includedir openssl)" >> $GITHUB_ENV
- uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
- name: Cleanup dist directory
run: rm -rf dist/

- name: Build and Prepare Wheels
uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
args: --release -o dist --find-interpreter
- name: List built wheels
run: ls dist/
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-linux
path: dist

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install OpenSSL
run: choco install openssl
- uses: actions/checkout@v3
- name: Install OpenSSL
run: choco install openssl

- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
- name: Build and Prepare Wheels
uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
- name: List built wheels
run: ls dist/
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-windows
path: dist

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install OpenSSL
run: brew install openssl
- uses: actions/checkout@v3
- name: Install OpenSSL
run: brew install openssl

- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --universal2 --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
- name: Build and Prepare Wheels
uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --universal2 --find-interpreter
- name: List built wheels
run: ls dist/
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-macos
path: dist

release:
name: Release
runs-on: ubuntu-latest
needs: [ macos, windows, linux ]
steps:
- uses: actions/download-artifact@v2
- name: Download all wheels (Linux)
uses: actions/download-artifact@v2
with:
name: wheels-linux
- name: Download all wheels (Windows)
uses: actions/download-artifact@v2
with:
name: wheels-windows
- name: Download all wheels (macOS)
uses: actions/download-artifact@v2
with:
name: wheels
name: wheels-macos
- name: List all downloaded wheels
run: ls
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
Expand Down

0 comments on commit dfde84c

Please sign in to comment.