2022-09-08 08:40:58 +02:00
|
|
|
---
|
2023-04-27 14:35:24 +02:00
|
|
|
name: "Linux Build and Test"
|
2022-04-27 05:02:54 +02:00
|
|
|
# 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
|
|
|
|
2023-04-27 14:35:24 +02:00
|
|
|
env:
|
|
|
|
SCCACHE_GHA_ENABLED: "true"
|
|
|
|
RUSTC_WRAPPER: "sccache"
|
|
|
|
|
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-09-08 08:40:58 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-04-27 14:35:24 +02:00
|
|
|
- name: Install Rust
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup sccache
|
|
|
|
uses: mozilla-actions/sccache-action@v0.0.3
|
2021-04-13 03:02:46 +02:00
|
|
|
|
2022-09-08 08:40:58 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-04-27 14:35:24 +02:00
|
|
|
sudo apt-get update && \
|
2022-09-08 08:40:58 +02:00
|
|
|
sudo apt-get install -y \
|
|
|
|
libpam0g-dev \
|
|
|
|
libudev-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libsqlite3-dev
|
2020-04-25 13:46:05 +02:00
|
|
|
|
2023-04-27 14:35:24 +02:00
|
|
|
- run: cargo build --workspace
|
|
|
|
- run: cargo test
|