Skip to content

Commit

Permalink
explicit targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jalbrekt85 committed Jan 3, 2024
1 parent 4574a1a commit 0b7450f
Showing 1 changed file with 41 additions and 47 deletions.
88 changes: 41 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Install OpenSSL
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

- name: Set OpenSSL Env Vars
- name: Set OpenSSL Environment Variables
run: |
echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV
Expand All @@ -33,72 +33,66 @@ jobs:
- name: Install maturin
run: pip install maturin

- name: Set Env Vars
- name: Build and Prepare Wheels
run: |
export OPENSSL_DIR=$OPENSSL_DIR
export OPENSSL_LIB_DIR=$OPENSSL_LIB_DIR
export OPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH
maturin build --release --out dist --target aarch64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
env:
CARGO_TERM_COLOR: always

- name: Build and Prepare Wheels using maturin-action
uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
args: --release --out dist --find-interpreter

- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-linux
path: dist/*.whl
path: dist/

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

- 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
# - 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
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install OpenSSL
# run: brew install openssl

- 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
# - 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: [ linux, windows, macos ]
needs: [ linux]
steps:
- name: Download all wheels (Linux)
uses: actions/download-artifact@v2
Expand Down

0 comments on commit 0b7450f

Please sign in to comment.