luau/.github/workflows/prototyping.yml
Lily Brown 1ac64af484
Prototyping: Revise CI (#371)
Introduces a test runner with test cases. Also significantly overhauls the GHA configuration.
2022-02-17 17:15:33 -08:00

83 lines
2.2 KiB
YAML

name: prototyping
on:
push:
branches:
- 'master'
- 'prototyping-*'
paths:
- '.github/workflows/**'
- 'prototyping/**'
- 'Analysis/**'
- 'Ast/**'
- 'CLI/Ast.cpp'
- 'CLI/FileUtils.*'
pull_request:
paths:
- '.github/workflows/**'
- 'prototyping/**'
- 'Analysis/**'
- 'Ast/**'
- 'CLI/Ast.cpp'
- 'CLI/FileUtils.*'
jobs:
linux:
strategy:
matrix:
agda: [2.6.2.1]
name: prototyping
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: ~/.cabal/store
key: prototyping-${{ runner.os }}-${{ matrix.agda }}
- uses: actions/cache@v2
id: luau-ast-cache
with:
path: ./build
key: prototyping-${{ runner.os }}-${{ hashFiles('Ast/**', 'Analysis/**', 'CLI/Ast.cpp', 'CLI/FileUtils.*')}}
- name: install cabal
run: sudo apt-get install -y cabal-install
- name: cabal update
working-directory: prototyping
run: cabal update
- name: cabal install
working-directory: prototyping
run: |
cabal install Agda-${{ matrix.agda }}
cabal install --lib scientific vector aeson --package-env .
- name: check targets
working-directory: prototyping
run: |
~/.cabal/bin/agda Examples.agda
~/.cabal/bin/agda Properties.agda
- name: build executables
working-directory: prototyping
run: |
~/.cabal/bin/agda --compile PrettyPrinter.agda
~/.cabal/bin/agda --compile Interpreter.agda
- name: cmake configure
if: steps.luau-ast-cache.outputs.cache-hit != 'true'
run: |
mkdir -p build
cd build
cmake build ../
- name: cmake build luau-ast
if: steps.luau-ast-cache.outputs.cache-hit != 'true'
run: |
cmake --build ./build --target Luau.Ast.CLI
- name: run tests
working-directory: prototyping
run: |
mkdir test-failures
python tests -l ../build/luau-ast --write-diff-failures --diff-failure-location test-failures/
- uses: actions/upload-artifact@v2
if: failure()
with:
name: test failures
path: prototyping/test-failures
retention-days: 5