2025-12-16 17:53:30 +05:30

105 lines
2.5 KiB
YAML

# copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
on:
push:
branches: [master]
pull_request:
branches:
- "*"
name: CI
jobs:
check:
name: Build
strategy:
matrix:
include:
- os: ubuntu-latest
toolchain: stable
#- os: windows-latest
# toolchain: stable-x86_64-pc-windows-gnu
- os: macos-latest
toolchain: stable
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
default: true
override: true
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: check
test:
name: Test
strategy:
matrix:
include:
- os: ubuntu-latest
toolchain: stable
#- os: windows-latest
# toolchain: stable-x86_64-pc-windows-gnu
- os: macos-latest
toolchain: stable
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
default: true
override: true
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: build
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: test
lints:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: clippy
args: -- --deny warnings