KIT-ILIAS-downloader/.github/workflows/ci.yml
2022-01-06 16:01:47 +01:00

54 lines
1.2 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: Build
run: cargo build --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