diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2339313..8624b1f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-13] - ocaml-compiler: ['0', '1'] + ocaml-compiler: ['4.13.1', '5.1.0'] env: EXAMPLES_DIR: "tlaplus-examples" SCRIPT_DIR: "tlaplus-examples/.github/scripts" @@ -26,21 +26,9 @@ jobs: run: | sudo apt-get update sudo apt-get install --yes time - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Get OCaml version - run: | - INDEX=${{ matrix.ocaml-compiler }} - OCAML_VERSION=\ - `python .github/workflows/ocaml_versions.py $INDEX` - echo "OCAML_VERSION=$OCAML_VERSION" \ - >> $GITHUB_ENV - echo "OCAML_VERSION = $OCAML_VERSION" - uses: ocaml/setup-ocaml@v2 with: - ocaml-compiler: ${{ env.OCAML_VERSION }} + ocaml-compiler: matrix.ocaml-compiler # - uses: actions/cache@v3 # id: cache # with: @@ -65,6 +53,10 @@ jobs: with: repository: tlaplus/examples path: ${{ env.EXAMPLES_DIR }} + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Check proofs in TLA+ examples run: | mkdir -p "$DEPS_DIR" diff --git a/.github/workflows/ocaml_versions.py b/.github/workflows/ocaml_versions.py deleted file mode 100644 index 339e6e2c..00000000 --- a/.github/workflows/ocaml_versions.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Array of OCaml versions tested in CI.""" -import argparse - - -OCAML_VERSIONS = [ - '4.13.1', - '5.1.0', - ] - - -def _main(): - """Entry point.""" - index = _parse_args() - ocaml_version = OCAML_VERSIONS[index] - print(ocaml_version) - - -def _parse_args(): - """Return command-line arguments.""" - parser = argparse.ArgumentParser() - parser.add_argument( - 'index', - help='index in array of OCaml versions, ' - 'to return the corresponding ' - 'OCaml version', - type=int) - args = parser.parse_args() - return args.index - - -if __name__ == '__main__': - _main() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3611dea6..ab85e026 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,7 @@ jobs: macos-13, ubuntu-latest] ocaml-compiler: [ - '2', + '4.13.1', ] steps: - name: Install deps @@ -72,10 +72,6 @@ jobs: run: | sudo apt-get update sudo apt-get install --yes time - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.10' # Read "Output Release URL and # ID File" of `release` job above. - name: Load Release URL File from release job @@ -94,17 +90,9 @@ jobs: TAG_REF_NAME: ${{ github.ref }} REPOSITORY_NAME: ${{ github.repository }} - uses: actions/checkout@v2 - - name: Get OCaml version - run: | - INDEX=${{ matrix.ocaml-compiler }} - OCAML_VERSION=\ - `python .github/workflows/ocaml_versions.py $INDEX` - echo "OCAML_VERSION=$OCAML_VERSION" \ - >> $GITHUB_ENV - echo "OCAML_VERSION = $OCAML_VERSION" - uses: ocaml/setup-ocaml@v2 with: - ocaml-compiler: ${{ env.OCAML_VERSION }} + ocaml-compiler: matrix.ocaml-compiler # - uses: actions/cache@v3 # id: cache # with: @@ -122,7 +110,6 @@ jobs: eval $(opam env) make test-inline test-fast-basic - name: Upload Release Asset - if: matrix.ocaml-compiler == '2' id: upload-release-asset uses: actions/upload-release-asset@v1.0.1 env: