-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): re-org workflows and limit runs to relative changes
- Loading branch information
Karim
committed
May 19, 2024
1 parent
d90acd0
commit 3755e54
Showing
9 changed files
with
283 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: CI - All | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "host/**" | ||
- "lib/**" | ||
- "primitives/**" | ||
- "script/**" | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-test-native: | ||
uses: ./.github/workflows/ci-native.yml | ||
|
||
build-test-risc0: | ||
uses: ./.github/workflows/ci-risc0.yml | ||
|
||
build-test-sp1: | ||
uses: ./.github/workflows/ci-sp1.yml | ||
|
||
build-test-sgx-all: | ||
uses: ./.github/workflows/ci-ngx-all.yml | ||
|
||
test-lib: | ||
name: Test raiko-lib | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
|
||
- run: cargo test -p raiko-lib --features=std | ||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: risc0/risc0/.github/actions/rustup@release-0.19 | ||
|
||
- uses: risc0/risc0/.github/actions/sccache@release-0.19 | ||
|
||
- uses: risc0/clippy-action@main | ||
with: | ||
reporter: 'github-pr-check' | ||
fail_on_error: true | ||
clippy_flags: --workspace --all-targets --all-features -- -D warnings | ||
|
||
fmt: | ||
name: fmt | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: risc0/risc0/.github/actions/rustup@release-0.19 | ||
|
||
- run: make fmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: CI Build and Test - Reusable | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version_name: | ||
type: string | ||
required: true | ||
version_toolchain: | ||
type: string | ||
required: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build-test: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
|
||
env: | ||
TARGET: ${{ inputs.version_name}} | ||
CI: 1 | ||
MOCK: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ inputs.version_toolchain }} | ||
profile: minimal | ||
|
||
- name: Install cargo-binstall | ||
uses: cargo-bins/cargo-binstall@v1.6.4 | ||
|
||
- name: Setup sccache | ||
if: ${{ inputs.version_name }} == risc0 | ||
uses: risc0/risc0/.github/actions/sccache@release-0.19 | ||
|
||
- name: Install ${{ inputs.version_name }} | ||
run: make install | ||
|
||
- name: Build ${{ inputs.version_name }} prover | ||
run: make build | ||
|
||
- name: Test ${{ inputs.version_name }} prover | ||
run: make test | ||
|
||
- name: Build with tracer | ||
if: ${{ inputs.version_name }} == native | ||
run: cargo build -F tracer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: CI - Native | ||
|
||
on: workflow_call | ||
|
||
|
||
jobs: | ||
build-test-sgx: | ||
name: Build and test sgx with Docker | ||
uses: ./.github/workflows/build-test.yml | ||
with: | ||
version_name: "native" | ||
toolchain: "nightly-2024-04-17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: CI - RISC0 | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "provers/risc0/**" | ||
pull_request: | ||
|
||
|
||
jobs: | ||
build-test-sgx: | ||
name: Build and test sgx with Docker | ||
uses: ./.github/workflows/build-test.yml | ||
with: | ||
version_name: "risc0" | ||
toolchain: "stable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: CI - SGX ALL | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "provers/sgx/**" | ||
pull_request: | ||
|
||
|
||
jobs: | ||
build-test-sgx: | ||
name: Build and test sgx with Docker | ||
uses: ./.github/workflows/build-test.yml | ||
with: | ||
version_name: "sgx" | ||
toolchain: "stable" | ||
|
||
build-test-sgx-docker: | ||
name: Build and test sgx with Docker | ||
uses: ./.github/workflows/sgx-docker.yml | ||
|
||
build-test-sgx-hardware: | ||
name: Build and test sgx in hardware | ||
runs-on: [self-hosted, sgx, linux] | ||
timeout-minutes: 120 | ||
env: | ||
TARGET: sgx | ||
CI: 1 | ||
EDMM: 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
|
||
- name: Install cargo-binstall | ||
uses: cargo-bins/cargo-binstall@v1.6.4 | ||
|
||
- name: Install sgx | ||
run: make install | ||
|
||
- name: Build sgx prover | ||
run: make build | ||
|
||
- name: Test sgx prover | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI - SGX Docker | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "docker/**" | ||
pull_request: | ||
|
||
|
||
jobs: | ||
build-test-sgx-with-docker: | ||
name: Build and test sgx with Docker | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup and build | ||
run: | | ||
cd docker | ||
docker compose build --no-cache | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: CI - SP1 | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "provers/sp1/**" | ||
pull_request: | ||
|
||
|
||
jobs: | ||
build-test-sgx: | ||
name: Build and test sgx with Docker | ||
uses: ./.github/workflows/build-test.yml | ||
with: | ||
version_name: "sp1" | ||
toolchain: "nightly-2024-04-17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI - All zkVMs | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "pipelines/**" | ||
- "harness/**" | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-test-native: | ||
uses: ./.github/workflows/ci-native.yml | ||
|
||
build-test-risc0: | ||
uses: ./.github/workflows/ci-risc0.yml | ||
|
||
build-test-sp1: | ||
uses: ./.github/workflows/ci-sp1.yml | ||
|
||
build-test-sgx-all: | ||
uses: ./.github/workflows/ci-ngx-all.yml |
Oops, something went wrong.