-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
279 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,64 @@ | ||
name: Build, Lint, and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'develop' | ||
- 'main' | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
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 |