KIT-ILIAS-downloader/.github/workflows/ci.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

2021-01-24 17:02:12 +00:00
name: CI
on:
2021-01-24 17:03:06 +00:00
push:
2021-05-11 07:48:32 +00:00
branches:
- '**'
2021-01-24 17:03:06 +00:00
pull_request:
branches: [ master ]
2021-01-24 17:02:12 +00:00
env:
2021-01-24 17:03:06 +00:00
CARGO_TERM_COLOR: always
2021-01-24 17:02:12 +00:00
jobs:
2021-01-24 17:03:06 +00:00
build:
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
features: ["", "--all-features"]
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
2021-01-24 17:03:06 +00:00
toolchain: stable
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
- name: Cache cargo directories
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
- name: Cache cargo target dir
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
2021-04-17 13:40:08 +00:00
- name: Install dbus
run: sudo apt-get install -y libdbus-1-dev
if: runner.os == 'Linux'
2021-01-24 17:03:06 +00:00
- name: Build
2021-04-17 13:40:08 +00:00
run: cargo build --release ${{ matrix.features }} --verbose
2021-01-24 17:18:00 +00:00
- name: Archive artifacts
uses: actions/upload-artifact@v2
if: matrix.features == '--all-features'
2021-01-24 17:18:00 +00:00
with:
name: Binaries
path: |
target/release/KIT-ILIAS-downloader
target/release/KIT-ILIAS-downloader.exe