mirror of
https://github.com/FliegendeWurst/KIT-ILIAS-downloader.git
synced 2024-08-28 04:04:18 +00:00
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
features: ["", "--all-features"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
|
|
- name: Cache cargo directories
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache cargo target dir
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: target
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install dbus
|
|
run: sudo apt-get install -y libdbus-1-dev
|
|
if: runner.os == 'Linux'
|
|
- name: Build
|
|
run: cargo build --release ${{ matrix.features }} --verbose
|
|
# there are currently no automated tests
|
|
- name: Run tests
|
|
run: cargo test --release ${{ matrix.features }} --verbose
|
|
- name: Archive artifacts
|
|
uses: actions/upload-artifact@v2
|
|
if: matrix.features == '--all-features'
|
|
with:
|
|
name: Binaries
|
|
path: |
|
|
target/release/KIT-ILIAS-downloader
|
|
target/release/KIT-ILIAS-downloader.exe
|