Use GitHub runner built-in Rust support #625
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 Build | |
| on: [ push, pull_request ] | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ${{ matrix.os }} | |
| # We want to run on external PRs, but not on internal ones as push automatically builds | |
| # H/T: https://github.com/Dart-Code/Dart-Code/commit/612732d5879730608baa9622bf7f5e5b7b51ae65 | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-cli' | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| steps: | |
| - name: Git Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Rust Toolchain | |
| run: rustup toolchain install stable --profile minimal --component rustfmt | |
| - name: Cargo Build | |
| run: cargo build --verbose --workspace | |
| - name: Cargo Test | |
| run: cargo test --verbose --workspace | |
| - name: Rustfmt Check | |
| run: cargo fmt --verbose -- --check |