bump drift-rs, use patched jupiter swap client #304
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "**.rs" | |
| - "**.toml" | |
| - "**.lock" | |
| - ".github/workflows/*.yml" | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - "**.rs" | |
| - "**.toml" | |
| - "**.lock" | |
| - ".github/workflows/*.yml" | |
| jobs: | |
| format-build-test: | |
| runs-on: ubicloud | |
| timeout-minutes: 15 | |
| env: | |
| CARGO_DRIFT_FFI_PATH: /usr/lib | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Config rust toolchain | |
| run: | | |
| rustup update stable && rustup default stable | |
| rustup show active-toolchain | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - uses: ubicloud/rust-cache@v2 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: install latest libdrift_ffi_sys | |
| run: | | |
| # NB: this will break historic CI jobs (if breaking program changes happen) | |
| # better to ensure latest version works | |
| SO_URL=$(curl -s https://api.github.com/repos/drift-labs/drift-ffi-sys/releases/latest | jq -r '.assets[] | select(.name=="libdrift_ffi_sys.so") | .browser_download_url') | |
| echo "downloading libdrift: $SO_URL" | |
| curl -L -o libdrift_ffi_sys.so "$SO_URL" | |
| sudo cp libdrift_ffi_sys.so $CARGO_DRIFT_FFI_PATH | |
| - name: Build | |
| run: | | |
| cargo -V | |
| cargo check | |
| - name: Test | |
| env: | |
| DRIFT_GATEWAY_KEY: ${{ secrets.DRIFT_GATEWAY_KEY }} | |
| TEST_DELEGATED_SIGNER: ${{ secrets.TEST_DELEGATED_SIGNER }} | |
| TEST_RPC_ENDPOINT: ${{ secrets.DEVNET_RPC_ENDPOINT }} | |
| TEST_MAINNET_RPC_ENDPOINT: ${{ secrets.MAINNET_RPC_ENDPOINT }} | |
| # --test-threads, limit parallelism to prevent hitting RPC rate-limits | |
| run: | | |
| cargo -V | |
| cp libdrift_ffi_sys.so ./target/debug/deps | |
| cargo test --all -- --test-threads=2 |