⬆️ deps: Update actions/checkout action to v5 (#211) #665
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
| name: Rcalc Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| LLVM_VERSION: 18.1 | |
| jobs: | |
| test-rcalc: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Dependencies | |
| run: sudo apt update && sudo apt install -y libtinfo5 | |
| - name: Update rust toolchain | |
| run: rustup update | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: ${{ env.LLVM_VERSION }} | |
| - name: Run llvm-config | |
| run: llvm-config --version --bindir --libdir | |
| - 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" ]] |