-
Notifications
You must be signed in to change notification settings - Fork 176
77 lines (71 loc) · 2.44 KB
/
docker.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Docker
on:
push:
branches: [ main, 'devnet_*', 'testnet_*' ]
pull_request:
branches:
- "**"
paths:
- 'docker/Dockerfile'
- 'docker/docker-compose.yml'
- 'docker/compose.sh'
- 'docker/docker-compose.yml'
- 'Cargo.toml'
- '.github/workflows/docker.yml'
workflow_dispatch:
# This allows a subsequently queued workflow run to interrupt previous runs on pull-requests
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}'
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
# We allow redundant explicit links because `cargo rdme` doesn't know how to resolve implicit intra-crate links.
RUSTDOCFLAGS: -A rustdoc::redundant_explicit_links -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
RUST_LOG: warn
DOCKER_COMPOSE_WAIT: "true"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(#2709): Uncomment once this workflow runs in a custom runner
# - name: Update aio-max-nr
# run: echo 1048576 > /proc/sys/fs/aio-max-nr
- name: Build client binary
run: |
cargo install --path linera-service --bin linera --bin linera-server --debug
# TODO(#2709): Remove this step once this workflow runs in a custom runner
- name: Patch Docker compose file to run ScyllaDB in developer mode
run: |
sed -i -e '/SCYLLA_AUTO_CONF/{N;s/command:/ SCYLLA_ENABLE_EXPERIMENTAL: 1/p;N;N;N;N;d}' \
docker/docker-compose.yml
- name: Run Compose
run: |
cd docker
./compose.sh
# TODO(#2709): Uncomment once this workflow runs in a custom runner
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Sync
uses: nick-fields/retry@v2
with:
# Docker compose can take some time to start
max_attempts: 10
timeout_minutes: 2
retry_wait_seconds: 10
command: linera --wallet docker/wallet.json --storage rocksdb:docker/linera.db sync-balance