autotranslate: address review #958 (gate correctness + polish) #707
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| # "Only compilable code should pass": every example .scala the mirror translates via CodeGlossary must | |
| # still compile after the identifier rename (catches e.g. an s-interpolation left pointing at a renamed | |
| # field). Runs from source (renders on the fly) — no mirror/texlive needed, so it's a fast, standalone gate. | |
| Example-compile-gate: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Setup scala-cli | |
| uses: VirtusLab/scala-cli-setup@v1 | |
| - name: Compile gate for mirror example translation | |
| run: scala-cli run autotranslate/scratch/verify-mirror-examples.scala -- . | |
| shell: bash | |
| Compile-and-Build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup dependencies | |
| run: | | |
| sudo apt-get update && | |
| sudo apt-get install texlive-full texlive-latex-extra texlive-lang-all -y | |
| shell: bash | |
| - name: Get SBT info | |
| run: sbt about | |
| shell: bash | |
| - name: Check Scala version | |
| run: sbt scalaVersion | |
| shell: bash | |
| - name: Compile workspace | |
| run: sbt workspace/compile | |
| shell: bash | |
| - name: Build | |
| run: sbt build | |
| shell: bash | |
| # If the path is correctly set | |
| # this will upload generated pdfs as artifacts | |
| # maybe we just want the compendium? | |
| # - name: Upload PDF artifacts | |
| # uses: actions/upload-artifact@v2 | |
| # with: | |
| # name: PDF | |
| # path: ./*.pdf |