Skip to content

Commit

Permalink
Merge pull request #8 from halo3mic/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
halo3mic authored Nov 26, 2024
2 parents 59714c4 + bc8d888 commit 9b0d4f7
Show file tree
Hide file tree
Showing 44 changed files with 1,765 additions and 1,487 deletions.
13 changes: 13 additions & 0 deletions .github/scripts/install_llvm_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eo pipefail

v=${1:-$LLVM_VERSION}
bins=(clang llvm-config lld ld.lld FileCheck)
llvm_sh=$(mktemp)

wget https://apt.llvm.org/llvm.sh -O "$llvm_sh"
chmod +x "$llvm_sh"
"$llvm_sh" "$v" all
for bin in "${bins[@]}"; do
ln -fs "$(which "$bin-$v")" "/usr/bin/$bin"
done
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Rust CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
rust-check:
name: Rust Linting and Formatting
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy, rustfmt
override: true

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Install LLVM
run: sudo .github/scripts/install_llvm_ubuntu.sh 18

- name: Run cargo clippy
run: cargo clippy -- -D warnings
Loading

0 comments on commit 9b0d4f7

Please sign in to comment.