gitui/.github/workflows/ci.yml
2020-08-19 00:05:00 +02:00

101 lines
2.1 KiB
YAML

name: CI
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
- name: Build Debug
run: |
rustc --version
cargo build
- name: Run tests
run: make test
- name: Run clippy
run: |
cargo clean
make clippy
- name: Build Release
run: make build-release
build-linux-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: x86_64-unknown-linux-musl
- name: Setup MUSL
run: |
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
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: 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 }}
log-test:
name: Changelog Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Extract release notes
id: extract_release_notes
uses: ffurrer2/extract-release-notes@v1
with:
release_notes_file: ./release-notes.txt
- uses: actions/upload-artifact@v1
with:
name: release-notes.txt
path: ./release-notes.txt