Skip to content

Commit 6c91a43

Browse files
Merge branch 'master' into build-brotli
2 parents 6477877 + f8bbec4 commit 6c91a43

File tree

381 files changed

+15720
-5075
lines changed

Some content is hidden

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

381 files changed

+15720
-5075
lines changed

.github/actions/lint-go/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: 'Lint Go Code'
3+
description: 'Runs both golangci-lint and custom linters on the Go codebase.'
4+
5+
runs:
6+
using: composite
7+
8+
steps:
9+
- name: GolangCI Lint
10+
uses: golangci/golangci-lint-action@v9
11+
with:
12+
version: v2.5
13+
14+
- name: Custom Lint
15+
shell: bash
16+
run: go run ./linters ./...

.github/workflows/_arbitrator.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v5
16+
uses: actions/checkout@v6
1717
with:
1818
submodules: recursive
1919

@@ -37,14 +37,44 @@ jobs:
3737
# so make sure it doesn't conflict with anything!
3838
no-cache: true
3939

40+
- name: Install cargo-nextest
41+
uses: taiki-e/install-action@v2
42+
with:
43+
44+
45+
- name: Create minimal nextest.toml config file
46+
run: |
47+
cat << EOF > nextest.toml
48+
[profile.ci.junit]
49+
path = "junit.xml"
50+
EOF
51+
4052
- name: Make arbitrator libraries
4153
run: make -j wasm-ci-build
4254

4355
- name: Clippy check
4456
run: cargo clippy --all --manifest-path arbitrator/Cargo.toml -- -D warnings
4557

4658
- name: Run rust tests
47-
run: cargo test -p arbutil -p prover -p jit -p stylus --release --manifest-path arbitrator/prover/Cargo.toml
59+
id: run-rust-tests
60+
continue-on-error: true
61+
run: >-
62+
cargo nextest run -p arbutil -p prover -p jit -p stylus --release
63+
--manifest-path arbitrator/prover/Cargo.toml
64+
--profile ci --config-file nextest.toml
65+
66+
- name: Upload rust test results
67+
if: always()
68+
uses: actions/upload-artifact@v5
69+
with:
70+
name: junit-reports-rust
71+
path: ./arbitrator/target/nextest/ci/junit.xml
72+
73+
- name: Fail if rust tests failed
74+
if: steps.run-rust-tests.outcome == 'failure'
75+
run: |
76+
echo "Rust tests failed. Failing the workflow as required."
77+
exit 1
4878
4979
- name: Check stylus_bechmark
5080
run: cargo check --manifest-path arbitrator/tools/stylus_benchmark/Cargo.toml

.github/workflows/_bold-legacy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,24 @@ jobs:
99
runs-on: arbitrator-ci
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@v6
1313
with:
1414
submodules: recursive
1515

1616

1717
- name: Setup CI
1818
uses: ./.github/actions/ci-setup
1919

20+
- name: Build
21+
run: make -j8 build test-go-deps
22+
2023
- name: run challenge tests
2124
run: >-
2225
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags legacychallengetest
2326
--run TestChallenge --timeout 60m --cover
2427
2528
- name: Archive detailed run log
26-
uses: actions/upload-artifact@v4
29+
uses: actions/upload-artifact@v5
2730
with:
2831
name: full.log
2932
path: full.log

.github/workflows/_codecov.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: codecov
3+
on:
4+
workflow_call:
5+
secrets:
6+
CODECOV_TOKEN:
7+
required: false
8+
description: Token to upload reports to Codecov. Required if `upload_report` is on.
9+
inputs:
10+
post_comment:
11+
description: 'Set to true to post a test summary comment on the PR.'
12+
type: boolean
13+
required: true
14+
upload_report:
15+
description: 'Set to true to upload test reports to Codecov.'
16+
type: boolean
17+
required: true
18+
report-name:
19+
description: 'Name to use when uploading reports to Codecov.'
20+
type: string
21+
required: false
22+
default: 'CI Test Results'
23+
24+
jobs:
25+
report_summary:
26+
name: Aggregate test results
27+
runs-on: ubuntu-4
28+
permissions:
29+
pull-requests: write
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v6
34+
35+
- name: Download JUnit reports
36+
uses: actions/download-artifact@v6
37+
with:
38+
pattern: junit-reports-*
39+
path: downloaded-reports/
40+
41+
- name: Post test summary comment
42+
if: ${{ inputs.post_comment }}
43+
uses: codecov/basic-test-results@v1
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
directory: 'downloaded-reports/'
47+
48+
- name: Upload test results to Codecov
49+
if: ${{ inputs.upload_report }}
50+
uses: codecov/test-results-action@v1
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
directory: 'downloaded-reports/'
54+
name: ${{ inputs.report-name }}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: detect-file-changes
3+
4+
on:
5+
workflow_call:
6+
outputs:
7+
arbitrator_changed:
8+
description: 'True if Arbitrator or related files changed.'
9+
value: ${{ jobs.changes.outputs.arbitrator_changed }}
10+
bold_legacy_changed:
11+
description: 'True if Bold Legacy or related files changed.'
12+
value: ${{ jobs.changes.outputs.bold_legacy_changed }}
13+
14+
jobs:
15+
changes:
16+
name: Detect file changes
17+
runs-on: ubuntu-4
18+
outputs:
19+
arbitrator_changed: ${{ steps.changed.outputs.arbitrator_any_changed }}
20+
bold_legacy_changed: ${{ steps.changed.outputs.bold_legacy_any_changed }}
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6
25+
with:
26+
submodules: recursive
27+
fetch-depth: 10 # Will cover most PRs
28+
persist-credentials: true # In case changed-files requires deeper depth
29+
30+
- name: Determine if Arbitrator or Bold Legacy changed
31+
id: changed
32+
uses: tj-actions/[email protected]
33+
with:
34+
files_yaml: |
35+
arbitrator:
36+
- 'arbitrator/**'
37+
- 'contracts/**'
38+
- 'Makefile'
39+
- '.github/workflows/_arbitrator.yml'
40+
bold_legacy:
41+
- 'bold/legacy/**'
42+
- '.github/workflows/_bold-legacy.yml'

.github/workflows/_fast.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: arbitrator-ci
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@v6
1313
with:
1414
submodules: recursive
1515

@@ -22,11 +22,5 @@ jobs:
2222
- name: Build all lint dependencies
2323
run: make -j8 build-node-deps
2424

25-
- name: GolangCI Lint
26-
uses: golangci/golangci-lint-action@v8
27-
with:
28-
version: v2.1
29-
30-
- name: Custom Lint
31-
run: |
32-
go run ./linters ./...
25+
- name: Setup CI
26+
uses: ./.github/actions/lint-go

0 commit comments

Comments
 (0)