Update WAMR (2.3.1) and build configuration #148
Workflow file for this run
This file contains hidden or 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
# Copyright (C) 2019 Intel Corporation. All rights reserved. | |
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
name: linter and test | |
on: | |
# will be triggered on PR events | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
paths: | |
- ".github/**" | |
- "crates/**" | |
- "src/**" | |
push: | |
branches: | |
- main | |
- "dev/**" | |
paths: | |
- "crates/**" | |
- "src/**" | |
# allow to be triggered manually | |
workflow_dispatch: | |
# Cancel any in-flight jobs for the same PR/branch so there's only one active | |
# at a time | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# Make sure CI fails on all warnings, including Clippy lints | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
# linter | |
clippy_check: | |
# ubuntu 24.04 supports have LLVM 18(https://apt.llvm.org/noble/dists/), | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Cache Rust dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Install LLVM 18 | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 18 | |
sudo apt-get install -y llvm-18-dev libclang-18-dev libcurl4-openssl-dev libedit-dev | |
- name: Run Clippy | |
run: | | |
cargo clippy --all-targets --all-features | |
# all test cases with default features | |
test: | |
# ubuntu 24.04 supports LLVM 18(https://apt.llvm.org/noble/dists/), | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache Rust dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Install LLVM 18 | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 18 | |
sudo apt-get install -y llvm-18-dev libclang-18-dev libcurl4-openssl-dev libedit-dev | |
- name: Run test cases | |
run: cargo test --lib | |
- name: Run test cases sequentially | |
run: cargo test --lib -- --ignored --test-threads 1 |