Specified more values in toolchain file #99
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
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
name: β Validate | |
jobs: | |
fmt: | |
name: π Rustfmt | |
if: | | |
!startsWith(github.event.head_commit.message, 'ci:') | |
&& !startsWith(github.event.head_commit.message, 'ci(') | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout Git Repository | |
id: checkout_repository_step | |
uses: actions/checkout@v2 | |
- name: π§° Install Rust Toolchain | |
id: install_toolchain_step | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: π Set up cargo cache | |
id: setup_cache_step | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: π Cargo Fmt | |
id: cargo_fmt_step | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --verbose -- --check | |
clippy: | |
name: π Clippy | |
if: | | |
!startsWith(github.event.head_commit.message, 'ci:') | |
&& !startsWith(github.event.head_commit.message, 'ci(') | |
&& !startsWith(github.event.head_commit.message, 'style:') | |
&& !startsWith(github.event.head_commit.message, 'style(') | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-pc-windows-msvc | |
- x86_64-apple-darwin | |
- aarch64-unknown-linux-gnu | |
# - aarch64-apple-darwin | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
# - target: aarch64-apple-darwin | |
# os: macos-latest | |
continue-on-error: true | |
runs-on: ${{ matrix.os }} | |
env: | |
IS_CROSS: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} | |
steps: | |
- name: π Checkout Git Repository | |
id: checkout_repository_step | |
uses: actions/checkout@v2 | |
- name: π§° Install Rust Toolchain | |
id: install_toolchain_step | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- name: π Set up cargo cache | |
id: setup_cache_step | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: π Clippy | |
id: clippy_step | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
use-cross: ${{ env.IS_CROSS }} | |
args: --workspace --target ${{ matrix.target }} -- -D warnings | |
check: | |
name: β Check | |
if: | | |
!startsWith(github.event.head_commit.message, 'ci:') | |
&& !startsWith(github.event.head_commit.message, 'ci(') | |
&& !startsWith(github.event.head_commit.message, 'docs:') | |
&& !startsWith(github.event.head_commit.message, 'docs(') | |
&& !startsWith(github.event.head_commit.message, 'style:') | |
&& !startsWith(github.event.head_commit.message, 'style(') | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-pc-windows-msvc | |
- x86_64-apple-darwin | |
- aarch64-unknown-linux-gnu | |
# - aarch64-apple-darwin | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
# - target: aarch64-apple-darwin | |
# os: macos-latest | |
runs-on: ${{ matrix.os }} | |
env: | |
IS_CROSS: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} | |
steps: | |
- name: π Checkout Git Repository | |
id: checkout_repository_step | |
uses: actions/checkout@v2 | |
- name: π§° Install Rust Toolchain | |
id: install_toolchain_step | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: ${{ matrix.target }} | |
- name: π Set up cargo cache | |
id: setup_cache_step | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: β Cargo Check | |
id: cargo_check_step | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
use-cross: ${{ env.IS_CROSS }} | |
args: --workspace --target ${{ matrix.target }} | |
test: | |
name: π§ͺ Test | |
if: | | |
!startsWith(github.event.head_commit.message, 'ci:') | |
&& !startsWith(github.event.head_commit.message, 'ci(') | |
&& !startsWith(github.event.head_commit.message, 'docs:') | |
&& !startsWith(github.event.head_commit.message, 'docs(') | |
&& !startsWith(github.event.head_commit.message, 'style:') | |
&& !startsWith(github.event.head_commit.message, 'style(') | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-pc-windows-msvc | |
- x86_64-apple-darwin | |
- aarch64-unknown-linux-gnu | |
# - aarch64-apple-darwin | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
# - target: aarch64-apple-darwin | |
# os: macos-latest | |
runs-on: ${{ matrix.os }} | |
env: | |
IS_CROSS: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} | |
steps: | |
- name: π Checkout Git Repository | |
id: checkout_repository_step | |
uses: actions/checkout@v2 | |
- name: π§° Install Rust Toolchain | |
id: install_toolchain_step | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: ${{ matrix.target }} | |
- name: π Set up cargo cache | |
id: setup_cache_step | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: π§ͺ Cargo Test | |
id: cargo_test_step | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
use-cross: ${{ env.IS_CROSS }} | |
args: --workspace --target ${{ matrix.target }} |