Try to use reusable workflow #4
Workflow file for this run
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: CI builds | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
SCCACHE_GHA_ENABLED: true | ||
RUSTC_WRAPPER: sccache | ||
jobs: | ||
build-rust: | ||
runs-on: ${{ matrix.os }} | ||
name: Build rust crates on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-14 | ||
- ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/actions/common.yml | ||
with: | ||
lfs: false | ||
cache_key: ${{ matrix.os }}_build | ||
- name: Run build | ||
run: cargo build | ||
- name: Upload build outputs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build_target | ||
path: target | ||
retention-days: 0 | ||
test-rust: | ||
needs: | ||
- build-rust | ||
runs-on: ${{ matrix.os }} | ||
name: Test rust crates on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-14 | ||
- ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
lfs: true | ||
- uses: ./.github/actions/common.yml | ||
with: | ||
lfs: true | ||
cache_key: ${{ matrix.os }}_test | ||
- name: Download build target | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build_target | ||
- name: Run tests | ||
run: ./scripts/test.sh | ||
lint-rust: | ||
needs: | ||
- build-rust | ||
runs-on: ${{ matrix.os }} | ||
name: Test rust crates on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-14 | ||
- ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/actions/common.yml | ||
with: | ||
lfs: true | ||
cache_key: ${{ matrix.os }}_lint | ||
- name: Download build target | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build_target | ||
- name: Run clippy | ||
run: ./scripts/clippy.sh | ||
dart: | ||
name: Build dart | ||
uses: ./.github/actions/dart.yml | ||