2023-07-06 22:51:18 -07:00
|
|
|
name: Rust Build and Clippy Check
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-07-18 05:08:32 -07:00
|
|
|
- main
|
2023-07-06 22:51:18 -07:00
|
|
|
push:
|
|
|
|
branches:
|
2023-07-18 05:08:32 -07:00
|
|
|
- main
|
2023-07-06 22:51:18 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-09-04 07:43:25 -07:00
|
|
|
name: Rust project - latest
|
2023-07-06 22:51:18 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 07:43:25 -07:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
2023-09-04 07:41:28 -07:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2023-07-06 22:51:18 -07:00
|
|
|
|
2023-09-04 07:41:28 -07:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get upgrade -y
|
|
|
|
sudo apt-get install libssl-dev openssl -y
|
2023-07-06 22:51:18 -07:00
|
|
|
|
2023-09-04 07:41:28 -07:00
|
|
|
- name: Early Build
|
|
|
|
run: cargo build --workspace --tests
|
2023-07-18 05:08:32 -07:00
|
|
|
|
2023-09-04 07:41:28 -07:00
|
|
|
- name: Check Rust Code Format
|
|
|
|
run: cargo fmt -- --check
|
2023-07-06 22:51:18 -07:00
|
|
|
|
2023-09-04 07:41:28 -07:00
|
|
|
- name: Run Rust Clippy
|
|
|
|
run: cargo clippy --all-targets -- -D warnings
|