|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - master |
| 8 | + pull_request: |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +jobs: |
| 19 | + lean: |
| 20 | + name: Lean build and tests |
| 21 | + runs-on: ubuntu-latest |
| 22 | + |
| 23 | + steps: |
| 24 | + - name: Check out repository |
| 25 | + uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - name: Install elan |
| 28 | + shell: bash |
| 29 | + run: | |
| 30 | + set -euo pipefail |
| 31 | + curl --proto '=https' --tlsv1.2 -sSf \ |
| 32 | + https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh \ |
| 33 | + -o /tmp/elan-init.sh |
| 34 | + sh /tmp/elan-init.sh -y --default-toolchain none |
| 35 | + echo "$HOME/.elan/bin" >> "$GITHUB_PATH" |
| 36 | +
|
| 37 | + - name: Install pinned Lean toolchain |
| 38 | + shell: bash |
| 39 | + run: | |
| 40 | + set -euo pipefail |
| 41 | + export PATH="$HOME/.elan/bin:$PATH" |
| 42 | + toolchain="$(tr -d '[:space:]' < lean-toolchain)" |
| 43 | + elan toolchain install "$toolchain" |
| 44 | + lean --version |
| 45 | + lake --version |
| 46 | +
|
| 47 | + - name: Build Lean library |
| 48 | + run: lake build CSem |
| 49 | + |
| 50 | + - name: Run Lean test executables |
| 51 | + run: | |
| 52 | + lake exe parser_generator_tests |
| 53 | + lake exe parser_tests |
| 54 | + lake exe parser_vy_importer_tests |
| 55 | + lake exe parser_vy_full_grammar_tests |
| 56 | + lake exe parser_vy_lr_validation |
| 57 | + lake exe semantics_tests |
| 58 | +
|
| 59 | + - name: Build export tools |
| 60 | + run: lake build c_parse_export c_elab_export |
| 61 | + |
| 62 | + rust: |
| 63 | + name: Rust parser importer |
| 64 | + runs-on: ubuntu-latest |
| 65 | + |
| 66 | + steps: |
| 67 | + - name: Check out repository |
| 68 | + uses: actions/checkout@v4 |
| 69 | + |
| 70 | + - name: Select stable Rust |
| 71 | + run: rustup default stable |
| 72 | + |
| 73 | + - name: Check parser importer |
| 74 | + run: cargo check --manifest-path tools/rust/Cargo.toml --locked |
0 commit comments