Skip to content

Commit

Permalink
Merge pull request #14 from skanehira/main
Browse files Browse the repository at this point in the history
Add CI
  • Loading branch information
ainozaki authored Jan 18, 2024
2 parents 64e65b2 + 78e6f0a commit 8edd256
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 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
5 changes: 3 additions & 2 deletions tests/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ fn run_spec_test(testname: &str) {
println!("Compile Module {:?}", name);
compiler::compile_wasm(&module_binary).expect("compile failed");
}
// TODO: support assertion
_ => {}
_ => {
// TODO: support assertion
}
}
}
}
Expand Down

0 comments on commit 8edd256

Please sign in to comment.