mirror of
https://github.com/orhun/systeroid
synced 2024-07-21 02:14:36 +00:00
chore(ci): add Continuous Integration workflow
This commit is contained in:
parent
0c223c0a72
commit
fdaeaf1160
72
.github/workflows/ci.yml/ci.yml
vendored
Normal file
72
.github/workflows/ci.yml/ci.yml
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
name: Continuous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "0 0 * * 0"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build for ${{ matrix.TARGET }} using Rust ${{ matrix.TOOLCHAIN }} (on ${{ matrix.OS }})
|
||||
runs-on: ${{ matrix.OS }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
OS: [ubuntu-latest]
|
||||
TOOLCHAIN: [stable, nightly]
|
||||
TARGET:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-unknown-linux-musl
|
||||
- i686-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
- armv5te-unknown-linux-gnueabi
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.TOOLCHAIN }}
|
||||
target: ${{ matrix.TARGET }}
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: true
|
||||
command: build
|
||||
args: --target ${{ matrix.TARGET }}
|
||||
|
||||
- name: Check formatting
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
- name: Check lints
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: -- -D warnings
|
||||
|
||||
audit:
|
||||
name: Perform audit for security
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Run cargo-audit
|
||||
uses: actions-rs/audit-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in a new issue