⬆️ deps: Update Rust crate clap to v4.5.54 #690
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
| name: Rcalc Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| LLVM_VERSION: 21.1 | |
| LLVM_VERSION_MAJOR: 21 | |
| jobs: | |
| test-rcalc: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Dependencies | |
| run: sudo apt update && sudo apt install -y libtinfo5 | |
| - name: Update rust toolchain | |
| run: rustup update | |
| - name: Install LLVM and Clang | |
| run: | | |
| sudo apt install --no-install-recommends -y lsb-release wget software-properties-common gnupg | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh ${{ env.LLVM_VERSION_MAJOR }} | |
| sudo apt-get update | |
| sudo apt install --no-install-recommends -y libllvm${{ env.LLVM_VERSION_MAJOR }} \ | |
| llvm-${{ env.LLVM_VERSION_MAJOR }} \ | |
| llvm-${{ env.LLVM_VERSION_MAJOR }}-dev \ | |
| llvm-${{ env.LLVM_VERSION_MAJOR }}-runtime \ | |
| libpolly-${{ env.LLVM_VERSION_MAJOR }}-dev | |
| sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${{ env.LLVM_VERSION_MAJOR }} 10 | |
| - name: Run llvm-config | |
| run: llvm-config --version --bindir --libdir | |
| - name: Cache cargo build | |
| uses: actions/cache@v5 | |
| 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" ]] |