This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d
|
||||
env:
|
||||
STACK_ROOT: /tmp/.stack-root
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Stack
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.stack-root
|
||||
key: stack-${{ runner.os }}-${{ hashFiles('stack.yaml', 'package.yaml', 'converge.cabal') }}
|
||||
restore-keys: stack-${{ runner.os }}-
|
||||
|
||||
- name: Build
|
||||
run: stack build --copy-bins --local-bin-path /tmp/build
|
||||
|
||||
- name: Compress with UPX
|
||||
run: |
|
||||
UPX_VERSION="5.1.1"
|
||||
curl -fsSL "https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz" \
|
||||
| tar -xJ -C /tmp
|
||||
/tmp/upx-${UPX_VERSION}-amd64_linux/upx /tmp/build/converge
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: converge
|
||||
path: /tmp/build/converge
|
||||
compression-level: 0
|
||||
Reference in New Issue
Block a user