Skip to content

Commit

Permalink
chore: add ci (#1)
Browse files Browse the repository at this point in the history
* chore: add ci

* fix

* fix
  • Loading branch information
skanehira authored Jan 1, 2024
1 parent 936e5d1 commit 13ec931
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Setup

runs:
using: composite
steps:
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install LLVM
shell: bash
run: |
export LLVM_URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.0/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4.tar.xz
sudo mkdir -p /usr/local/llvm \
&& sudo wget ${LLVM_URL} -O /tmp/llvm.tar.xz \
&& sudo tar -xvf /tmp/llvm.tar.xz -C /usr/local/llvm \
&& sudo rm /tmp/llvm.tar.xz
echo "/usr/local/llvm/bin" >> $GITHUB_PATH
echo "LLVM_SYS_150_PREFIX=/usr/local/llvm/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4" >> $GITHUB_ENV
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
jobs:
lint:
runs-on: ubuntu-latest
name: Run clippy
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/workflows/actions/setup
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-latest
name: Run test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/workflows/actions/setup
- name: Run test
run: cargo test --all -- --nocapture

0 comments on commit 13ec931

Please sign in to comment.