Skip to content

Commit

Permalink
Merge pull request #2335 from dusk-network/ci-copy-artifact
Browse files Browse the repository at this point in the history
CI: move rusk binary copy to separate CI action
  • Loading branch information
Fulviuus authored Sep 10, 2024
2 parents a7216a9 + 29de62d commit 9281d93
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 19 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/binary_copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Rusk binary copy

on:
push:
branches:
- master

jobs:
# Job to run change detection
changes:
runs-on: core
permissions:
pull-requests: read
outputs:
run-ci: ${{ steps.filter.outputs.run-ci }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
run-ci:
- 'rusk/**'
- 'node/**'
- '.github/workflows/binary_copy.yml'
build:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: Make rusk
runs-on: core
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: make
copy_to_host:
needs: build
runs-on: core
continue-on-error: true
steps:
- name: "Check and Copy Rusk Artifact to Host"
run: |
# Ensure the target directory exists
mkdir -p /var/opt/rusk-artifacts
# Check if the rusk artifact exists before copying
if [ -f ./target/release/rusk ]; then
echo "Rusk artifact found. Copying to host."
cp ./target/release/rusk /var/opt/rusk-artifacts
else
echo "Rusk artifact not found. Skipping copy."
fi
20 changes: 1 addition & 19 deletions .github/workflows/rusk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: cargo fmt --all -- --check
copy_to_host:
needs: test_nightly
runs-on: core
if: needs.test_nightly.result == 'success' && github.base_ref == 'main'
continue-on-error: true
steps:
- name: "Check and Copy Rusk Artifact to Host"
run: |
# Ensure the target directory exists
mkdir -p /var/opt/rusk-artifacts
# Check if the rusk artifact exists before copying
if [ -f ./target/release/rusk ]; then
echo "Rusk artifact found. Copying to host."
cp ./target/release/rusk /var/opt/rusk-artifacts
else
echo "Rusk artifact not found. Skipping copy."
fi
- run: cargo fmt --all -- --check

0 comments on commit 9281d93

Please sign in to comment.