Fix ++ argument , all handled Identifier arguments (like x++) and #127
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**/*.md" | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**/*.md" | |
| # Restrict default permissions - principle of least privilege | |
| permissions: | |
| contents: read | |
| # Cancel in-progress runs for same PR/branch to save resources | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| # Limit job execution time to prevent resource abuse | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Install LLVM 18 (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| wget -qO- https://apt.llvm.org/llvm.sh -O llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y libpolly-18-dev | |
| echo "LLVM_SYS_180_PREFIX=/usr/lib/llvm-18" >> $GITHUB_ENV | |
| - name: Install LLVM 18 (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install llvm@18 zstd | |
| echo "LLVM_SYS_180_PREFIX=$(brew --prefix llvm@18)" >> $GITHUB_ENV | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 # v4.2.3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run Rust tests | |
| run: cargo test --release | |
| - name: Run bootstrap verification | |
| run: | | |
| chmod +x scripts/bootstrap_verify.sh | |
| scripts/bootstrap_verify.sh | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Install LLVM 18 | |
| run: | | |
| wget -qO- https://apt.llvm.org/llvm.sh -O llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y libpolly-18-dev | |
| echo "LLVM_SYS_180_PREFIX=/usr/lib/llvm-18" >> $GITHUB_ENV | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 # v4.2.3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ubuntu-cargo-lint-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ubuntu-cargo-lint- | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets -- -D warnings |