2022-09-08 08:40:58 +02:00
|
|
|
---
|
2022-04-27 05:02:54 +02:00
|
|
|
name: "Rust Build"
|
|
|
|
# Trigger the workflow on push to master or pull request
|
|
|
|
"on":
|
|
|
|
push:
|
|
|
|
branches:
|
2022-09-08 08:40:58 +02:00
|
|
|
- master
|
2022-04-27 05:02:54 +02:00
|
|
|
pull_request:
|
2020-04-25 13:46:05 +02:00
|
|
|
|
2022-11-13 23:57:05 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2020-04-25 13:46:05 +02:00
|
|
|
jobs:
|
2022-04-27 05:02:54 +02:00
|
|
|
rust_build:
|
2020-12-04 19:44:13 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-04-25 13:46:05 +02:00
|
|
|
steps:
|
2022-11-13 23:57:05 +01:00
|
|
|
- name: Restore our cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
2022-09-08 08:40:58 +02:00
|
|
|
- uses: actions/checkout@v3
|
2020-04-25 13:46:05 +02:00
|
|
|
|
2022-09-08 08:40:58 +02:00
|
|
|
- name: Update package manager
|
|
|
|
run: sudo apt-get update
|
2021-04-13 03:02:46 +02:00
|
|
|
|
2022-09-08 08:40:58 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y \
|
|
|
|
libpam0g-dev \
|
|
|
|
libudev-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libsqlite3-dev
|
2020-04-25 13:46:05 +02:00
|
|
|
|
2022-11-13 23:57:05 +01:00
|
|
|
# - name: Install Rust
|
|
|
|
# uses: actions-rs/toolchain@v1
|
|
|
|
# with:
|
|
|
|
# toolchain: stable
|
|
|
|
# override: true
|
|
|
|
# default: true
|
2022-09-28 02:31:19 +02:00
|
|
|
- name: Run tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose
|