-
Notifications
You must be signed in to change notification settings - Fork 58
61 lines (55 loc) · 1.48 KB
/
binary_copy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rust toolchain
uses: dsherret/rust-toolchain-file@v1
- name: Setting up Node 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
scope: "@dusk-network"
- name: Build node
run: make all
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