Skip to content

Commit 6693fe5

Browse files
authored
Merge pull request #5627 from iron-fish/staging
Staging -> Master
2 parents 75d2c9c + 0f68050 commit 6693fe5

File tree

144 files changed

+4641
-4602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+4641
-4602
lines changed

.github/workflows/ci-regenerate-fixtures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
status: ${{ job.status }}
4646
notify_when: 'failure'
4747
env:
48-
SLACK_WEBHOOK_URL: ${{ secrets.GITHUB_ACTIONS_SLACK_WEBHOOK }}
48+
SLACK_WEBHOOK_URL: ${{ secrets.GH_ACTIONS_SLACK_WEBHOOK }}

.github/workflows/ci.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,22 @@ jobs:
3939
- name: Lint
4040
run: yarn lint
4141

42+
- name: Build Rust bindings
43+
run: yarn build
44+
45+
- name: Check for Rust binding changes
46+
run: |
47+
if [[ $(git status | grep index.) ]]; then
48+
echo "Rust bindings have outstanding updates, please run 'yarn build' and check them in."
49+
exit 1
50+
fi
51+
4252
test:
4353
name: Test
4454
runs-on: ubuntu-latest
55+
strategy:
56+
matrix:
57+
shard: [1/3, 2/3, 3/3]
4558

4659
steps:
4760
- name: Check out Git repository
@@ -63,7 +76,7 @@ jobs:
6376
run: yarn --non-interactive --frozen-lockfile
6477

6578
- name: Run tests
66-
run: yarn test:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB
79+
run: yarn test:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB --shard=${{ matrix.shard }}
6780

6881
- name: Check for missing fixtures
6982
run: |
@@ -74,11 +87,19 @@ jobs:
7487
7588
- name: Upload coverage
7689
if: github.repository == 'iron-fish/ironfish'
77-
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
90+
uses: codecov/codecov-action@v4
91+
with:
92+
fail_ci_if_error: true
93+
token: ${{ secrets.CODECOV_TOKEN }}
94+
flags: ironfish
95+
7896

7997
testslow:
8098
name: Slow Tests
8199
runs-on: ubuntu-latest
100+
strategy:
101+
matrix:
102+
shard: [1/2, 2/2]
82103

83104
steps:
84105
- name: Check out Git repository
@@ -100,7 +121,7 @@ jobs:
100121
run: yarn --non-interactive --frozen-lockfile
101122

102123
- name: Run slow tests & coverage
103-
run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB
124+
run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB --shard=${{ matrix.shard }}
104125

105126
- name: Check for missing fixtures
106127
run: |
@@ -111,4 +132,8 @@ jobs:
111132
112133
- name: Upload coverage
113134
if: github.repository == 'iron-fish/ironfish'
114-
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
135+
uses: codecov/codecov-action@v4
136+
with:
137+
fail_ci_if_error: true
138+
token: ${{ secrets.CODECOV_TOKEN }}
139+
flags: ironfish

.github/workflows/deploy-brew.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ jobs:
3030
- name: Build Ironfish CLI
3131
run: ./ironfish-cli/scripts/build.sh
3232

33-
- name: Deploy Ironfish CLI Brew
34-
run: ./ironfish-cli/scripts/deploy-brew.sh
35-
env:
36-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
37-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
38-
BREW_GITHUB_USERNAME: ${{ secrets.BREW_GITHUB_USERNAME }}
39-
BREW_GITHUB_TOKEN: ${{ secrets.BREW_GITHUB_TOKEN }}
40-
4133
- name: Deploy Ironfish CLI Brew to R2
4234
run: ./ironfish-cli/scripts/deploy-brew.sh
4335
env:
@@ -46,4 +38,3 @@ jobs:
4638
BREW_GITHUB_USERNAME: ${{ secrets.BREW_GITHUB_USERNAME }}
4739
BREW_GITHUB_TOKEN: ${{ secrets.BREW_GITHUB_TOKEN }}
4840
AWS_DEFAULT_REGION: auto
49-
UPLOAD_TO_R2: true

.github/workflows/deploy-npm-ironfish-rust-nodejs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ jobs:
4242
run: ls -R .
4343
shell: bash
4444

45+
- name: Verify artifacts exist
46+
run: |
47+
if [ -z "$(ls -A './artifacts')" ]; then
48+
echo "artifacts folder was empty. ironfish-rust-nodejs artifacts were not uploaded correctly."
49+
exit 1
50+
fi
51+
4552
- name: Move and publish artifacts
4653
run: yarn artifacts
4754

.github/workflows/perf_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: 20
28-
cache: 'yarn'
2928

3029
- name: Install packages
3130
run: yarn --non-interactive --frozen-lockfile

.github/workflows/rust_ci.yml

Lines changed: 106 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ jobs:
4141
save-if: false
4242
shared-key: base
4343

44-
- name: Install Cargo tools
45-
run: |
46-
rustup component add rustfmt clippy
47-
48-
- name: Check that cargo lockfile is up to date
49-
run: |
50-
cargo check --locked --all-targets
51-
5244
# Note: ironfish-zkp is does not need this due to different licensing
5345
- name: Check for license headers for ironfish-rust
5446
run: ./ci/lintHeaders.sh ./ironfish-rust/src *.rs
@@ -62,7 +54,27 @@ jobs:
6254
6355
- name: "Clippy check on ironfish-rust"
6456
run: |
65-
cargo clippy --all-targets -- -D warnings
57+
cargo clippy --all-targets --all-features -- -D warnings
58+
59+
cargo_check:
60+
name: Check Rust
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- name: Cache Rust
66+
uses: Swatinem/rust-cache@v2
67+
with:
68+
save-if: false
69+
shared-key: base
70+
71+
- name: Install cargo-all-features
72+
run: |
73+
cargo install --locked cargo-all-features
74+
75+
- name: Check that cargo lockfile is up to date
76+
run: |
77+
cargo check-all-features --locked --all-targets
6678
6779
cargo_vet:
6880
name: Vet Dependencies
@@ -87,51 +99,124 @@ jobs:
8799
ironfish_rust:
88100
name: Test ironfish-rust
89101
runs-on: ubuntu-latest
102+
strategy:
103+
matrix:
104+
shard: [1/2, 2/2]
105+
90106
steps:
91107
- uses: actions/checkout@v4
92108

109+
- name: install cargo-llvm-cov
110+
uses: taiki-e/install-action@cargo-llvm-cov
111+
112+
- name: Install nextest
113+
uses: taiki-e/install-action@nextest
114+
93115
- name: Cache Rust
94116
uses: Swatinem/rust-cache@v2
95117
with:
96118
shared-key: base
97119

98120
# Run tests to collect code coverage
99-
- name: Run cargo-tarpaulin on ironfish-rust
121+
- name: Run tests
100122
run: |
101-
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
102-
tar -xzf tarpaulin.tar.gz
103-
mv cargo-tarpaulin ~/.cargo/bin/
104-
cargo tarpaulin -p ironfish --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 300 -- --test-threads 1
123+
cargo llvm-cov nextest \
124+
--no-clean \
125+
--codecov \
126+
--output-path codecov.json \
127+
--package ironfish \
128+
--release \
129+
--partition count:${{ matrix.shard }}
105130
106131
# Upload code coverage to Codecov
107132
- name: Upload to codecov.io
108-
uses: codecov/codecov-action@v3
133+
uses: codecov/codecov-action@v4
109134
with:
110135
token: ${{secrets.CODECOV_TOKEN}}
111136
flags: ironfish-rust
112137

138+
ironfish_rust_no_default_features:
139+
name: Test ironfish-rust (no default features)
140+
runs-on: ubuntu-latest
141+
strategy:
142+
matrix:
143+
shard: [1/2, 2/2]
144+
145+
steps:
146+
- uses: actions/checkout@v4
147+
148+
- name: Install nextest
149+
uses: taiki-e/install-action@nextest
150+
151+
- name: Cache Rust
152+
uses: Swatinem/rust-cache@v2
153+
with:
154+
shared-key: base
155+
156+
- name: Run tests
157+
run: |
158+
cargo nextest run \
159+
--package ironfish \
160+
--release \
161+
--no-default-features \
162+
--partition count:${{ matrix.shard }}
163+
164+
ironfish_rust_all_features:
165+
name: Test ironfish-rust (all features)
166+
runs-on: ubuntu-latest
167+
strategy:
168+
matrix:
169+
shard: [1/2, 2/2]
170+
171+
steps:
172+
- uses: actions/checkout@v4
173+
174+
- name: Install nextest
175+
uses: taiki-e/install-action@nextest
176+
177+
- name: Cache Rust
178+
uses: Swatinem/rust-cache@v2
179+
with:
180+
shared-key: base
181+
182+
- name: Run tests (all features)
183+
run: |
184+
cargo nextest run \
185+
--package ironfish \
186+
--release \
187+
--all-features \
188+
--partition count:${{ matrix.shard }}
189+
113190
ironfish_zkp:
114191
name: Test ironfish-zkp
115192
runs-on: ubuntu-latest
116193
steps:
117194
- uses: actions/checkout@v4
118195

196+
- name: install cargo-llvm-cov
197+
uses: taiki-e/install-action@cargo-llvm-cov
198+
199+
- name: Install nextest
200+
uses: taiki-e/install-action@nextest
201+
119202
- name: Cache Rust
120203
uses: Swatinem/rust-cache@v2
121204
with:
122205
shared-key: zkp
123206

124207
# Run tests to collect code coverage
125-
- name: Run cargo-tarpaulin on ironfish-zkp
208+
- name: Run tests
126209
run: |
127-
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
128-
tar -xzf tarpaulin.tar.gz
129-
mv cargo-tarpaulin ~/.cargo/bin/
130-
cargo tarpaulin -p ironfish_zkp --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 300 -- --test-threads 1
210+
cargo llvm-cov nextest \
211+
--no-clean \
212+
--codecov \
213+
--output-path codecov.json \
214+
--package ironfish_zkp \
215+
--release
131216
132217
# Upload code coverage to Codecov
133218
- name: Upload to codecov.io
134-
uses: codecov/codecov-action@v3
219+
uses: codecov/codecov-action@v4
135220
with:
136221
token: ${{secrets.CODECOV_TOKEN}}
137222
flags: ironfish-zkp

0 commit comments

Comments
 (0)