2022-02-09 08:26:58 +08:00
|
|
|
name: prototyping
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-02-25 09:08:54 +08:00
|
|
|
- '.github/workflows/prototyping.yml'
|
2022-02-09 08:26:58 +08:00
|
|
|
- 'prototyping/**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-04-09 13:07:08 +08:00
|
|
|
agda: [2.6.2.2]
|
|
|
|
hackageDate: ["2022-04-07"]
|
|
|
|
hackageTime: ["23:06:28"]
|
2022-02-09 08:26:58 +08:00
|
|
|
name: prototyping
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.cabal/store
|
2022-04-09 13:07:08 +08:00
|
|
|
key: "prototyping-${{ runner.os }}-${{ matrix.agda }}-${{ matrix.hackageDate }}-${{ matrix.hackageTime }}"
|
2022-02-18 09:15:33 +08:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
id: luau-ast-cache
|
|
|
|
with:
|
|
|
|
path: ./build
|
|
|
|
key: prototyping-${{ runner.os }}-${{ hashFiles('Ast/**', 'Analysis/**', 'CLI/Ast.cpp', 'CLI/FileUtils.*')}}
|
2022-02-09 08:26:58 +08:00
|
|
|
- name: install cabal
|
|
|
|
run: sudo apt-get install -y cabal-install
|
|
|
|
- name: cabal update
|
|
|
|
working-directory: prototyping
|
2022-04-09 13:07:08 +08:00
|
|
|
run: cabal v2-update "hackage.haskell.org,${{ matrix.hackageDate }}T${{ matrix.hackageTime }}Z"
|
2022-02-09 08:26:58 +08:00
|
|
|
- name: cabal install
|
|
|
|
working-directory: prototyping
|
|
|
|
run: |
|
2022-02-18 09:15:33 +08:00
|
|
|
cabal install --lib scientific vector aeson --package-env .
|
2022-04-09 13:07:08 +08:00
|
|
|
cabal install --allow-newer Agda-${{ matrix.agda }}
|
2022-02-18 09:15:33 +08:00
|
|
|
- name: check targets
|
2022-02-09 08:26:58 +08:00
|
|
|
working-directory: prototyping
|
2022-02-18 09:15:33 +08:00
|
|
|
run: |
|
2022-03-03 07:26:58 +08:00
|
|
|
~/.cabal/bin/agda Everything.agda
|
2022-02-10 07:14:29 +08:00
|
|
|
- name: build executables
|
2022-02-09 08:26:58 +08:00
|
|
|
working-directory: prototyping
|
2022-02-10 07:14:29 +08:00
|
|
|
run: |
|
|
|
|
~/.cabal/bin/agda --compile PrettyPrinter.agda
|
|
|
|
~/.cabal/bin/agda --compile Interpreter.agda
|
2022-02-09 08:26:58 +08:00
|
|
|
- name: cmake configure
|
2022-02-18 09:15:33 +08:00
|
|
|
if: steps.luau-ast-cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
cmake build ../
|
2022-02-09 08:26:58 +08:00
|
|
|
- name: cmake build luau-ast
|
2022-02-18 09:15:33 +08:00
|
|
|
if: steps.luau-ast-cache.outputs.cache-hit != 'true'
|
2022-02-10 07:14:29 +08:00
|
|
|
run: |
|
2022-02-18 09:15:33 +08:00
|
|
|
cmake --build ./build --target Luau.Ast.CLI
|
|
|
|
- name: run tests
|
2022-02-09 08:26:58 +08:00
|
|
|
working-directory: prototyping
|
2022-02-18 09:15:33 +08:00
|
|
|
run: |
|
|
|
|
mkdir test-failures
|
2022-02-19 02:04:38 +08:00
|
|
|
python tests.py -l ../build/luau-ast --write-diff-failures --diff-failure-location test-failures/
|
2022-02-18 09:15:33 +08:00
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: test failures
|
|
|
|
path: prototyping/test-failures
|
|
|
|
retention-days: 5
|