Skip to content

Commit

Permalink
ci: upload artifacts
Browse files Browse the repository at this point in the history
Co-authored-by: Irate-Walrus <[email protected]>
  • Loading branch information
oberrich and Irate-Walrus committed Dec 29, 2024
1 parent 750af56 commit b52bf62
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: "cargo"
on:
workflow_dispatch:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

env:
CARGO_TERM_COLOR: always
Expand All @@ -32,6 +32,7 @@ jobs:
# Extract architecture (i686, x86_64 or aarch64) from target triple
ARCH=$(echo "${{ matrix.target }}" | cut -d'-' -f1)
echo "Extracted architecture: $ARCH"
# Map i686 to x86
if [ "$ARCH" == "i686" ]; then
ARCH="x86"
Expand All @@ -50,6 +51,13 @@ jobs:
# Move the generated file to the repository directory
cp "$GENERATED_BINDING" "src/ffi/${ARCH}_bindgen.rs"
echo "Moved $GENERATED_BINDING to src/ffi/${ARCH}_bindgen.rs"
- name: Upload generated file as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARCH }}_bindgen.rs
path: src/ffi/${{ env.ARCH }}_bindgen.rs

- name: Run tests
run: cargo test --verbose
commit-and-push:
Expand Down Expand Up @@ -79,7 +87,7 @@ jobs:
git add src/ffi
# Check if there are any changes to commit
if git diff --exit-code --cached; then
if git diff --quiet --exit-code --cached; then
echo "No changes to commit."
else
git commit -m "Update bindgen files"
Expand Down

0 comments on commit b52bf62

Please sign in to comment.