From 9834a15ccdf0d7b69f51c764c20ebdc5fec10b2f Mon Sep 17 00:00:00 2001 From: Stevan Andjelkovic Date: Sun, 3 Nov 2024 15:57:37 +0100 Subject: [PATCH] ci: try removing pkgconfig stuff and only do static on linux --- Makefile | 12 ++++-------- spex.cabal | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index df55a8c..48fa83f 100644 --- a/Makefile +++ b/Makefile @@ -22,13 +22,6 @@ NEW_VERSION = "$(shell awk -F '=' '/^new-version/ \ $(GITHUB_OUTPUT))" endif -# The find command on MacOS doesn't have a -executable flag. -ifeq ($(OS),darwin) -FIND_EXECUTABLE := -perm +0111 -else -FIND_EXECUTABLE := -executable -endif - ifeq ($(OS),linux) CABAL := docker run --rm --entrypoint=cabal \ --volume $(PWD):/mnt \ @@ -37,8 +30,11 @@ ifeq ($(OS),linux) --volume $(PWD)/.container-cache/dist-newstyle:/mnt/dist-newstyle \ --env SPEX_GIT_COMMIT=$(SPEX_GIT_COMMIT) \ ghcr.io/spex-lang/spex-build:latest + ENABLE_STATIC := --enable-executable-static + else CABAL := cabal + ENABLE_STATIC := "" endif all: build-deps build test bump install release @@ -48,7 +44,7 @@ dist-newstyle/cache/plan.json: cabal.project cabal.project.freeze spex.cabal mkdir -p .container-cache/cabal-packages mkdir -p .container-cache/dist-newstyle $(CABAL) configure \ - --enable-executable-static \ + $(ENABLE_STATIC) \ --disable-profiling \ --disable-library-for-ghci \ --enable-library-stripping \ diff --git a/spex.cabal b/spex.cabal index 4fea2a3..ae30a12 100644 --- a/spex.cabal +++ b/spex.cabal @@ -94,8 +94,8 @@ library , transformers , unix - pkgconfig-depends: zlib - extra-libraries: z + -- pkgconfig-depends: zlib + -- extra-libraries: z hs-source-dirs: src default-language: GHC2021