From 57d80f1ae35b481c8d9a809a021bdc84fa06d462 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 13 Jan 2024 16:19:20 -0500 Subject: [PATCH] [CI] Test the Julia interface GALAHAD.jl --- .cirrus.yml | 24 ++++++++++++++++++++++++ .github/workflows/meson.yml | 7 +++++++ 2 files changed, 31 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 8680de3cab..7317c9a60c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,9 +3,13 @@ task: - name: FreeBSD freebsd_instance: image: freebsd-13-2-release-amd64 + env: + - JULIA_VERSION: 1 - name: MacOS M1 macos_instance: image: ghcr.io/cirruslabs/macos-monterey-base:latest + env: + - JULIA_VERSION: 1 dependencies_script: | echo $(uname) if [ "$(uname)" = "FreeBSD" ]; then @@ -17,9 +21,29 @@ task: pip3 install numpy echo "JULIA_GALAHAD_LIBRARY_PATH=/opt/homebrew/lib" >> $CIRRUS_ENV fi + echo "JULIA_PROJECT_SUBDIR=GALAHAD.jl" >> $CIRRUS_ENV echo "GALAHAD=$CIRRUS_WORKING_DIR" >> $CIRRUS_ENV echo "OMP_CANCELLATION=TRUE" >> $CIRRUS_ENV echo "OMP_PROC_BIND=TRUE" >> $CIRRUS_ENV + julia_install_script: | + # URL="https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh" + URL="https://raw.githubusercontent.com/amontoison/CirrusCI.jl/package_subfolder/bin/install.sh" + set -x + if [ "$(uname -s)" = "Linux" ] && command -v apt; then + apt update + apt install -y curl + fi + if command -v curl; then + sh -c "$(curl ${URL})" + elif command -v wget; then + sh -c "$(wget ${URL} -q -O-)" + elif command -v fetch; then + sh -c "$(fetch ${URL} -o -)" + fi + julia_build_script: | + cirrusjl build + julia_test_script: | + cirrusjl test configure_script: | if [ "$(uname -s)" = "FreeBSD" ]; then FC=gfortran12 CC=gcc12 CXX=g++12 meson setup builddir --buildtype=debug -Dexamples=true -Dtests=true -Dpythoniface=true diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 76b0c6a9c6..4d5f330648 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -218,3 +218,10 @@ jobs: with: name: ${{ matrix.os }}_${{ matrix.compiler }}_${{ matrix.version }}_testlog.txt path: builddir/meson-logs/testlog.txt + + - name: Install Julia + uses: julia-actions/setup-julia@v1 + + - name: Test GALAHAD.jl + shell: bash + run: julia --color=yes -e 'using Pkg; Pkg.develop(path="GALAHAD.jl"); Pkg.test("GALAHAD")