-
Notifications
You must be signed in to change notification settings - Fork 105
63 lines (52 loc) · 1.74 KB
/
Build-gear-loader-network.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
62
63
name: Build gear loader
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
BINARYEN_VERSION: version_111
jobs:
build-gear-loader:
runs-on: [kuberunner]
env:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
- name: "Install: Build deps"
run: |
sudo apt update
sudo apt install -y git clang curl libssl-dev llvm libudev-dev cmake wabt protobuf-compiler wget bzip2
sudo wget -c https://github.com/WebAssembly/binaryen/releases/download/$BINARYEN_VERSION/binaryen-$BINARYEN_VERSION-x86_64-linux.tar.gz -O - | sudo tar -xz -C .
sudo cp binaryen-$BINARYEN_VERSION/bin/wasm-opt /usr/bin/
- name: "Build gear-loader"
run: |
cargo build --release --locked --package gear-node-loader
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: gear-loader
path: |
target/release/gear-node-loader
update-gear-loader:
runs-on: ubuntu-latest
needs: build-gear-loader
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: gear-loader
- name: Run playbook
uses: dawidd6/action-ansible-playbook@v2
with:
directory: ./ansible/
playbook: gear-loader-update.yaml
key: ${{secrets.SSH_PRIVATE_KEY}}
inventory: |
[all]
${{secrets.GEAR_LOADER_NODE}}