2024-01-30 04:56:58 +01:00
|
|
|
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
|
2024-01-30 05:57:45 +01:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2024-01-30 04:56:58 +01:00
|
|
|
- name: Cache stuff
|
|
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Get dependencies
|
2024-06-04 17:55:06 +02:00
|
|
|
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler xwayland libegl-dev liblua5.4-dev libdisplay-info-dev
|
2024-04-21 02:38:20 +02:00
|
|
|
- name: Setup Lua
|
|
|
|
uses: leafo/gh-actions-lua@v10
|
|
|
|
with:
|
|
|
|
luaVersion: "5.4"
|
2024-01-30 04:56:58 +01:00
|
|
|
- name: Setup LuaRocks
|
|
|
|
uses: leafo/gh-actions-luarocks@v4
|
|
|
|
- name: Build
|
|
|
|
run: cargo build --verbose
|
|
|
|
- name: Celebratory yahoo
|
|
|
|
run: echo yahoo
|
2024-02-17 07:05:10 +01:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Run tests
|
|
|
|
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
|
2024-06-04 17:55:06 +02:00
|
|
|
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler xwayland libegl-dev foot liblua5.4-dev libdisplay-info-dev
|
2024-04-21 02:38:20 +02:00
|
|
|
- name: Setup Lua
|
|
|
|
uses: leafo/gh-actions-lua@v10
|
|
|
|
with:
|
|
|
|
luaVersion: "5.4"
|
2024-02-17 07:05:10 +01:00
|
|
|
- name: Setup LuaRocks
|
|
|
|
uses: leafo/gh-actions-luarocks@v4
|
2024-04-24 00:01:44 +02:00
|
|
|
- name: Setup just
|
|
|
|
uses: extractions/setup-just@v1
|
2024-04-23 03:54:47 +02:00
|
|
|
- name: Test
|
2024-03-07 01:59:15 +01:00
|
|
|
if: ${{ runner.debug != '1' }}
|
2024-04-24 00:01:44 +02:00
|
|
|
run: just install test -- --test-threads=1
|
2024-04-23 03:54:47 +02:00
|
|
|
- name: Test (debug)
|
2024-03-07 01:59:15 +01:00
|
|
|
if: ${{ runner.debug == '1' }}
|
2024-04-24 00:01:44 +02:00
|
|
|
run: RUST_LOG=debug RUST_BACKTRACE=1 just install test -- --nocapture --test-threads=1
|
2024-01-30 04:56:58 +01:00
|
|
|
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
|
2024-01-31 00:00:25 +01:00
|
|
|
clippy-check:
|
2024-01-30 04:56:58 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-31 00:00:25 +01:00
|
|
|
name: Clippy check
|
2024-01-30 04:56:58 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get Rust toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
components: clippy
|
2024-03-07 05:56:22 +01:00
|
|
|
- name: Cache stuff
|
|
|
|
uses: Swatinem/rust-cache@v2
|
2024-01-31 00:00:25 +01:00
|
|
|
- name: Get dependencies
|
2024-06-04 17:55:06 +02:00
|
|
|
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev protobuf-compiler xwayland libegl-dev liblua5.4-dev libdisplay-info-dev
|
2024-04-21 02:38:20 +02:00
|
|
|
- name: Setup Lua
|
|
|
|
uses: leafo/gh-actions-lua@v10
|
|
|
|
with:
|
|
|
|
luaVersion: "5.4"
|
2024-01-31 00:00:25 +01:00
|
|
|
- name: Setup LuaRocks
|
|
|
|
uses: leafo/gh-actions-luarocks@v4
|
|
|
|
- name: Clippy check
|
2024-04-24 00:01:44 +02:00
|
|
|
run: cargo clippy --all -- -D warnings
|