⬆️ deps: Update Rust crate clap to v4.5.16 #608
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: Rcalc Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
LLVM_VERSION: 17.0 | |
jobs: | |
test-rcalc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update rust toolchain | |
run: rustup update | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2.0.4 | |
with: | |
version: ${{ env.LLVM_VERSION }} | |
- name: Cache cargo build | |
uses: actions/cache@v4 | |
id: cargo-cache | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ env.LLVM_VERSION }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
if: steps.cargo-cache.outputs.cache-hit != 'true' | |
run: cargo build --features="jit" --release --verbose | |
- name: Run tests | |
run: cargo test --features="jit" --release --verbose | |
- name: E2E tests | |
run: | | |
[[ `cargo run --release --features="jit" -- -a=1 -b=-2 "a + b" --jit --pure` == "-1" ]] | |
[[ `cargo run --release -- -a=1 -b=-2 "a + b" --pure` == "-1" ]] | |
[[ `cargo run --release --features="jit" -- -a=1000 -b=7890 "a * b" --jit --pure` == "7890000" ]] | |
[[ `cargo run --release -- -a=1000 -b=7890 "a * b" --pure` == "7890000" ]] | |
[[ `cargo run --release --features="jit" -- -a=1000 -b=7890 "add(a, b)" --jit --pure` == "8890" ]] | |
[[ `cargo run --release -- -a=1000 -b=7890 "add(a, b)" --pure` == "8890" ]] |