-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (103 loc) · 4.05 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build_rust_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: pnpm/action-setup@v4
with:
version: 9
- run: rustup update stable && rustup default stable
- run: rustup toolchain install nightly -c rustfmt
- run: git submodule update --init --recursive
- run: make setup-thirdparty
- run: docker compose up -d
working-directory: test/scripts/forked_state
- run: while ! curl localhost:8545/health; do sleep 1; done
- run: while ! curl localhost:4337/health; do sleep 1; done
- run: while ! curl localhost:3000/ping; do sleep 1; done
- run: cargo build --workspace --all-features --all-targets
- run: cargo test --all-features --lib --bins
# - run: cargo clippy --workspace --all-features --all-targets -- -D warnings
- run: cargo +nightly fmt --all -- --check
udeps:
name: Unused dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: pnpm/action-setup@v4
with:
version: 9
- run: rustup update stable && rustup default stable
- run: rustup toolchain install nightly -c rustfmt
- run: git submodule update --init --recursive
- run: make setup-thirdparty
- run: cargo install cargo-udeps
- run: cargo +nightly udeps --workspace
# build_wasm:
# name: Build on WASM
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run sccache-cache
# uses: mozilla-actions/[email protected]
# - uses: pnpm/action-setup@v4
# with:
# version: 9
# - run: rustup update stable && rustup default stable
# - run: rustup target add wasm32-unknown-unknown
# - run: git submodule update --init --recursive
# - run: make setup-thirdparty
# - run: cargo build --workspace --all-features --lib --bins --target wasm32-unknown-unknown --exclude=ffi
build_swift_and_test:
name: Swift Package - latest
runs-on: macos-14
strategy:
matrix:
config:
- debug
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: pnpm/action-setup@v4
with:
version: 9
- run: rustup update stable && rustup default stable
- run: git submodule update --init --recursive
- run: make setup-thirdparty
- run: make build-ios-bindings
- name: Select Xcode 15.4
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Build ${{ matrix.config }}
run: make CONFIG=${{ matrix.config }} build-swift-apple-platforms
# - name: Install Docker
# run: |
# HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker
# sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
# open -a /Applications/Docker.app --args --unattended --accept-license
# echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
# while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
# - name: Start test infrastructure
# run: docker compose up --debug
# working-directory: test/scripts/forked_state
# - name: Wait for local RPC to be ready
# run: while ! curl localhost:8545/health; do sleep 1; done
# - name: Wait for local bundler to be ready
# run: while ! curl localhost:4337/health; do sleep 1; done
# - name: Wait for local paymaster to be ready
# run: while ! curl localhost:3000/ping; do sleep 1; done
# - name: Run ${{ matrix.config }} tests
# run: make CONFIG=${{ matrix.config }} test-swift-apple-platforms