feat: v0.5.0 - bounded-latency L3 orderbook, egui/wgpu refresh, cross… #20
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: CI and Release | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up stable Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-cargo- | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run Clippy | |
| run: cargo clippy --locked --all-targets -- -D warnings | |
| - name: Run tests | |
| run: cargo test --locked --all-targets | |
| - name: Build GPU-enabled release binary | |
| run: cargo build --locked --release | |
| - name: Stage binary | |
| id: stage | |
| shell: bash | |
| run: | | |
| extension="" | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| extension=".exe" | |
| fi | |
| asset="binance_l3_est-${{ runner.os }}-${{ runner.arch }}${extension}" | |
| mkdir -p dist | |
| cp "target/release/binance_l3_est${extension}" "dist/${asset}" | |
| echo "asset=${asset}" >> "$GITHUB_OUTPUT" | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.stage.outputs.asset }} | |
| path: dist/${{ steps.stage.outputs.asset }} | |
| if-no-files-found: error | |
| release: | |
| name: Publish release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download platform binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| generate_release_notes: true |