-
Notifications
You must be signed in to change notification settings - Fork 54
47 lines (38 loc) · 1.2 KB
/
linux-static-binary.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build Linux static binary
on:
workflow_dispatch:
inputs:
ref:
description: "the repository ref to build"
required: true
default: "main"
jobs:
build:
name: Build static binary
runs-on: ubuntu-latest
container: ghcr.io/paulcadman/ghc-alpine:9.2.7
steps:
- name: checkout code
uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.event.inputs.ref }}
- name: create ~/.local/bin
run: mkdir -p "$HOME/.local/bin"
shell: bash
- name: Add ~/.local/bin to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
shell: bash
- name: Stack permissions bug workaround
run: "chown -R $(id -un):$(id -gn) ~"
- name: Runtime build
run: make runtime
- name: build Juvix
run: stack install --allow-different-user --system-ghc --ghc-options='-split-sections -optl-static'
- run: echo "HOME=$HOME" >> $GITHUB_ENV
shell: bash
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: juvix-linux_x86_64-${{ github.event.inputs.ref }}
path: ${{ env.HOME }}/.local/bin/juvix