luau/.github/workflows/prototyping.yml
2022-03-03 14:32:22 -08:00

67 lines
2.1 KiB
YAML

name: prototyping
on:
pull_request:
paths:
- '.github/workflows/prototyping.yml'
- 'prototyping/**'
env:
AGDA_VERSION: 2.6.2.1
INDEX_STATE: '@1646344160'
jobs:
linux:
name: prototyping
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: ~/.cabal/store
key: prototyping-${{ runner.os }}-${{ env.AGDA_VERSION }}-${{ env.INDEX_STATE }}
- 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 --index-state=${{ env.INDEX_STATE }}
- name: cabal install
working-directory: prototyping
run: |
cabal install Agda-${{ env.AGDA_VERSION }} --index-state=${{ env.INDEX_STATE }} --verbose=2
cabal install --lib scientific vector aeson --package-env . --index-state=${{ env.INDEX_STATE }} --verbose=2
- name: check targets
working-directory: prototyping
run: |
~/.cabal/bin/agda Everything.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.py -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