-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (30 loc) · 1.15 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Execute official test suite
run: |
# https://github.com/munificent/craftinginterpreters/issues/993#issuecomment-1613917808
wget https://storage.googleapis.com/dart-archive/channels/stable/release/2.12.0/sdk/dartsdk-linux-x64-release.zip
unzip dartsdk-linux-x64-release.zip
# This is the one test where rlox actually reports error like clox instead of jlox.
sed '2d;1s/3/2/' ext/craftinginterpreters/test/unexpected_character.lox -i
(cd ext/craftinginterpreters/tool && ../../../dart-sdk/bin/dart pub get)
cargo build --features strict && (cd ext/craftinginterpreters && ../../dart-sdk/bin/dart tool/bin/test.dart jlox --interpreter ../../target/debug/rlox)
- name: Run tests (release)
run: cargo test --release --verbose