-
Notifications
You must be signed in to change notification settings - Fork 127
122 lines (110 loc) · 3.48 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Binary Release (single)
on:
workflow_dispatch:
inputs:
mlton-version:
required: true
type: string
runner:
required: true
type: string
msystem:
required: false
type: string
old-mlton-runtime-args:
required: false
type: string
old-mlton-compile-args:
required: false
type: string
mlton-runtime-args:
required: false
type: string
mlton-compile-args:
required: false
type: string
mlton-binary-release-suffix:
required: false
type: string
workflow_call:
inputs:
mlton-version:
required: true
type: string
runner:
required: true
type: string
msystem:
required: false
type: string
old-mlton-runtime-args:
required: false
type: string
old-mlton-compile-args:
required: false
type: string
mlton-runtime-args:
required: false
type: string
mlton-compile-args:
required: false
type: string
mlton-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 }}
RUNNER: ${{ inputs.runner }}
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: ${{ inputs.msystem }}
update: false
install: >-
base-devel
git
pactoys
pacboy: >-
github-cli:p
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .github
- 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 -s -O -L https://github.com/${{ github.repository }}/releases/download/on-${{ inputs.mlton-version }}-release/mlton-${{ inputs.mlton-version }}.src.tgz
tar xzf mlton-${{ inputs.mlton-version }}.src.tgz --strip-components=1 || true
tar xzf mlton-${{ inputs.mlton-version }}.src.tgz --strip-components=1
rm mlton-${{ inputs.mlton-version }}.src.tgz
- name: Make binary release
run: |
# make binary-release
PATH=$(pwd)/boot/bin:$PATH \
make \
OLD_MLTON_RUNTIME_ARGS="ram-slop 0.90 ${{ inputs.old-mlton-runtime-args }}" \
OLD_MLTON_COMPILE_ARGS="${{ inputs.old-mlton-compile-args }}" \
MLTON_RUNTIME_ARGS="ram-slop 0.90 ${{ inputs.mlton-runtime-args }}" \
MLTON_COMPILE_ARGS="${{ inputs.mlton-compile-args }}" \
$( if [[ -n "$WITH_GMP_DIR" ]]; then echo "WITH_GMP_DIR=$WITH_GMP_DIR"; fi ) \
MLTON_BINARY_RELEASE_SUFFIX="${{ inputs.mlton-binary-release-suffix }}" \
binary-release
- name: Upload binary release
run: gh release upload on-${{ inputs.mlton-version }}-release mlton-${{ inputs.mlton-version }}*.tgz --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}