Skip to content

Commit c5397a7

Browse files
committed
Discard PlusCal translations in CI
Signed-off-by: Andrew Helwer <[email protected]>
1 parent 6eacad2 commit c5397a7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,15 @@ jobs:
7474
python "$SCRIPT_DIR/unicode_number_set_shim.py" \
7575
--manifest_path manifest.json
7676
- name: Translate PlusCal
77-
if: (!matrix.unicode) # PlusCal does not yet support unicode
77+
# PlusCal translations will be reverted at the end of this step,
78+
# since we want to support people manually editing the generated TLA+
79+
# code in specs they submit as examples. However, running the PlusCal
80+
# translator is currently the only way to ensure that specs contain
81+
# valid PlusCal syntax. So, we have to run the translator and then
82+
# discard the results. However, discarding the results with git reset
83+
# also would discard the Unicode translation. So, only execute this
84+
# step if we did not perform Unicode translation.
85+
if: (!matrix.unicode)
7886
run: |
7987
# https://github.com/tlaplus/tlaplus/issues/906
8088
SKIP=(
@@ -86,12 +94,7 @@ jobs:
8694
--tools_jar_path $DEPS_DIR/tools/tla2tools.jar \
8795
--manifest_path manifest.json \
8896
--skip "${SKIP[@]}"
89-
if [[ "${{ matrix.unicode }}" == "false" ]]; then
90-
git status
91-
git diff
92-
diff_count=$(git status --porcelain=v1 2>/dev/null | wc -l)
93-
exit $diff_count
94-
fi
97+
git reset --hard HEAD # Restore specs to their original state
9598
- name: Parse all modules
9699
run: |
97100
python $SCRIPT_DIR/parse_modules.py \

0 commit comments

Comments
 (0)