mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-25 09:59:21 +01:00
97 lines
2.8 KiB
YAML
97 lines
2.8 KiB
YAML
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-review:
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
issues: write
|
|
pull-requests: write
|
|
runs-on: ubuntu-latest
|
|
name: Clippy review
|
|
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: 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: Run Clippy fix
|
|
run: cargo clippy --fix --allow-dirty
|
|
- name: Clippy review
|
|
uses: reviewdog/action-suggester@v1
|
|
with:
|
|
tool_name: clippy
|
|
clippy-check:
|
|
runs-on: ubuntu-latest
|
|
name: Clippy check
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Get Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
- 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: Clippy check
|
|
run: cargo clippy -- -D warnings
|