-
Notifications
You must be signed in to change notification settings - Fork 30
275 lines (245 loc) · 10.4 KB
/
bindists.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
name: Bindist installation
defaults:
run:
shell: bash
on:
workflow_dispatch:
inputs:
tool:
description: Tool
required: true
type: string
version:
description: Version
required: true
type: string
metadataFile:
description: Metadata file
required: true
default: ghcup-0.0.8.yaml
type: string
channel:
description: Distribution channel (main|prerelease|nightly)
required: true
default: Main
type: string
env:
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
BOOTSTRAP_HASKELL_MINIMAL: 1
BOOTSTRAP_HASKELL_ADJUST_BASHRC: 1
TOOL: ${{ github.event.inputs.tool }}
VERSION: ${{ github.event.inputs.version }}
METADATA_FILE: ${{ github.event.inputs.metadataFile }}
CHANNEL: ${{ github.event.inputs.channel }}
jobs:
bindist-install:
name: linux-${{ matrix.image }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: alpine:latest
installCmd: apk update && apk add
toolRequirements: binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz
- image: debian:10
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev
- image: debian:11
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev
- image: debian:12
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev
- image: debian:unstable
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 libnuma-dev
- image: ubuntu:20.04
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
- image: ubuntu:22.04
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
- image: ubuntu:24.04
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6
- image: archlinux:latest
installCmd: pacman -Syu --noconfirm
toolRequirements: which gcc gmp libffi make ncurses perl tar xz
- image: fedora:37
installCmd: dnf install -y
toolRequirements: which gcc g++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
- image: rockylinux:8
installCmd: dnf install -y
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl
- image: rockylinux:9
installCmd: dnf install -y --allowerasing
toolRequirements: which findutils gcc gcc-c++ gmp gmp-devel make ncurses xz perl
- image: registry.access.redhat.com/ubi8/ubi
installCmd: dnf install -y --allowerasing
toolRequirements: gcc gcc-c++ gmp gmp-devel make ncurses ncurses-compat-libs xz perl pkgconfig
- image: registry.access.redhat.com/ubi9/ubi
installCmd: dnf install -y --allowerasing
toolRequirements: gcc gcc-c++ gmp gmp-devel make ncurses xz perl pkgconfig
- image: linuxmintd/mint20.3-amd64
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
- image: linuxmintd/mint21.3-amd64
installCmd: apt-get update && apt-get install -y
toolRequirements: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
- image: ghcr.io/void-linux/void-glibc-full:latest
installCmd: xbps-install -Suy && xbps-install -y
toolRequirements: binutils curl gcc gmp-devel glibc-devel libffi-devel make ncurses-devel ncurses-libtinfo-libs perl tar xz
container:
image: ${{ matrix.image }}
steps:
- name: Install requirements
shell: sh
run: |
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }}
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Install ghcup and bindist
run: .github/workflows/install-bindist.sh
i386-alpine:
name: Build i386 alpine
runs-on: ubuntu-latest
container:
image: i386/alpine:latest
steps:
- name: Install requirements
run: |
apk update
apk add curl bash git binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz
shell: sh
- uses: actions/checkout@af513c7a016048ae468971c52ed77d9562c7c819 # v1
- name: Install ghcup and bindist
run: bash .github/workflows/install-bindist.sh
bindist-install-mac-win:
name: Build non-linux
strategy:
fail-fast: false
matrix:
include:
- os: [self-hosted, macOS, ARM64]
- os: macos-12
- os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Install ghcup and bindist
run: .github/workflows/install-bindist.sh
bindist-install-arm:
name: Build ARM binary
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: [self-hosted, Linux, ARM64, maerwald]
ARCH: ARM
- os: [self-hosted, Linux, ARM64, maerwald]
ARCH: ARM64
steps:
- uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
with:
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
- name: git config
run: |
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
shell: bash
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- if: matrix.ARCH == 'ARM'
uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
name: Run build (armv7 linux)
with:
args: sh -c '.github/workflows/install-bindist.sh'
- if: matrix.ARCH == 'ARM64'
uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
name: Run build (aarch64 linux)
with:
args: sh -c '.github/workflows/install-bindist.sh'
bindist-install-arm-alpine:
name: Build ARM binary (alpine)
runs-on: [self-hosted, Linux, ARM64, maerwald]
steps:
- uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
with:
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
- name: git config
run: |
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
shell: bash
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: docker://alpine
name: Run build (aarch64 alpine linux)
with:
args: sh -c "apk add curl gcc g++ binutils binutils-gold coreutils bsd-compat-headers gmp-dev ncurses-dev libffi-dev make xz tar perl bash diffutils git gzip gnupg zlib zlib-dev zlib-static bzip2 bzip2-dev bzip2-static gmp gmp-dev openssl-dev openssl-libs-static xz xz-dev ncurses-static && .github/workflows/install-bindist.sh"
bindist-install-freebsd:
name: Install FreeBSD binary
runs-on: [self-hosted, FreeBSD, X64]
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Run build
run: .github/workflows/install-bindist.sh
validate:
name: ghcup-gen check
runs-on: ubuntu-latest
env:
GHC: 9.2.8
CABAL: 3.10.1.0
steps:
- 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: install yamllint
run: pip install yamllint
- name: Update cabal cache
run: cabal update
shell: bash
- name: Install requirements
shell: sh
run: |
export DEBIAN_FRONTEND=noninteractive
export TZ=Asia/Singapore
sudo apt-get update && sudo apt-get install -y curl bash git gnupg libarchive-dev
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Cache Cabal
uses: actions/cache@v2
env:
cache-name: cache-cabal
with:
path: |
~/.cabal/store
~/.cabal/packages
key: v2-${{ runner.os }}-${{ env.GHC }}-${{ env.CABAL }}-build-${{ hashFiles('cabal.project') }}
restore-keys: |
v2-${{ runner.os }}-${{ env.GHC }}-${{ env.CABAL }}-build-${{ hashFiles('cabal.project') }}
v2-${{ runner.os }}-${{ env.GHC }}-${{ env.CABAL }}-build-
v2-${{ runner.os }}-${{ env.GHC }}
- name: Install ghcup-gen
run: |
ghcup run --cabal 3.10.1.0 --ghc 9.2.8 --install -- cabal install --installdir="$HOME/.local/bin" --overwrite-policy=always --install-method=copy ghcup-gen
shell: bash
- name: Check yaml
run: |
ghcup-gen -- check -f ${{ env.METADATA_FILE }} --channel ${{ env.CHANNEL }}
yamllint ${{ env.METADATA_FILE }}
python3 -c "import yaml ; stream = open('${{ env.METADATA_FILE }}', 'r') ; yaml.safe_load(stream)"
shell: bash
signature-test:
name: Test signatures
runs-on: ubuntu-latest
steps:
- name: Install requirements
shell: sh
run: |
sudo apt-get update && sudo apt-get install -y curl bash git gnupg
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Test signatures
run: .github/workflows/test-sigs.sh