From 61f7f90884ca3bd76dc6a11d3a9cedfb4ba430fd Mon Sep 17 00:00:00 2001 From: Daniel Larraz Date: Wed, 22 May 2024 13:56:22 -0500 Subject: [PATCH] Test ci-macos --- .github/actions/build-kind2-macos/action.yml | 42 ++++++++++++++++++++ .github/workflows/kind2-ci.yml | 11 ++++- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/actions/build-kind2-macos/action.yml diff --git a/.github/actions/build-kind2-macos/action.yml b/.github/actions/build-kind2-macos/action.yml new file mode 100644 index 000000000..87392a398 --- /dev/null +++ b/.github/actions/build-kind2-macos/action.yml @@ -0,0 +1,42 @@ +name: Build Kind 2 +description: Build Kind 2 on current runner +inputs: + ocaml-version: + description: The OCaml compiler version + flambda: + default: false + type: boolean + +runs: + using: composite + steps: + - name: Set OCaml compiler variant + id: ocaml-variant + shell: bash + run: | + echo "::group::Set OCaml compiler variant" + if [[ "${{ inputs.flambda }}" == "true" ]]; then + echo "compiler=ocaml-variants.${{ inputs.ocaml-version }}+options,ocaml-option-flambda" >> $GITHUB_OUTPUT + echo "tag=${{ inputs.ocaml-version }}-flambda" >> $GITHUB_OUTPUT + else + echo "compiler=${{ inputs.ocaml-version }}" >> $GITHUB_OUTPUT + echo "tag=${{ inputs.ocaml-version }}" >> $GITHUB_OUTPUT + fi + echo "::endgroup::" + + - name: Set up OCaml ${{ steps.ocaml-variant.outputs.tag }} + shell: bash + run: | + echo "::group::Set OCaml compiler variant" + wget -qq https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh + echo "~/.local/bin" | sh install.sh + opam init --disable-sandboxing --yes --compiler ${{ steps.ocaml-variant.outputs.compiler }} + echo "::endgroup::" + + - name: Install OCaml dependencies + shell: bash + run: opam install -y . --deps-only + + - name: Build Kind2 + shell: bash + run: opam exec make diff --git a/.github/workflows/kind2-ci.yml b/.github/workflows/kind2-ci.yml index 87f7770ce..c534c7367 100644 --- a/.github/workflows/kind2-ci.yml +++ b/.github/workflows/kind2-ci.yml @@ -11,9 +11,9 @@ jobs: kind2-build: strategy: matrix: - os: [ ubuntu-20.04, macos-12, macos-14 ] + os: [ ubuntu-20.04, macos-11, macos-14 ] include: - - os: macos-12 + - os: macos-11 pkg_update: brew update ocaml-version: 4.09.1 - os: macos-14 @@ -38,9 +38,16 @@ jobs: run: ${{ matrix.pkg_update }} - name: Build Kind 2 + if: runner.os != 'macOS' uses: ./.github/actions/build-kind2 with: ocaml-version: ${{ matrix.ocaml-version }} + + - name: Build Kind 2 + if: runner.os == 'macOS' + uses: ./.github/actions/build-kind2-macos + with: + ocaml-version: ${{ matrix.ocaml-version }} - name: Install Z3 (Ubuntu) if: runner.os == 'Linux'