gitui/.github/workflows/ci.yml
Stephan Dilly 09df10cdbd fix new clippy warning
Fix ci clippy task
2020-04-24 07:41:48 +02:00

72 lines
1.7 KiB
YAML

name: CI
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Build Debug
run: cargo build
- name: Run tests
run: make test
- name: Run clippy
run: |
rustup component add clippy
make clippy
- name: Build Release
run: make build-release
- name: Build Win Test Release
if: matrix.os == 'windows-latest'
run: make release-win
- uses: actions/upload-artifact@v1
if: matrix.os == 'windows-latest'
with:
name: win-binary
path: ./release/gitui-win.tar.gz
build-linux-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup MUSL
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools
- name: Build Debug
run: cargo build --target=x86_64-unknown-linux-musl
- name: Build Release
run: |
cargo build --release --target=x86_64-unknown-linux-musl
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt -- --check
sec:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}