ci: update chaotic devnet workflow #16
Workflow file for this run
This file contains hidden or 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: Chaotic Devnet Test | |
| # Only run on merge, or when manually triggered. | |
| on: | |
| push: | |
| branches: | |
| - 'staging' | |
| - 'canary' | |
| - 'testnet' | |
| - 'mainnet' | |
| - 'ci/updated_network_delay_test' #remove this before merge | |
| workflow_dispatch: | |
| env: | |
| RUST_BACKTRACE: 1 | |
| CARGO_INCREMENTAL: 0 | |
| # Only introdue delay between validators, not for the HTTP endpoints. | |
| PORT_RANGE: 5000-5100 | |
| jobs: | |
| build-snarkos: | |
| runs-on: ubuntu-latest-m | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Cache Cargo Registry & target | |
| uses: swatinem/rust-cache@v2 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends clang llvm-dev llvm lld pkg-config xz-utils make libssl-dev | |
| - name: Build snarkOS | |
| run: | | |
| echo "Building snarkOS..." | |
| cargo install --locked --path . --features test_network | |
| - name: Upload Binary Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: built-snarkos # The key used to retrieve the built binary | |
| path: ~/.cargo/bin/snarkos # The actual folder to save | |
| retention-days: 1 # Keep it briefly to save space | |
| chaos-test: | |
| runs-on: ubuntu-latest | |
| needs: build-snarkos | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Download snarkOS | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: built-snarkos | |
| path: bin # Where to put it | |
| - name: Setup Path and Permissions | |
| run: | | |
| # Make it executable (permissions may get lost) | |
| chmod +x bin/snarkos | |
| # Add the 'bin' folder to the system PATH | |
| echo "$(pwd)/bin" >> $GITHUB_PATH | |
| - name: Run Devnet Test with Chaos | |
| # Run with f=1 and no clients, so the nodes do not overwhelm the runner. | |
| # Allow for up to 50 warnings per node, as network issues will create those. | |
| run: ./scripts/chaotic-network-runner.sh $PORT_RANGE ./.ci/test_devnet.sh 4 0 0 45 50 | |
| # These require more CPU cores, so they are disabled for now. | |
| # - name: Run Reset Quorum Minority Test with Chaos | |
| # run: ./scripts/chaotic-network-runner.sh $PORT_RANGE ./.ci/test_reset_quorum_minority.sh | |
| # - name: Run Reset Quorum Majority Test with Chaos | |
| # run: ./scripts/chaotic-network-runner.sh $PORT_RANGE ./.ci/test_reset_quorum_majority.sh | |