TOOLS-2592 Tooling for shipping Triton service images from monitor-reef #241
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-test-validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust 1.92 with components | |
| uses: dtolnay/rust-toolchain@0f44b27771c32bda9f458f75a1e241b09791b331 # 1.91.1 | |
| with: | |
| toolchain: 1.92 | |
| components: clippy, rustfmt | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 | |
| - name: Show rustc/cargo versions | |
| run: | | |
| rustc -V | |
| cargo -V | |
| - name: Set up Git refs for OpenAPI comparison | |
| run: | | |
| git fetch --no-tags origin main | |
| git checkout -b ci-branch | |
| - name: Check (fmt, clippy, tests, openapi-check) | |
| run: | | |
| make check | |
| build-triton: | |
| needs: build-test-validate | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| artifact: triton-linux-amd64 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-24.04-arm | |
| artifact: triton-linux-arm64 | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| artifact: triton-macos-arm64 | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.artifact }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@0f44b27771c32bda9f458f75a1e241b09791b331 # 1.91.1 | |
| with: | |
| toolchain: 1.92 | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Build triton (release) | |
| run: cargo build --release --package triton-cli | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: target/release/triton | |
| retention-days: ${{ github.event_name == 'pull_request' && 7 || 30 }} |