2020-03-23 16:59:46 +03:00
|
|
|
name: CI
|
2020-03-23 16:53:38 +03:00
|
|
|
|
|
|
|
on:
|
2020-03-23 20:39:16 +03:00
|
|
|
schedule:
|
|
|
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
2020-03-23 16:53:38 +03:00
|
|
|
push:
|
2020-03-30 20:07:08 +03:00
|
|
|
branches: [ '*' ]
|
2020-03-23 16:53:38 +03:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-03-23 20:33:24 +03:00
|
|
|
strategy:
|
2020-08-17 22:02:11 +03:00
|
|
|
fail-fast: false
|
2020-03-23 20:33:24 +03:00
|
|
|
matrix:
|
2020-07-21 10:24:28 +03:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2020-03-23 16:53:38 +03:00
|
|
|
|
2020-03-23 20:33:24 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-03-23 20:39:16 +03:00
|
|
|
|
2020-03-23 16:53:38 +03:00
|
|
|
steps:
|
2020-03-27 02:27:07 +03:00
|
|
|
- uses: actions/checkout@v2
|
2020-06-06 20:24:48 +03:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
|
|
|
components: clippy
|
|
|
|
|
2020-08-19 22:02:19 +03:00
|
|
|
- name: Install dependencies for clipboard access
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq install libxcb-shape0-dev libxcb-xfixes0-dev
|
|
|
|
|
2020-04-15 17:36:40 +03:00
|
|
|
- name: Build Debug
|
2020-06-06 20:24:48 +03:00
|
|
|
run: |
|
|
|
|
rustc --version
|
|
|
|
cargo build
|
|
|
|
|
2020-03-23 16:53:38 +03:00
|
|
|
- name: Run tests
|
2020-04-13 11:23:55 +03:00
|
|
|
run: make test
|
2020-06-06 20:24:48 +03:00
|
|
|
|
2020-03-27 02:16:57 +03:00
|
|
|
- name: Run clippy
|
2020-04-23 20:48:30 +03:00
|
|
|
run: |
|
2020-05-16 21:14:27 +03:00
|
|
|
cargo clean
|
2020-04-23 20:48:30 +03:00
|
|
|
make clippy
|
2020-07-21 10:24:28 +03:00
|
|
|
|
2020-04-15 17:36:40 +03:00
|
|
|
- name: Build Release
|
|
|
|
run: make build-release
|
2020-04-05 16:29:41 +03:00
|
|
|
|
2020-04-16 14:03:55 +03:00
|
|
|
build-linux-musl:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-06-06 20:24:48 +03:00
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
|
|
|
target: x86_64-unknown-linux-musl
|
|
|
|
|
2020-08-19 22:02:19 +03:00
|
|
|
- name: Install dependencies for clipboard access
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq install libxcb-shape0-dev libxcb-xfixes0-dev
|
|
|
|
|
2020-04-16 14:03:55 +03:00
|
|
|
- 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
|
|
|
|
|
2020-04-05 16:29:41 +03:00
|
|
|
rustfmt:
|
|
|
|
name: Rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install Rust
|
2020-06-06 20:24:48 +03:00
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
components: rustfmt
|
2020-04-15 19:35:38 +03:00
|
|
|
- run: cargo fmt -- --check
|
|
|
|
|
|
|
|
sec:
|
|
|
|
name: Security audit
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/audit-check@v1
|
|
|
|
with:
|
2020-05-13 19:15:17 +03:00
|
|
|
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:
|
2020-06-06 20:44:57 +03:00
|
|
|
name: release-notes.txt
|
2020-08-19 01:05:00 +03:00
|
|
|
path: ./release-notes.txt
|