Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download dynamic libraries from onnxruntime release #32

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/upload-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ VERSION="$2"

BIN=musicgpt
RELEASE_DIR=target/release
BUILD_HASH=$(cat $BUILD_HASH_FILE)

if [ ! -f $RELEASE_DIR/$BIN ]; then
echo "No binary found in $RELEASE_DIR/$BIN"
Expand All @@ -35,12 +34,15 @@ else
gh release upload "v$VERSION" "$BIN-$TARGET"
fi

pushd "$ONNXRUNTIME_BUILD_DIR/$BUILD_HASH" >/dev/null
for file in $(ls *.{so,dylib,dll} 2> /dev/null); do
echo "Moving $file to $TARGET-$file..."
mv "$file" "$TARGET-$file"
echo "Uploading $TARGET-$file to github release v$VERSION..."
gh release upload "v$VERSION" "$TARGET-$file"
done
echo "Done!"
popd >/dev/null
if [ -f "$BUILD_HASH_FILE" ]; then
BUILD_HASH=$(cat "$BUILD_HASH_FILE")
pushd "$ONNXRUNTIME_BUILD_DIR/$BUILD_HASH" >/dev/null
for file in $(ls *.{so,dylib,dll} 2> /dev/null); do
echo "Moving $file to $TARGET-$file..."
mv "$file" "$TARGET-$file"
echo "Uploading $TARGET-$file to github release v$VERSION..."
gh release upload "v$VERSION" "$TARGET-$file"
done
echo "Done!"
popd >/dev/null
fi
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: cargo test --no-default-features --features onnxruntime-from-source
- run: cargo test

smoke-test:
strategy:
Expand All @@ -58,7 +58,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: cargo run --release --no-default-features --features onnxruntime-from-source -- 'Create a LoFi song' --secs 1 --model small-quant --no-interactive --no-playback
- run: cargo run --release -- 'Create a LoFi song' --secs 1 --model small-quant --no-interactive --no-playback

tag:
if: github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -149,10 +149,13 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
features: cuda
- os: macos-latest
target: aarch64-apple-darwin
features: coreml
- os: windows-2022
target: x86_64-pc-windows-msvc
features: cuda

runs-on: ${{ matrix.os }}
env:
Expand All @@ -170,6 +173,6 @@ jobs:
- if: runner.os != 'macOS'
run: sed -i 's/^version = ".*"/version = "${{ needs.tag.outputs.version }}"/' Cargo.toml

- run: cargo build --no-default-features --release --target ${{ matrix.target }} --features onnxruntime-from-source
- run: cargo build --target ${{ matrix.target }} --features ${{ matrix.features }}
- run: .github/upload-artifacts.sh ${{ matrix.target }} ${{ needs.tag.outputs.version }}
shell: bash
Loading
Loading