Skip to content

Commit

Permalink
Adds CI - Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoPonzi committed Feb 11, 2024
1 parent a7be89f commit 33ac3e1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check Specs & Metadata
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
validate:
name: Validate Manifest, Specs, & Models
runs-on: ubuntu-latest
env:
SCRIPT_DIR: .github/workflows
defaults:
run:
shell: bash
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
- name: Download TLA⁺ dependencies
run: $SCRIPT_DIR/setup.sh
- name: Check models
run: $SCRIPT_DIR/wrapper.sh


4 changes: 4 additions & 0 deletions .github/workflows/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# Get TLA⁺ tools
wget -nv http://nightly.tlapl.us/dist/tla2tools.jar -P "."
8 changes: 8 additions & 0 deletions .github/workflows/wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# A small wrapper around TLC
TLC_PATH=$1

TLC_COMMAND="java -Dtlc2.TLC.stopAfter=180 -Dtlc2.TLC.ide=Github -Dutil.ExecutionStatisticsCollector.id=abcdef60f238424fa70d124d0c77ffff -cp tla2tools.jar tlc2.TLC -workers auto -lncheck final -tool -deadlock"
find . -mindepth 1 -maxdepth 1 -type d '!' -exec test -e "{}/.ciignore" ';' -print | grep -v ".git" | xargs -n 1 "$TLC_COMMAND"


0 comments on commit 33ac3e1

Please sign in to comment.