Skip to content

Commit

Permalink
Fix issues in the GitHub Actions runner for MacOS (#843)
Browse files Browse the repository at this point in the history
* Remove unused opam package caching

* Use newer versions of existing actions

* Use non-ARM runner for MacOS

* Increase timeout for MacOS runner
  • Loading branch information
larshum authored May 29, 2024
1 parent e2c9bd6 commit 24505bd
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install OCaml and opam for Miking
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ocaml-base-compiler.5.0.0

- name: Install Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Cache opam packages
uses: actions/cache@v3
with:
path: ~/.opam
key: ${{ runner.os }}-opam-build

- name: Install opam packages
run: |
# Install dependencies of owl
Expand All @@ -51,32 +45,26 @@ jobs:
make test-all
build-and-test-mac-os:
runs-on: macos-latest
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install OCaml and opam for Miking
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ocaml-base-compiler.5.0.0

- name: Install Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Cache opam packages
uses: actions/cache@v3
with:
path: ~/.opam
key: ${{ runner.os }}-opam-build

- name: Install opam packages
run: |
# Install dependencies of owl
brew install pkg-config
brew install pkg-config autoconf openblas
# Export environment variable needed by openblas
export PKG_CONFIG_PATH=$(brew --prefix openblas)/lib/pkgconfig
Expand All @@ -89,7 +77,7 @@ jobs:
opam install -y dune linenoise pyml toml lwt owl ocamlformat.0.24.1
- name: Build Miking
timeout-minutes: 10
timeout-minutes: 30
run: |
eval $(opam env)
make install
Expand Down

0 comments on commit 24505bd

Please sign in to comment.