From 72963d9c4e9ee310291c6db05fa312726d53a60f Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 13 Jan 2024 17:00:38 -0500 Subject: [PATCH 1/2] [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..9691ecdfcf 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,6 +21,7 @@ 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 @@ -32,6 +37,25 @@ task: meson install -C builddir test_script: | meson test -C builddir + 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 on_failure: log_artifacts: path: builddir/meson-logs/*log.txt 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") From bb68fea7cdfabdf419a8b9de210d1fc46f91b4b8 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 13 Jan 2024 18:56:49 -0500 Subject: [PATCH 2/2] Test the Julia interface with GHA --- .github/workflows/meson.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 4d5f330648..4cb2589578 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -224,4 +224,4 @@ jobs: - name: Test GALAHAD.jl shell: bash - run: julia --color=yes -e 'using Pkg; Pkg.develop(path="GALAHAD.jl"); Pkg.test("GALAHAD") + run: julia --color=yes -e 'using Pkg; Pkg.develop(path="GALAHAD.jl"); Pkg.test("GALAHAD")'