forked from OffchainLabs/nitro
-
Notifications
You must be signed in to change notification settings - Fork 9
137 lines (116 loc) · 4.05 KB
/
espresso-e2e.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Espresso E2E test CI
on:
workflow_dispatch:
merge_group:
pull_request:
push:
branches:
- integration
- celestia-integration
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Espresso E2E
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: >
sudo apt update && sudo apt install -y wabt
cmake build-essential bison golang clang make wabt
- name: Install latest gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: 1.12.0
- name: free disk space
uses: jlumbroso/free-disk-space@main
with:
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: false
swap-storage: true
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Install go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Install wasm-ld
run: |
sudo apt-get update && sudo apt-get install -y lld-14
sudo ln -s /usr/bin/wasm-ld-14 /usr/local/bin/wasm-ld
- name: Install rust stable
uses: dtolnay/rust-toolchain@stable
with:
# TODO: remove pinning: https://github.com/EspressoSystems/nitro-espresso-integration/issues/257
toolchain: "1.81.0"
targets: "wasm32-unknown-unknown, wasm32-wasi"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install rust nightly
uses: dtolnay/rust-toolchain@nightly
id: install-rust-nightly
with:
toolchain: "nightly-2024-08-06"
targets: "wasm32-wasi, wasm32-unknown-unknown"
components: "rust-src, rustfmt, clippy"
- name: Cache Build Products
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ matrix.test-mode }}
restore-keys: ${{ runner.os }}-go-
- name: Cache Rust Build Products
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/
~/.cargo/git/
arbitrator/target/
arbitrator/wasm-libraries/target/
arbitrator/wasm-libraries/soft-float/SoftFloat/build
target/etc/initial-machine-cache/
key: ${{ runner.os }}-cargo-${{ steps.install-rust.outputs.rustc_hash }}-min-${{ hashFiles('arbitrator/Cargo.lock') }}-${{ matrix.test-mode }}
restore-keys: ${{ runner.os }}-cargo-${{ steps.install-rust.outputs.rustc_hash }}-
- name: Cache cbrotli
uses: actions/cache@v3
id: cache-cbrotli
with:
path: |
target/include/brotli/
target/lib-wasm/
target/lib/libbrotlicommon-static.a
target/lib/libbrotlienc-static.a
target/lib/libbrotlidec-static.a
key: ${{ runner.os }}-brotli-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}-${{ matrix.test-mode }}
restore-keys: ${{ runner.os }}-brotli-
- name: Build cbrotli-local
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./scripts/build-brotli.sh -l
- name: Build cbrotli-wasm in docker
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./scripts/build-brotli.sh -w -d
- name: Build
run: make build build-replay-env -j
- name: Install docker-compose
uses: KengoTODA/[email protected]
with:
version: "2.22.0"
- name: Run Espresso tests
run: |
scripts/run-espresso-ci-job