Skip to content

Commit

Permalink
Test ci-macos
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-larraz committed May 22, 2024
1 parent 8f13571 commit 61f7f90
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/actions/build-kind2-macos/action.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 9 additions & 2 deletions .github/workflows/kind2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down

0 comments on commit 61f7f90

Please sign in to comment.