Debian Codegraph @

.github/workflows/binary-release-single.yml

raw symbols SCIP
1 name: Binary Release (single)
2
3 on:
4 workflow_dispatch:
5 inputs:
6 mlton-version:
7 required: true
8 type: string
9 runner:
10 required: true
11 type: string
12 msystem:
13 required: false
14 type: string
15 old-mlton-runtime-args:
16 required: false
17 type: string
18 old-mlton-compile-args:
19 required: false
20 type: string
21 mlton-runtime-args:
22 required: false
23 type: string
24 mlton-compile-args:
25 required: false
26 type: string
27 mlton-binary-release-suffix:
28 required: false
29 type: string
30 workflow_call:
31 inputs:
32 mlton-version:
33 required: true
34 type: string
35 runner:
36 required: true
37 type: string
38 msystem:
39 required: false
40 type: string
41 old-mlton-runtime-args:
42 required: false
43 type: string
44 old-mlton-compile-args:
45 required: false
46 type: string
47 mlton-runtime-args:
48 required: false
49 type: string
50 mlton-compile-args:
51 required: false
52 type: string
53 mlton-binary-release-suffix:
54 required: false
55 type: string
56
57 jobs:
58 binary-release-single:
59
60 runs-on: ${{ inputs.runner }}
61
62 defaults:
63 run:
64 shell: ${{ (startsWith(inputs.runner, 'windows') && 'msys2 {0}') || 'bash' }}
65
66 env:
67 MLTON_VERSION: ${{ inputs.mlton-version }}
68 RUNNER: ${{ inputs.runner }}
69
70 steps:
71 - name: Configure git
72 run: git config --global core.autocrlf false
73 shell: bash
74
75 - name: Install msys2 (windows)
76 if: ${{ startsWith(inputs.runner, 'windows') }}
77 uses: msys2/setup-msys2@v2
78 with:
79 msystem: ${{ inputs.msystem }}
80 update: false
81 install: >-
82 base-devel
83 git
84 pactoys
85 pacboy: >-
86 github-cli:p
87
88 - name: Checkout
89 uses: actions/checkout@v4
90 with:
91 sparse-checkout: .github
92
93 - name: Install bootstrap dependencies
94 uses: ./.github/actions/install-bootstrap-dependencies
95 with:
96 runner: ${{ inputs.runner }}
97 install-llvm: false
98
99 - name: Download and unpack source release
100 run: |
101 curl --fail -s -O -L https://github.com/${{ github.repository }}/releases/download/on-${{ inputs.mlton-version }}-release/mlton-${{ inputs.mlton-version }}.src.tgz
102 tar xzf mlton-${{ inputs.mlton-version }}.src.tgz --strip-components=1 || true
103 tar xzf mlton-${{ inputs.mlton-version }}.src.tgz --strip-components=1
104 rm mlton-${{ inputs.mlton-version }}.src.tgz
105
106 - name: Make binary release
107 run: |
108 # make binary-release
109 PATH=$(pwd)/boot/bin:$PATH \
110 make \
111 OLD_MLTON_RUNTIME_ARGS="ram-slop 0.90 ${{ inputs.old-mlton-runtime-args }}" \
112 OLD_MLTON_COMPILE_ARGS="${{ inputs.old-mlton-compile-args }}" \
113 MLTON_RUNTIME_ARGS="ram-slop 0.90 ${{ inputs.mlton-runtime-args }}" \
114 MLTON_COMPILE_ARGS="${{ inputs.mlton-compile-args }}" \
115 $( if [[ -n "$WITH_GMP_DIR" ]]; then echo "WITH_GMP_DIR=$WITH_GMP_DIR"; fi ) \
116 MLTON_BINARY_RELEASE_SUFFIX="${{ inputs.mlton-binary-release-suffix }}" \
117 binary-release
118
119 - name: Upload binary release
120 run: gh release upload on-${{ inputs.mlton-version }}-release mlton-${{ inputs.mlton-version }}*.tgz --clobber
121 env:
122 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}