Skip to content

Commit

Permalink
fix: patch gpu release scripts (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-camuto authored Nov 14, 2023
1 parent bbb8aea commit e2f0c53
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/pypi-gpu.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Build and Publish Python GPU Bindings (linux only)


on:
# Requires someone to trigger this build script via github workflows
# It is required that the codebase is audited by contributors
# before triggering to reduce the likelihood of supply chain attacks
workflow_dispatch:
inputs:
tag:
description: "The tag to release"
required: true
push:
tags:
- "*"

defaults:
run:
Expand All @@ -16,14 +21,20 @@ jobs:
runs-on: GPU
strategy:
matrix:
target: [x86_64, i686]
target: [x86_64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.7
architecture: x64

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-06-27
override: true
components: rustfmt, clippy

- name: Set Cargo.toml version to match github tag
shell: bash
env:
Expand All @@ -44,6 +55,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: auto
container: off
args: --release --out dist --features python-bindings,icicle

- name: Install built wheel
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
RUST_BACKTRACE: 1
PCRE2_SYS_STATIC: 1
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-08-24
override: true
components: rustfmt, clippy
- name: Checkout repo
uses: actions/checkout@v4

Expand All @@ -60,11 +65,6 @@ jobs:
mv Cargo.lock Cargo.lock.orig
sed "s/0\\.0\\.0/${EZKL_VERSION//v}/" Cargo.lock.orig >Cargo.lock
- name: Use Cross
shell: bash
run: |
cargo install cross -Z sparse-registry
echo "TARGET_DIR=./target/linux-gpu" >> $GITHUB_ENV
- name: Install dependencies
shell: bash
Expand All @@ -78,7 +78,7 @@ jobs:
shell: bash
run: |
mkdir -p build-artifacts
tar czvf build-artifacts/ezkl-linux-gpu.tar.gz -C "target/linux-gpu/release" ezkl
tar czvf build-artifacts/ezkl-linux-gpu.tar.gz -C "target/release" ezkl
echo "ASSET=build-artifacts/ezkl-linux-gpu.tar.gz" >> $GITHUB_ENV
- name: Upload release archive
Expand Down

0 comments on commit e2f0c53

Please sign in to comment.