From 8d5809036ab750fdac0bc8a501db80cff5789ca8 Mon Sep 17 00:00:00 2001 From: Artemii Gerasimovich Date: Tue, 9 Jan 2024 16:24:07 +0100 Subject: [PATCH] WIP --- .github/workflows/build-and-test.yml | 52 +++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d130a12fce..b57eb7a93b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -74,6 +74,56 @@ jobs: target/debug/examples/orchestrator-webserver target/debug/examples/validator-webserver + test-sequencer: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + name: Checkout Repository + with: + path: hotshot + + - uses: actions/checkout@v4 + name: Checkout Sequencer Repository + with: + repository: EspressoSystems/espresso-sequencer + path: sequencer + + - name: Install Rust Stable + uses: dtolnay/rust-toolchain@stable + + - uses: Swatinem/rust-cache@v2 + name: Enable Rust Caching + with: + shared-key: "" + prefix-key: sequencer + + - name: Patch sequencer dependencies + run: | + mkdir -p .cargo + cat << EOF > .cargo/config.toml + [patch.'https://github.com/EspressoSystems/hotshot'] + hotshot = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot" } + hotshot-orchestrator = { path = "${GITHUB_WORKSPACE}/hotshot/crates/orchestrator" } + hotshot-signature-key = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot-signature-key" } + hotshot-types = { path = "${GITHUB_WORKSPACE}/hotshot/crates/types" } + hotshot-web-server = { path = "${GITHUB_WORKSPACE}/hotshot/crates/web_server" } + hotshot-testing = { path = "${GITHUB_WORKSPACE}/hotshot/crates/testing" } + EOF + + - name: Build sequencer tests + working-directory: sequencer + run: | + export RUSTFLAGS='--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std" --cfg hotshot_example' + cargo test --release --workspace --all-features --no-run + + - name: Run sequencer tests + working-directory: sequencer + run: | + export RUSTFLAGS='--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std" --cfg hotshot_example' + cargo test --release --workspace --all-features --verbose -- --test-threads 1 --nocapture + + + build-arm: strategy: matrix: @@ -264,4 +314,4 @@ jobs: just ${{ matrix.just_variants }} test_crypto timeout-minutes: 60 env: - RUST_BACKTRACE: full \ No newline at end of file + RUST_BACKTRACE: full