Skip to content

Commit

Permalink
Merge pull request #7 from tchoutri/macos-ci
Browse files Browse the repository at this point in the history
Tweak macOS CI
  • Loading branch information
tchoutri authored Jun 24, 2024
2 parents 860ceea + a653f50 commit d29582c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ jobs:
- name: Package the confer-head executable
run: |
CONFER_EXEC=$(cabal list-bin --project-file=cabal.release.project confer:exe:confer)
strip $CONFER_EXEC
upx -9 $CONFER_EXEC
.github/workflows/process-binaries.sh
DIR=$(dirname $CONFER_EXEC)
FILE=$(basename $CONFER_EXEC)
CONFER_EXEC_TAR=confer-head-${{ runner.os }}-$(uname -m).tar.gz
Expand All @@ -66,7 +65,7 @@ jobs:
- name: Upload the confer-head executable
uses: actions/upload-artifact@v3
with:
name: confer-${{ runner.os }}-x86_64
name: confer-${{ runner.os }}-$(uname -m)
path: ${{ env.CONFER_EXEC_TAR }}

build-alpine:
Expand Down Expand Up @@ -116,8 +115,7 @@ jobs:
- name: Tar cabal head executable
run: |
CONFER_EXEC=$(cabal list-bin --project-file=cabal.release.project confer:exe:confer)
strip $CONFER_EXEC
upx -9 $CONFER_EXEC
.github/workflows/process-binaries.sh
DIR=$(dirname $CONFER_EXEC)
FILE=$(basename $CONFER_EXEC)
CONFER_EXEC_TAR=confer-head-${{ runner.os }}-static-$(uname -m).tar.gz
Expand Down Expand Up @@ -145,6 +143,10 @@ jobs:
with:
name: confer-Linux-static-x86_64

- uses: actions/download-artifact@v3
with:
name: confer-macOS-aarch64

- name: Create GitHub prerelease
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
Expand All @@ -155,3 +157,4 @@ jobs:
files: |
confer-head-Linux-x86_64.tar.gz
confer-head-Linux-static-x86_64.tar.gz
confer-head-macOS-aarch64.tar.gz
2 changes: 1 addition & 1 deletion .github/workflows/install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

case "$(uname -s)" in
Linux*) sudo apt install upx-ucl;;
Darwin*) brew install --build-from-source upx;;
Darwin*) exit 0;;
esac
8 changes: 8 additions & 0 deletions .github/workflows/process-binaries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

CONFER_EXEC=$(cabal list-bin --project-file=cabal.release.project confer:exe:confer)

case "$(uname -s)" in
Linux*) strip $CONFER_EXEC && upx -9 $CONFER_EXEC;;
Darwin*) strip $CONFER_EXEC;;
esac

0 comments on commit d29582c

Please sign in to comment.