Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint and CI #3

Merged
merged 3 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches:
- main
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
runs-on: ubuntu-24.04
# TODO: requires a public repository
# - target: aarch64-unknown-linux-musl
# runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- run: sudo apt-get install -y musl-tools
- uses: Swatinem/rust-cache@v2
- run: cargo build --release --target ${{ matrix.target }}
env:
RUSTFLAGS: "-C target-feature=+crt-static"
- uses: actions/upload-artifact@v4
with:
name: acolyte-${{ matrix.target }}
path: target/${{ matrix.target }}/release/acolyte
lint-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --no-deps
lint-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: akx/[email protected]
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
Loading