Skip to content

⬆️ deps: Update dependencies (non-major) #604

⬆️ deps: Update dependencies (non-major)

⬆️ deps: Update dependencies (non-major) #604

Workflow file for this run

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/[email protected]
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" ]]