Add node-gyp #649
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: takolib | |
on: [push] | |
env: | |
CARGO_TERM_COLOR: always | |
defaults: | |
run: | |
working-directory: takolib | |
jobs: | |
takolib: | |
name: takolib CI ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] #, windows-latest] | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
/home/runner/.cargo/ | |
target | |
key: ${{ runner.os }}-takolib-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-takolib-cargo-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-takolib-cargo- | |
${{ runner.os }}- | |
- name: Cache LLVM and Clang | |
id: cache-llvm | |
uses: actions/cache@v3 | |
with: | |
path: | | |
C:/Program Files/LLVM | |
./llvm | |
key: llvm-17.0 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "17.0" | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
- name: Setup LLVM_PATH | |
run: "export LLVM_SYS_170_PREFIX=\"$LLVM_PATH\"" | |
- name: Check llvm path | |
run: "echo \"LLVM_PATH: $LLVM_PATH\"; echo \"LLVM_SYS_170_PREFIX: $LLVM_SYS_170_PREFIX\"; ls $LLVM_SYS_170_PREFIX" | |
- name: Run tests | |
run: cargo test --locked --release --verbose | |
- name: Run ignored tests | |
run: cargo test --locked --release --verbose -- --ignored | |
- name: Build | |
run: cargo build --locked --release --verbose | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Clippy | |
run: cargo clippy --all-features -- -D warnings | |
- name: Install fmt | |
run: rustup component add rustfmt | |
- name: Format | |
run: cargo fmt --all -- --check |