Skip to content

Commit c12c631

Browse files
soareschenrnbguy
andauthored
ci: arm64 runner for linux and macos (#111)
* build nix deps for linux-amd64, linux-amr64 and macos-arm64 * run integration test on linux-amd64, linux-arm64, macos-arm64 * use ubuntu latest * strategy runs in sequence * use ubuntu-22.04 * rename macos build * use latest install-nix-action * rm nix-build job * run nix build as pre-step * use nix build print-out-paths * rm homebrew for macos * nix shell over develop * pre-fetch big Osmosis repo * use osmos-src rev from flake metadata * run strategy matrix in parallel * jq is needed * keep homebrew * build cargo-nextest --------- Co-authored-by: Ranadeep Biswas <[email protected]>
1 parent 7967c80 commit c12c631

File tree

4 files changed

+46
-42
lines changed

4 files changed

+46
-42
lines changed

.github/workflows/hermes.yaml

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ concurrency:
1212
jobs:
1313
starknet-integration-tests:
1414
name: Run Starknet Integration Tests
15-
runs-on: ubuntu-20.04
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-14]
19+
runs-on: ${{ matrix.os }}
1620
timeout-minutes: 60
1721
steps:
1822
- uses: actions/checkout@v4
19-
- uses: cachix/install-nix-action@V27
23+
- uses: cachix/install-nix-action@v30
2024
with:
2125
extra_nix_config: |
2226
experimental-features = nix-command flakes
@@ -32,15 +36,39 @@ jobs:
3236
relayer -> relayer/target
3337
light-client -> light-client/target
3438
39+
- name: Pre-fetch Osmosis repo
40+
run: |
41+
OSMOSIS_REV=`nix flake metadata --json | jq -r '.locks.nodes["osmosis-src"].locked.rev'`
42+
for i in `seq 1 10`; do
43+
if nix flake prefetch "github:osmosis-labs/osmosis/${OSMOSIS_REV}"; then
44+
exit 0
45+
else
46+
sleep 2
47+
fi
48+
done
49+
exit 1
50+
51+
- name: Nix build
52+
env:
53+
RUST_BACKTRACE: 1
54+
run: |
55+
nix build \
56+
.#starknet-devnet \
57+
.#cairo \
58+
.#scarb \
59+
.#universal-sierra-compiler \
60+
.#rust \
61+
.#cargo-nextest \
62+
.#ibc-starknet-cw \
63+
.#wasm-simapp \
64+
.#osmosis
65+
3566
- name: Build Cairo contracts
3667
working-directory: ./cairo-contracts
3768
run: |
3869
nix shell ..#scarb -c \
3970
scarb build -p starknet_ibc_contracts
4071
41-
- name: Build Starknet Wasm light client
42-
run: nix build .#ibc-starknet-cw
43-
4472
- name: Run Integration Tests
4573
env:
4674
RUST_BACKTRACE: 1
@@ -49,19 +77,25 @@ jobs:
4977
export ERC20_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_ERC20Mintable.contract_class.json"
5078
export ICS20_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_TransferApp.contract_class.json"
5179
export COMET_CLIENT_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_CometClient.contract_class.json"
52-
export STARKNET_WASM_CLIENT_PATH="$(nix path-info ..#ibc-starknet-cw)/ibc_client_starknet_cw.wasm"
80+
export STARKNET_WASM_CLIENT_PATH="$(nix build ..#ibc-starknet-cw --print-out-paths)/ibc_client_starknet_cw.wasm"
5381
export IBC_CORE_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_IBCCore.contract_class.json"
5482
55-
nix develop ..#rust -c \
83+
nix shell \
84+
..#osmosis \
85+
..#wasm-simapp \
86+
..#starknet-devnet \
87+
..#rust \
88+
..#cargo-nextest \
89+
-c \
5690
cargo nextest run --test-threads=2
5791
5892
lint-relayer:
5993
name: Lint Relayer Code
60-
runs-on: ubuntu-20.04
94+
runs-on: ubuntu-latest
6195
timeout-minutes: 20
6296
steps:
6397
- uses: actions/checkout@v4
64-
- uses: cachix/install-nix-action@V27
98+
- uses: cachix/install-nix-action@v30
6599
with:
66100
extra_nix_config: |
67101
experimental-features = nix-command flakes

.github/workflows/light-client.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 60
2727
steps:
2828
- uses: actions/checkout@v4
29-
- uses: cachix/install-nix-action@V27
29+
- uses: cachix/install-nix-action@v30
3030
with:
3131
extra_nix_config: |
3232
experimental-features = nix-command flakes
@@ -53,7 +53,7 @@ jobs:
5353
timeout-minutes: 60
5454
steps:
5555
- uses: actions/checkout@v4
56-
- uses: cachix/install-nix-action@V27
56+
- uses: cachix/install-nix-action@v30
5757
with:
5858
extra_nix_config: |
5959
experimental-features = nix-command flakes

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
timeout-minutes: 60
3636
steps:
3737
- uses: actions/checkout@v4
38-
- uses: cachix/install-nix-action@V27
38+
- uses: cachix/install-nix-action@v30
3939
with:
4040
extra_nix_config: |
4141
experimental-features = nix-command flakes

.github/workflows/macos.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)