editing... #101
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and test on Mac | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - workflow | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| deploy-owl: | |
| name: Install Owl | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: macos fix | |
| if: runner.os == 'Macos' | |
| run: | | |
| brew update | |
| brew upgrade | |
| brew install pkgconf | |
| # work around https://github.com/actions/runner-images/issues/10984 | |
| - name: Deps | |
| # git build-essential wget unzip aspcud m4 pkg-config libshp-dev libopenblas-dev liblapacke-dev | |
| # brew install llvm libomp aspcud | |
| # export CC=/usr/local/opt/llvm/bin/clang | |
| # export CXX=/usr/local/opt/llvm/bin/clang++ | |
| run: | | |
| brew install llvm libomp aspcud | |
| export PATH="/opt/homebrew/opt/llvm/bin:$PATH" | |
| export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" | |
| export CPPFLAGS="-I/opt/homebrew/opt/llvm/include" | |
| export CC=/opt/homebrew/opt/llvm/bin/clang | |
| export CXX=/opt/homebrew/opt/llvm/bin/clang++ | |
| which clang | |
| ls -l $(which cc) | |
| cc --version | |
| type -a cc | |
| - name: Use OCaml | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: 5 | |
| # opam-local-packages: | | |
| # *.opam | |
| dune-cache: true | |
| allow-prerelease-opam: true | |
| - name: OCaml Deps | |
| run: opam install ocaml-compiler-libs alcotest conf-openblas ctypes dune-configurator stdio npy | |
| - name: Compile Owl, install | |
| run: opam exec -- dune build @install | |
| - name: Run tests | |
| run: | | |
| opam install owl-base | |
| opam exec -- dune runtest -j 1 --no-buffer -p owl |