From f6a36a8d01a969757d784b72de3e4f5da0761cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9cate=20Kleidukos?= Date: Sat, 20 Jul 2024 23:12:41 +0200 Subject: [PATCH] Reshape the cabal project files --- .github/workflows/process-binaries.sh | 6 +++--- .github/workflows/release.yml | 5 +++-- cabal.release.project | 9 +++++++++ cabal.static.project | 8 +++----- 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 cabal.release.project diff --git a/.github/workflows/process-binaries.sh b/.github/workflows/process-binaries.sh index 5c4a865..97e39f3 100755 --- a/.github/workflows/process-binaries.sh +++ b/.github/workflows/process-binaries.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -CONFER_PATH="distribution/confer" +GETTESTED_PATH="distribution/get-tested" case "$(uname -s)" in Linux*) - strip $CONFER_PATH - upx -9 $CONFER_PATH + strip $GETTESTED_PATH + upx -9 $GETTESTED_PATH ;; Darwin*) echo "upx crashes on macOS Ventura and above" ;; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef817b1..462aeae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ on: jobs: generate-matrix: + if: startsWith(github.ref, 'refs/tags/') name: 'Generate matrix from cabal' outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -83,7 +84,7 @@ jobs: path: ${{ env.GETTESTED_EXEC_TAR }} build-alpine: - name: 9.8.2 on alpine-3.19 + name: 9.10.1 on alpine-3.19 runs-on: ubuntu-latest container: 'alpine:3.19' needs: generate-matrix @@ -102,7 +103,7 @@ jobs: - uses: haskell-actions/setup@v2 id: setup-haskell with: - ghc-version: '9.8.2' + ghc-version: '9.10.1' cabal-version: 'latest' - name: Configure diff --git a/cabal.release.project b/cabal.release.project new file mode 100644 index 0000000..20f076d --- /dev/null +++ b/cabal.release.project @@ -0,0 +1,9 @@ +import: cabal.project + +optimization: 2 + +documentation: False + +executable-stripping: True + +library-stripping: True diff --git a/cabal.static.project b/cabal.static.project index e2f07f4..8034662 100644 --- a/cabal.static.project +++ b/cabal.static.project @@ -1,6 +1,4 @@ -import: ./cabal.project - -package get-tested - ghc-options: -static - ld-options: -static -pthread +import: ./cabal.release.project +executable-static: true +split-sections: True