Repository navigation
51 lines (47 loc) · 1.59 KB
/
Copy pathwarnet-example.yml
File metadata and controls
51 lines (47 loc) · 1.59 KB
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
# Two-tank Warnet lab image. Label `warnet` or workflow_dispatch.
# Ship PRs and label `release` run it through release-gate.yml
# (workflow_call, `gate: true`) so `release-extra` can require it.
# Not kind/Helm miner_std.
name: warnet-example
on:
workflow_dispatch:
workflow_call:
inputs:
gate:
type: boolean
default: false
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: warnet-example-${{ inputs.gate && 'gate-' || '' }}${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
warnet-example:
name: warnet-example
runs-on: ubuntu-latest
timeout-minutes: 45
if: >-
inputs.gate ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'warnet')
env:
CARGO_TARGET_DIR: target/dev
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: false
- name: Build a bookworm node and run two tanks
run: |
set -euo pipefail
docker run --rm -v "$PWD":/src -w /src \
-e CARGO_TARGET_DIR=/src/target/docker \
rust:1.95.0-bookworm \
cargo build -p rbitcoin-node
./scripts/core-functional/init-submodule.sh
./scripts/core-functional/warnet/Dockerfile.test.sh
NODE_BIN="$PWD/target/docker/debug/rbitcoin-node" \
./scripts/core-functional/warnet/example.sh