Merge pull request #23 from vacp2p/Pravdyvy/ci-try-fix

Ci fix
This commit is contained in:
Pravdyvy 2024-11-25 12:54:00 +02:00 committed by GitHub
commit 83d35cb711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 36 additions and 57 deletions

View File

@ -14,14 +14,11 @@ on:
name: General
jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.platform }}
build-ubuntu-latest:
runs-on: ubuntu-latest
timeout-minutes: 60
name: build - ${{ matrix.platform }}
name: build - ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
@ -30,16 +27,10 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- name: install risc0
- name: build - ubuntu-latest
if: success() || failure()
run: |
curl -L https://risczero.com/install | bash
- name: install risc0 step 2
if: success() || failure()
run: |
source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc
- uses: Swatinem/rust-cache@v2
- run: cargo build
run: chmod 777 ./ci_scripts/build-ubuntu.sh && ./ci_scripts/build-ubuntu.sh
lint:
strategy:
@ -59,30 +50,11 @@ jobs:
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: cargo fmt
- name: lint - ubuntu-latest
if: success() || failure()
run: cargo fmt -- --check
- name: cargo clippy
if: success() || failure()
run: |
cargo clippy --release -- -D warnings
- name: install risc0
if: success() || failure()
run: |
curl -L https://risczero.com/install | bash
- name: install risc0 step 2
if: success() || failure()
run: |
source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc
- name: install taplo
if: success() || failure()
run: |
cargo install taplo-cli --locked
- name: taplo fmt
if: success() || failure()
run: |
taplo fmt --check
run: chmod 777 ./ci_scripts/lint-ubuntu.sh && ./ci_scripts/lint-ubuntu.sh
test:
strategy:
matrix:
@ -100,21 +72,6 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v2
- name: install risc0
- name: test ubuntu-latest
if: success() || failure()
run: |
curl -L https://risczero.com/install | bash
- name: install risc0 step 2
if: success() || failure()
run: |
source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc
- name: test mempool
if: success() || failure()
run: cargo test -p mempool
- name: test storage
if: success() || failure()
run: cargo test -p storage
- name: test zkvm
if: success() || failure()
run: cargo test -p zkvm
run: chmod 777 ./ci_scripts/test-ubuntu.sh && ./ci_scripts/test-ubuntu.sh

View File

@ -0,0 +1,4 @@
set -e
curl -L https://risczero.com/install | bash
/Users/runner/.risc0/bin/rzup install
cargo build

View File

@ -0,0 +1,4 @@
set -e
curl -L https://risczero.com/install | bash
/home/runner/.risc0/bin/rzup install
cargo build

View File

@ -0,0 +1,8 @@
set -e
curl -L https://risczero.com/install | bash
/home/runner/.risc0/bin/rzup install
cargo install taplo-cli --locked
cargo fmt -- --check
taplo fmt --check

View File

@ -0,0 +1,6 @@
set -e
curl -L https://risczero.com/install | bash
/home/runner/.risc0/bin/rzup install
cargo test --release

View File

@ -48,9 +48,9 @@ pub fn verify(receipt: Receipt, image_id: impl Into<Digest>) {
#[cfg(test)]
mod tests {
use super::*;
use test_methods::{BIG_CALCULATION_ELF, BIG_CALCULATION_ID};
use test_methods::{MULTIPLICATION_ELF, MULTIPLICATION_ID};
use test_methods::{SUMMATION_ELF, SUMMATION_ID};
use test_methods::{BIG_CALCULATION_ELF, BIG_CALCULATION_ID};
#[test]
fn prove_simple_sum() {
@ -140,5 +140,5 @@ mod tests {
}
res
}
}
}