forked from MLton/mlton
-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (78 loc) · 2.45 KB
/
binary-release-single.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Binary Release (single)
on:
workflow_dispatch:
inputs:
mlton-version:
required: true
type: string
runner:
required: true
type: string
binary-release-suffix:
required: false
type: string
workflow_call:
inputs:
mlton-version:
required: true
type: string
runner:
required: true
type: string
binary-release-suffix:
required: false
type: string
jobs:
binary-release-single:
runs-on: ${{ inputs.runner }}
defaults:
run:
shell: ${{ (startsWith(inputs.runner, 'windows') && 'msys2 {0}') || 'bash' }}
env:
MLTON_VERSION: ${{ inputs.mlton-version }}
MLTON_BINARY_RELEASE_SUFFIX: ${{ inputs.binary-release-suffix }}
steps:
- name: Configure git
run: git config --global core.autocrlf false
shell: bash
- name: Install msys2 (windows)
if: ${{ startsWith(inputs.runner, 'windows') }}
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
install: >-
base-devel
git
pactoys
pacboy: >-
github-cli:p
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .github
ref: workflow-updates
- name: Install bootstrap dependencies
uses: ./.github/actions/install-bootstrap-dependencies
with:
runner: ${{ inputs.runner }}
install-llvm: false
- name: Download and unpack source release
run: |
curl --fail -L https://github.com/${{ github.repository }}/releases/download/on-${MLTON_VERSION}-release/mlton-${MLTON_VERSION}.src.tgz | tar xz --strip-components=1
- name: Make binary release
run: |
# make binary-release
PATH=$(pwd)/boot/bin:$PATH \
make \
OLD_MLTON_RUNTIME_ARGS="ram-slop 0.90" \
OLD_MLTON_COMPILE_ARGS="" \
MLTON_RUNTIME_ARGS="ram-slop 0.90" \
MLTON_COMPILE_ARGS="" \
$( if [[ -n "$WITH_GMP_DIR" ]]; then echo "WITH_GMP_DIR=$WITH_GMP_DIR"; fi ) \
MLTON_BINARY_RELEASE_SUFFIX=$MLTON_BINARY_RELEASE_SUFFIX \
binary-release
- name: Upload binary release
run: gh release upload on-${MLTON_VERSION}-release mlton-${MLTON_VERSION}*.tgz --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}