Skip to content

Commit e18823b

Browse files
committed
Use macOS runner, minor script debug output fixes
Signed-off-by: Andrew Helwer <[email protected]>
1 parent 8cef3cf commit e18823b

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.github/scripts/smoke_test_large_models.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,25 @@ def check_model(module_path, model):
4848
)
4949
match tlc_result:
5050
case TimeoutExpired():
51-
logging.debug(tlc_result.stdout)
51+
args, _ = tlc_result.args
52+
logging.debug(' '.join(args))
53+
logging.debug(
54+
# Returns string on Windows, bytes everywhere else
55+
tlc_result.stdout
56+
if type(tlc_result.stdout) == str
57+
else tlc_result.stdout.decode('utf-8')
58+
)
5259
return True
5360
case CompletedProcess():
61+
output = ' '.join(tlc_result.args) + '\n' + tlc_result.stdout
5462
logging.warning(f'Model {model_path} finished quickly, within {smoke_test_timeout_in_seconds} seconds; consider labeling it a small model')
5563
expected_result = model['result']
5664
actual_result = tla_utils.resolve_tlc_exit_code(tlc_result.returncode)
57-
if expected_result != actual_result:
65+
if expected_result == actual_result:
66+
logging.debug(output)
67+
else:
5868
logging.error(f'Model {model_path} expected result {expected_result} but got {actual_result}')
59-
logging.error(tlc_result.stdout)
69+
logging.error(output)
6070
return False
6171
return True
6272
case _:

.github/scripts/tla_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def write_json(data, path):
5252

5353
def parse_module(examples_root, parser, path):
5454
"""
55-
Parses a .tla file; returns the parse tree along with whether a parse
56-
error was detected.
55+
Parses a .tla file with tree-sitter; returns the parse tree along with
56+
whether a parse error was detected.
5757
"""
5858
module_text = None
5959
path = from_cwd(examples_root, path)

.github/workflows/CI.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
# macOS not used; see https://github.com/tlaplus/Examples/issues/119
19-
os: [windows-latest, ubuntu-latest]
18+
os: [windows-latest, ubuntu-latest, macos-latest]
2019
unicode: [true, false]
2120
fail-fast: false
2221
env:

0 commit comments

Comments
 (0)