|
9 | 9 | test: |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | | - - name: Checkout |
13 | | - uses: actions/checkout@v2 |
| 12 | + - id: setup |
| 13 | + name: Setup test environment |
| 14 | + uses: codecrafters-io/codecrafters-action@1e17bec |
14 | 15 | with: |
15 | | - lfs: true |
16 | | - |
17 | | - - name: Set up Go |
18 | | - uses: actions/setup-go@v1 |
19 | | - with: |
20 | | - go-version: 1.22.x |
21 | | - |
22 | | - - name: Set up Python |
23 | | - uses: actions/setup-python@v1 |
24 | | - with: |
25 | | - python-version: '3.11' |
26 | | - |
27 | | - - name: Set up OpenJDKv22 |
28 | | - uses: actions/setup-java@v2 |
29 | | - with: |
30 | | - java-version: '22' |
31 | | - distribution: 'adopt' |
32 | | - |
33 | | - - name: Fetch jlox official implementation |
34 | | - run: git clone https://github.com/munificent/craftinginterpreters.git |
35 | | - |
36 | | - - name: Set up Dart |
37 | | - uses: dart-lang/setup-dart@v1 |
38 | | - with: |
39 | | - sdk: 2.19.6 |
40 | | - |
41 | | - - name: Get Dart dependencies |
42 | | - run: cd craftinginterpreters && make get |
43 | | - |
44 | | - - name: Minor updates to official implementation |
45 | | - # We update the Scanner class to print the unexpected character along with the error message |
46 | | - run: | |
47 | | - sed -i 's/Lox\.error(line, "Unexpected character\.");/Lox\.error(line, "Unexpected character: " + c);/g' craftinginterpreters/java/com/craftinginterpreters/lox/Scanner.java |
48 | | -
|
49 | | - - name: Compile jlox |
50 | | - run: | |
51 | | - cd craftinginterpreters |
52 | | - make java_chapters |
53 | | - cd .. |
54 | | - cp -r ./internal/test_helpers/jlox04/* ./craftinginterpreters/build/gen/chap04_scanning |
55 | | - cp -r ./internal/test_helpers/jlox06/* ./craftinginterpreters/build/gen/chap06_parsing |
56 | | - cp -r ./internal/test_helpers/jlox07/* ./craftinginterpreters/build/gen/chap07_evaluating |
57 | | - cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap08_statements |
58 | | - cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap09_control |
59 | | - cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap10_functions |
60 | | - cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap13_inheritance |
| 16 | + who-to-greet: 'Mona the Octocat' |
61 | 17 |
|
62 | 18 | - run: make test |
0 commit comments