Skip to content

Commit 93c8f61

Browse files
kimo-iceKarimdionysuzxtaiko-kittyCeciliaZ030
authored
chore(repo): re-org workflows and limit runs to relative changes (#224)
* chore(repo): re-org workflows and limit runs to relative changes * update * typo * updates * recommended updates * add taiko-runner * fixup * Update .github/workflows/ci-sp1.yml Co-authored-by: CeciliaZ030 <[email protected]> --------- Co-authored-by: Karim <[email protected]> Co-authored-by: d1onys1us <[email protected]> Co-authored-by: taiko-bot <[email protected]> Co-authored-by: CeciliaZ030 <[email protected]>
1 parent 941538e commit 93c8f61

11 files changed

+317
-150
lines changed

.github/workflows/ci-all.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI - All
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
- "host/**"
8+
- "lib/**"
9+
- "primitives/**"
10+
- "script/**"
11+
pull_request:
12+
paths:
13+
- "host/**"
14+
- "lib/**"
15+
- "primitives/**"
16+
- "script/**"
17+
env:
18+
CARGO_TERM_COLOR: always
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build-test-native:
27+
uses: ./.github/workflows/ci-native.yml
28+
29+
build-test-risc0:
30+
uses: ./.github/workflows/ci-risc0.yml
31+
32+
build-test-sp1:
33+
uses: ./.github/workflows/ci-sp1.yml
34+
35+
build-test-sgx-all:
36+
uses: ./.github/workflows/ci-sgx-all.yml
37+
38+
test-lib:
39+
name: Test raiko-lib
40+
runs-on: [taiko-runner]
41+
timeout-minutes: 60
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- uses: actions-rs/toolchain@v1
47+
with:
48+
profile: minimal
49+
50+
- run: cargo test -p raiko-lib --features=std
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI Build and Test - Reusable
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version_name:
7+
type: string
8+
required: true
9+
version_toolchain:
10+
type: string
11+
required: true
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
17+
jobs:
18+
build-test:
19+
name: Build and test
20+
runs-on: [taiko-runner]
21+
timeout-minutes: 120
22+
23+
env:
24+
TARGET: ${{ inputs.version_name}}
25+
CI: 1
26+
MOCK: 1
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
submodules: recursive
32+
33+
- uses: actions-rs/toolchain@v1
34+
with:
35+
toolchain: ${{ inputs.version_toolchain }}
36+
profile: minimal
37+
38+
- name: Install cargo-binstall
39+
uses: cargo-bins/[email protected]
40+
41+
- name: Setup sccache
42+
if: ${{ inputs.version_name }} == risc0
43+
uses: risc0/risc0/.github/actions/[email protected]
44+
45+
- name: Install ${{ inputs.version_name }}
46+
run: make install
47+
48+
- name: Build ${{ inputs.version_name }} prover
49+
run: make build
50+
51+
- name: Test ${{ inputs.version_name }} prover
52+
run: make test
53+
54+
- name: Build with tracer
55+
if: ${{ inputs.version_name }} == native
56+
run: cargo build -F tracer

.github/workflows/ci-lint.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI - Lint
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, edited, synchronize]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
11+
jobs:
12+
clippy:
13+
name: clippy
14+
runs-on: [taiko-runner]
15+
timeout-minutes: 30
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: risc0/risc0/.github/actions/[email protected]
21+
22+
- uses: risc0/risc0/.github/actions/[email protected]
23+
24+
- uses: risc0/clippy-action@main
25+
with:
26+
reporter: 'github-pr-check'
27+
fail_on_error: true
28+
clippy_flags: --workspace --all-targets --all-features -- -D warnings
29+
30+
fmt:
31+
name: fmt
32+
runs-on: [taiko-runner]
33+
timeout-minutes: 10
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- uses: risc0/risc0/.github/actions/[email protected]
39+
40+
- run: make fmt

.github/workflows/ci-native.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: CI - Native
2+
3+
on: workflow_call
4+
5+
6+
jobs:
7+
build-test-native:
8+
name: Build and test native
9+
uses: ./.github/workflows/ci-build-test-reusable.yml
10+
with:
11+
version_name: "native"
12+
version_toolchain: "nightly-2024-04-17"

.github/workflows/ci-provers.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI - All Provers
2+
3+
on:
4+
workflow_call:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "pipelines/**"
9+
- "harness/**"
10+
pull_request:
11+
paths:
12+
- "pipelines/**"
13+
- "harness/**"
14+
env:
15+
CARGO_TERM_COLOR: always
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
build-test-native:
24+
uses: ./.github/workflows/ci-native.yml
25+
26+
build-test-risc0:
27+
uses: ./.github/workflows/ci-risc0.yml
28+
29+
build-test-sp1:
30+
uses: ./.github/workflows/ci-sp1.yml
31+
32+
build-test-sgx-all:
33+
uses: ./.github/workflows/ci-sgx-all.yml

.github/workflows/ci-risc0.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI - RISC0
2+
3+
on:
4+
workflow_call:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "provers/risc0/**"
9+
pull_request:
10+
paths:
11+
- "provers/risc0/**"
12+
13+
14+
jobs:
15+
build-test-risc0:
16+
name: Build and test risc0
17+
uses: ./.github/workflows/ci-build-test-reusable.yml
18+
with:
19+
version_name: "risc0"
20+
version_toolchain: "stable"

.github/workflows/ci-sgx-all.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI - SGX ALL
2+
3+
on:
4+
workflow_call:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "provers/sgx/**"
9+
pull_request:
10+
paths:
11+
- "provers/sgx/**"
12+
13+
jobs:
14+
build-test-sgx:
15+
name: Build and test sgx
16+
uses: ./.github/workflows/ci-build-test-reusable.yml
17+
with:
18+
version_name: "sgx"
19+
version_toolchain: "stable"
20+
21+
build-test-sgx-docker:
22+
name: Build and test sgx with Docker
23+
uses: ./.github/workflows/ci-sgx-docker.yml
24+
25+
build-test-sgx-hardware:
26+
name: Build and test sgx in hardware
27+
uses: ./.github/workflows/ci-sgx-hardware.yml

.github/workflows/ci-sgx-docker.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI - SGX Docker
2+
3+
on:
4+
workflow_call:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "docker/**"
9+
pull_request:
10+
paths:
11+
- "docker/**"
12+
13+
jobs:
14+
build-test-sgx-with-docker:
15+
name: Build and test sgx with Docker
16+
runs-on: [taiko-runner]
17+
timeout-minutes: 60
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Setup and build
22+
run: |
23+
cd docker
24+
docker compose build --no-cache
25+
shell: bash

.github/workflows/ci-sgx-hardware.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI - SGX Hardware
2+
3+
on: workflow_call
4+
5+
jobs:
6+
build-test-sgx-hardware:
7+
name: Build and test sgx in hardware
8+
runs-on: [self-hosted, sgx, linux]
9+
timeout-minutes: 120
10+
env:
11+
TARGET: sgx
12+
CI: 1
13+
EDMM: 0
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- uses: actions-rs/toolchain@v1
21+
with:
22+
toolchain: stable
23+
profile: minimal
24+
25+
- name: Install cargo-binstall
26+
uses: cargo-bins/[email protected]
27+
28+
- name: Install sgx
29+
run: make install
30+
31+
- name: Build sgx prover
32+
run: make build
33+
34+
- name: Test sgx prover
35+
run: make test

.github/workflows/ci-sp1.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI - SP1
2+
3+
on:
4+
workflow_call:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "provers/sp1/**"
9+
pull_request:
10+
paths:
11+
- "provers/sp1/**"
12+
13+
jobs:
14+
build-test-sgx:
15+
name: Build and test sp1
16+
uses: ./.github/workflows/ci-build-test-reusable.yml
17+
with:
18+
version_name: "sp1"
19+
version_toolchain: "nightly-2024-04-18"

0 commit comments

Comments
 (0)