mirror of
https://github.com/openharmony/third_party_rust_heck.git
synced 2026-07-01 20:36:55 -04:00
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
# Use MSRV for the build job
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.32
|
|
default: true
|
|
profile: minimal
|
|
- name: Build default
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
- name: Build with unicode segmentation on
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
args: --features unicode
|
|
command: build
|
|
# Use stable for other jobs
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
default: true
|
|
profile: minimal
|
|
components: rustfmt, clippy
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
- name: Check formatting
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: -- --check
|
|
- name: Catch common mistakes
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-targets -- -D warnings
|