fix: Add ctypes-foreign as a dependency of Rune on Linux (#64) #214
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: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout tree | |
uses: actions/checkout@v4 | |
- name: Set-up OCaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: 5 | |
- name: Install system dependencies (Ubuntu) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libev-dev libcurl4-gnutls-dev libcairo2-dev pkg-config libsdl2-dev libblas-dev liblapack-dev | |
- name: Install system dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install libev curl cairo pkg-config sdl2 | |
- name: Install system dependencies (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
# Install additional Cygwin packages needed for the dependencies | |
/cygdrive/d/cygwin/setup-x86_64.exe \ | |
--quiet-mode \ | |
--packages \ | |
git,libcurl-devel,libcairo-devel,libcairo2,pkg-config,libSDL2-devel,\ | |
libfreetype-devel,libpng-devel,libev-devel,\ | |
liblapack-devel,libopenblas,\ | |
mingw64-x86_64-curl,mingw64-x86_64-cairo,mingw64-x86_64-pkg-config,\ | |
mingw64-x86_64-freetype2,mingw64-x86_64-SDL2,cmake \ | |
--root=D:/cygwin \ | |
--site=https://mirrors.kernel.org/sourceware/cygwin/ \ | |
--local-package-dir=D:/cygwin/tmp | |
# Set up environment variables for pkg-config to find MinGW libraries | |
echo "PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
# Ensure MinGW compilers are used | |
echo "CC=x86_64-w64-mingw32-gcc" >> $GITHUB_ENV | |
echo "CXX=x86_64-w64-mingw32-g++" >> $GITHUB_ENV | |
# Add Cygwin MinGW cross-compiler paths | |
echo "PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH" >> $GITHUB_ENV | |
- name: Install OCaml dependencies | |
run: opam install . --deps-only --with-test | |
- name: Build and test nx | |
run: | | |
echo "::group::nx" | |
opam exec -- dune build nx | |
opam exec -- dune build @nx/runtest | |
echo "::endgroup::" | |
- name: Build and test nx-datasets | |
run: | | |
echo "::group::nx-datasets" | |
opam exec -- dune build nx-datasets | |
opam exec -- dune build @nx-datasets/runtest | |
echo "::endgroup::" | |
- name: Build and test saga | |
run: | | |
echo "::group::saga" | |
opam exec -- dune build saga | |
opam exec -- dune build @saga/runtest | |
echo "::endgroup::" | |
- name: Build and test rune | |
run: | | |
echo "::group::rune" | |
opam exec -- dune build rune | |
opam exec -- dune build @rune/runtest | |
echo "::endgroup::" | |
- name: Build and test kaun | |
run: | | |
echo "::group::kaun" | |
opam exec -- dune build kaun | |
opam exec -- dune build @kaun/runtest | |
echo "::endgroup::" | |
- name: Build and test sowilo | |
run: | | |
echo "::group::sowilo" | |
opam exec -- dune build sowilo | |
opam exec -- dune build @sowilo/runtest | |
echo "::endgroup::" | |
- name: Build and test hugin | |
run: | | |
echo "::group::hugin" | |
opam exec -- dune build hugin | |
opam exec -- dune build @hugin/runtest | |
echo "::endgroup::" | |
- name: Build and test quill | |
run: | | |
echo "::group::quill" | |
opam exec -- dune build quill | |
opam exec -- dune build @quill/runtest | |
echo "::endgroup::" |