feat: add ci #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
name: PR | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
examples: | |
name: Examples | |
runs-on: [runs-on, family=c7a.32xlarge, "run-id=${{ github.run_id }}"] | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
# - name: Setup CI | |
# uses: ./.github/actions/setup | |
- name: "Install sp1up" | |
run: | | |
curl -L https://sp1.succinct.xyz | bash | |
echo "$HOME/.sp1/bin" >> $GITHUB_PATH | |
- name: "Install SP1 toolchain" | |
run: | | |
sp1up | |
- name: "Set up test fixture" | |
run: | | |
git clone https://github.com/succinctlabs/rsp-tests --branch 2024-09-11 --depth 1 ../rsp-tests | |
cd ../rsp-tests/ | |
docker compose up -d | |
- name: "Use local test fixture" | |
run: | | |
echo "ETH_RPC_URL=http://localhost:9545/main/evm/1" >> $GITHUB_ENV | |
- name: Run uniswap script | |
run: | | |
SP1_DEV=1 RUST_LOG=info cargo run --release --bin uniswap --ignore-rust-version | |
env: | |
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native | |
RUST_BACKTRACE: 1 | |
- name: Run multiplexer script | |
run: | | |
SP1_DEV=1 RUST_LOG=info cargo run --release --bin multiplexer --ignore-rust-version | |
test-e2e: | |
name: Test | |
runs-on: ["runs-on", "runner=32cpu-linux-x64", "run-id=${{ github.run_id }}"] | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
steps: | |
- name: "Checkout sources" | |
uses: actions/checkout@v4 | |
- name: "Set RPC url" | |
run: | | |
echo "ETH_RPC_URL=https://ethereum-rpc.publicnode.com" >> $GITHUB_ENV | |
- name: "Run integration test" | |
run: | | |
SP1_DEV=1 RUST_LOG=info cargo test -p sp1-cc-host-executor --release -- --nocapture | |