Encoder #299
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: Loom | |
on: | |
push: | |
branches: [main] | |
pull_request_target: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
if: github.repository == 'dexloom/loom' | |
name: make test | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
MAINNET_HTTP: ${{ secrets.MAINNET_HTTP }} | |
MAINNET_WS: ${{ secrets.MAINNET_WS }} | |
RUST_LOG: info | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: arduino/setup-protoc@v3 | |
- uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- run: 'echo "pub const KEY_ENCRYPTION_PWD: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];" > crates/types/entities/src/private.rs' | |
- run: make test | |
swap-test-all: | |
if: github.repository == 'dexloom/loom' | |
name: make swap-test-all | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
MAINNET_HTTP: ${{ secrets.MAINNET_HTTP }} | |
MAINNET_WS: ${{ secrets.MAINNET_WS }} | |
RUST_LOG: info | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: arduino/setup-protoc@v3 | |
- uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- run: 'echo "pub const KEY_ENCRYPTION_PWD: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];" > crates/types/entities/src/private.rs' | |
- run: make swap-test-all | |
replayer: | |
if: github.repository == 'dexloom/loom' | |
name: make replayer | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
MAINNET_HTTP: ${{ secrets.MAINNET_HTTP }} | |
MAINNET_WS: ${{ secrets.MAINNET_WS }} | |
RUST_LOG: info | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: arduino/setup-protoc@v3 | |
- uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- run: 'echo "pub const KEY_ENCRYPTION_PWD: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];" > crates/types/entities/src/private.rs' | |
- run: make replayer | |
fmt: | |
if: github.repository == 'dexloom/loom' | |
name: make fmt-check | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: dtolnay/rust-toolchain@stable | |
- run: 'echo "pub const KEY_ENCRYPTION_PWD: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];" > crates/types/entities/src/private.rs' | |
- run: make fmt-check | |
taplo: | |
if: github.repository == 'dexloom/loom' | |
name: make taplo-check | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: dtolnay/rust-toolchain@clippy | |
- name: install taplo | |
env: | |
version: "0.9.3" | |
run: | | |
curl -Ls "https://github.com/tamasfe/taplo/releases/download/${{ env.version }}/taplo-full-linux-x86_64.gz" | \ | |
gzip -d > taplo && \ | |
chmod +x taplo && \ | |
sudo mv taplo /usr/local/bin/taplo | |
- run: make taplo-check | |
clippy: | |
if: github.repository == 'dexloom/loom' | |
name: make clippy | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: dtolnay/rust-toolchain@clippy | |
with: | |
toolchain: "1.82" | |
- uses: Swatinem/rust-cache@v2 | |
- uses: arduino/setup-protoc@v3 | |
- run: 'echo "pub const KEY_ENCRYPTION_PWD: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];" > crates/types/entities/src/private.rs' | |
# workaround for latest stable rust | |
- run: cargo +1.82 clippy --all-targets --all-features -- -D warnings | |
deny: | |
if: github.repository == 'dexloom/loom' | |
name: cargo deny check | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
log-level: warn | |
command: check | |
arguments: --all-features |