mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-07 07:43:11 +00:00
commit
83d35cb711
67
.github/workflows/ci.yml
vendored
67
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
||||
4
ci_scripts/build-macos.sh
Normal file
4
ci_scripts/build-macos.sh
Normal file
@ -0,0 +1,4 @@
|
||||
set -e
|
||||
curl -L https://risczero.com/install | bash
|
||||
/Users/runner/.risc0/bin/rzup install
|
||||
cargo build
|
||||
4
ci_scripts/build-ubuntu.sh
Normal file
4
ci_scripts/build-ubuntu.sh
Normal file
@ -0,0 +1,4 @@
|
||||
set -e
|
||||
curl -L https://risczero.com/install | bash
|
||||
/home/runner/.risc0/bin/rzup install
|
||||
cargo build
|
||||
8
ci_scripts/lint-ubuntu.sh
Normal file
8
ci_scripts/lint-ubuntu.sh
Normal 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
|
||||
6
ci_scripts/test-ubuntu.sh
Normal file
6
ci_scripts/test-ubuntu.sh
Normal file
@ -0,0 +1,6 @@
|
||||
set -e
|
||||
|
||||
curl -L https://risczero.com/install | bash
|
||||
/home/runner/.risc0/bin/rzup install
|
||||
|
||||
cargo test --release
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user