1
0
Fork 0
mirror of synced 2024-05-02 19:44:09 +12:00
This commit is contained in:
Rafał Mikrut 2020-09-20 13:20:12 +02:00
parent 2804af92e5
commit 43ead2edb8
2 changed files with 76 additions and 0 deletions

1
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1 @@
github: qarmin

75
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,75 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
toolchain: [stable, nightly]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
needs: clean
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: ${{ runner.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Gtk
run: sudo apt-get update; sudo apt install -y libgtk-3-dev
if: ${{ runner.os == 'Linux' }}
- name: Build
run: cargo check --all
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
- name: Run tests
run: cargo test
if: ${{ runner.os == 'Linux' }}
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
clean:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install Gtk
run: sudo apt install -y libgtk-3-dev
- name: Check the format
run: cargo fmt --all -- --check
# type complexity must be ignored because we use huge templates for queries
- name: Run clippy
run: >
cargo clippy
--all-targets
--all-features
--
-D warnings