From 2687bc1bd9ed76170df52057b15680be59038bc2 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 16 Jan 2025 13:52:17 +0100 Subject: [PATCH] Add Runic to CI and generator. --- .github/workflows/Check.yml | 13 +++++++++++++ gen/Makefile | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Check.yml b/.github/workflows/Check.yml index 732e133..efb9eb5 100644 --- a/.github/workflows/Check.yml +++ b/.github/workflows/Check.yml @@ -58,3 +58,16 @@ jobs: @warn "$(ext) extension not available." end end + + runic: + name: Runic + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + - uses: julia-actions/cache@v2 + - uses: fredrikekre/runic-action@v1 + with: + version: '1' diff --git a/gen/Makefile b/gen/Makefile index 04591d2..af9b6a5 100644 --- a/gen/Makefile +++ b/gen/Makefile @@ -1,2 +1,13 @@ -default: - julia --project generator.jl +LIBHYPRE:=$(shell dirname $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))))/lib/LibHYPRE.jl + +generate: $(LIBHYPRE) Project.toml Manifest.toml + +clean: + rm -f $(LIBHYPRE) + +.PHONY: generate clean + +$(LIBHYPRE): + julia --project generator.jl && \ + sed -i -e 's/using HYPRE_jll/using HYPRE_jll: HYPRE_jll, libHYPRE/' -e 's/using CEnum/using CEnum: @cenum/' $(LIBHYPRE) && \ + julia-1.11 --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- -i $(LIBHYPRE)