Update CI workflow

This commit is contained in:
Ottatop 2024-01-29 21:56:58 -06:00
parent 32b8c0dd30
commit 8c3b6cf1a4
3 changed files with 80 additions and 41 deletions

79
.github/workflows/ci.pinnacle.yml vendored Normal file
View file

@ -0,0 +1,79 @@
name: CI (Pinnacle)
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- name: Cache stuff
uses: Swatinem/rust-cache@v2
- name: Get dependencies
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler
- name: Setup Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.4"
- name: Setup LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Build
run: cargo build --verbose
- name: Celebratory yahoo
run: echo yahoo
check-format:
runs-on: ubuntu-latest
name: Check formatting
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
clippy-pr:
runs-on: ubuntu-latest
name: Clippy (pull request)
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Clippy review
uses: giraffate/clippy-action@v1
with:
reporter: "github-pr-review"
clippy_flags: -- -D warnings
clippy-push:
runs-on: ubuntu-latest
name: Clippy (push)
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Clippy check
uses: giraffate/clippy-action@v1
with:
reporter: "github-check"
clippy_flags: -- -D warnings

View file

@ -1,40 +0,0 @@
name: Rust
on:
push:
branches: ["main"]
paths:
- "src/**"
pull_request:
branches: ["main"]
paths:
- "src/**"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run rustup
run: rustup toolchain install stable
- name: Cache stuff maybe
uses: Swatinem/rust-cache@v2
- name: Get dependencies
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler
- name: Setup Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.4"
- name: Setup Lua Rocks
uses: leafo/gh-actions-luarocks@v4
- name: Build
run: cargo build --verbose
- name: Run tests that don't exist
run: cargo test --verbose
- name: Celebratory yahoo
run: echo yahoo

View file

@ -1,5 +1,5 @@
edition = "2021"
error_on_line_overflow = true
# error_on_line_overflow = true
newline_style = "Unix"
single_line_if_else_max_width = 60
single_line_let_else_max_width = 60