forked from YOU54F/traveling-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
567 lines (496 loc) · 18.1 KB
/
.cirrus.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
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
env:
REPO: you54f/traveling-ruby
PKG_DATE: 20240726
NEXT_TAG: rel-$PKG_DATE
GITHUB_TOKEN: ENCRYPTED[7f3663f35400d0e1f8e0fec456af6b75a07b0fd2d0632fe1697b8fb73af5e78245144216288d88d2daa681ccd159e07d]
INSTALL_GH_CLI: &INSTALL_GH_CLI
install_gh_cli_script: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y
PRE_RELEASE_TASK: &PRE_RELEASE_TASK
prerelease_script: |
RELEASE_NOTES=$(git log --pretty=format:"%s" $(git describe --tags --abbrev=0)..HEAD)
gh release create "${NEXT_TAG}" --prerelease --draft --repo "${REPO}" --title "${NEXT_TAG}" --notes "${RELEASE_NOTES}"
UPLOAD_TASK: &UPLOAD_TASK
upload_script: |
cd $PLATFORM
for file in $(find traveling-ruby-gems-* -name '*.gz'); do
gem_name=$(echo "${file%-*}" | tr '/' '-')
gem_version=$(echo "${file%.tar.gz}" | awk -F- '{print $NF}')
pkg_date=$(echo "${file%-*}" | cut -d'-' -f4)
ruby_version=$(echo "${file%-*}" | tr '/' '-' | sed -E 's/.*-([0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?)-([a-z]+)-([a-z0-9_]+)\.tar\.gz/\1/')
echo $ruby_version-$gem_version.tar.gz
cp "$file" $ruby_version-$gem_version.tar.gz
done
ls -l
if [[ $CIRRUS_BRANCH == 'main' ]]; then
gh release upload "${NEXT_TAG}" traveling-ruby-*.tar.gz --repo "${REPO}" --clobber
else
echo "Not on main branch, skipping upload"
fi
DOWNLOAD_TASK: &DOWNLOAD_TASK
download_script: |
gh release download "${NEXT_TAG}" --repo "${REPO}" -p *$PLATFORM-$CIRRUS_ARCH*
# ========================================
# Release Tasks
# ========================================
## General tasks for GitHub Releases
## These tasks are used to create a release, upload the binaries
## and download the binaries for testing
## The available tasks are:
## prerelease_task: Creates a prerelease
## release_task: Creates a release
## upload_task: Uploads the binaries to the release
## download_task: Downloads the binaries from the release
prerelease_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(prerelease\).*'
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
GH_TOKEN: $GITHUB_TOKEN
<<: *PRE_RELEASE_TASK
upload_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(upload\).*'
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
GH_TOKEN: $GITHUB_TOKEN
<<: *UPLOAD_TASK
# release_task:
# macos_instance:
# image: ghcr.io/cirruslabs/macos-ventura-base:latest
# env:
# GH_TOKEN: $GITHUB_TOKEN
# <<: *RELEASE_TASK
download_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(download\).*'
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
GH_TOKEN: $GITHUB_TOKEN
<<: *DOWNLOAD_TASK
script: ls
RUBY_VERSIONS_LATEST_MATRIX: &RUBY_VERSIONS_LATEST_MATRIX
RUBY_VERSIONS: 3.3.4
RUBY_VERSIONS: 3.2.4
RUBY_VERSIONS: 3.1.6
# RUBY_VERSIONS: 3.0.7
# RUBY_VERSIONS: 2.7.8
# RUBY_VERSIONS: 2.6.10
RUBY_VERSIONS_MATRIX_MACOS: &RUBY_VERSIONS_MATRIX_MACOS
RUBY_VERSIONS: 3.3.4
RUBY_VERSIONS: 3.2.4
RUBY_VERSIONS: 3.1.6
# RUBY_VERSIONS: 3.0.7
RUBY_VERSIONS_MATRIX_LINUX: &RUBY_VERSIONS_MATRIX_LINUX
RUBY_VERSIONS: 3.3.4
RUBY_VERSIONS: 3.2.4
RUBY_VERSIONS: 3.1.6
# RUBY_VERSIONS: 3.0.7
# RUBY_VERSIONS: 2.6.10
# RUBY_VERSIONS: 3.0.7
# RUBY_VERSIONS: 2.7.8
RUBY_VERSIONS_MATRIX_LINUX_ALPINE: &RUBY_VERSIONS_MATRIX_LINUX_ALPINE
RUBY_VERSIONS: 3.3.4
RUBY_VERSIONS: 3.2.4
RUBY_VERSIONS: 3.1.6
# RUBY_VERSIONS: 3.0.7
# RUBY_VERSIONS: 2.6.10
# # RUBY_VERSIONS: 3.0.7
# # RUBY_VERSIONS: 2.7.8
rake_package_and_test: &rake_package_and_test
package_script: cd $PLATFORM && rake
package_full_script: cd $PLATFORM && rake package_full
test_script: cd $PLATFORM && rake test
rake_package_and_test_docker: &rake_package_and_test_docker
package_script: cd $PLATFORM && rake
package_full_script: cd $PLATFORM && rake package_full
test_docker_script: cd $PLATFORM && rake test_docker
ENV_CHECK_SCRIPT: &ENV_CHECK_SCRIPT
check_script: |
uname -a
echo "CIRRUS_ARCH: $CIRRUS_ARCH"
echo "PLATFORM: $PLATFORM"
echo "script: $script"
echo "NEXT_TAG: $NEXT_TAG"
echo "ARCHITECTURES: $ARCHITECTURES"
echo "repo: $REPO"
echo "script: $script"
BINARY_ATRIFACTS: &BINARY_ATRIFACTS
binary_artifacts:
path: "$PLATFORM/**/*.tar.gz"
# ========================================
# Linux - Packager
# ========================================
## The <os>_<arch>_packager_docker_builder jobs are used to build
## each version of ruby on a single runner. The rake task has been
## modified to build all versions of ruby in a single run and not fail
linux_arm64_packager_docker_builder:
cpu: 4
memory: 4G
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(packager-linux-arm64\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(packager-linux\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(packager\).*'
env:
CIRRUS_ARCH: arm64
PLATFORM: linux
ARCHITECTURES: arm64
<<: *ENV_CHECK_SCRIPT
broken_version_remover_script: |
sed -ie 's/3.0.7/3.0.7/' RUBY_VERSIONS.txt
sed -ie '/2.7.8/d' RUBY_VERSIONS.txt
<<: *rake_package_and_test
<<: *INSTALL_GH_CLI
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
linux_x64_packager_docker_builder:
cpu: 4
memory: 4G
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(packager-linux-x86_64\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(packager-linux\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(packager\).*'
env:
CIRRUS_ARCH: amd64
PLATFORM: linux
ARCHITECTURES: x86_64
<<: *ENV_CHECK_SCRIPT
broken_version_remover_script: |
sed -ie 's/3.0.7/3.0.7/' RUBY_VERSIONS.txt
sed -ie '/2.7.8/d' RUBY_VERSIONS.txt
<<: *rake_package_and_test
<<: *INSTALL_GH_CLI
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
# ========================================
# Linux - Matrix Package & Test
# ========================================
## The <os>_<arch>_matrix_builder jobs are used to build each
## version of ruby on seperate runners and run a test suite
## of docker containers to ensure the binaries are working
linux_arm64_matrix_docker_builder:
cpu: 4
memory: 4G
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-linux-arm64\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_BRANCH =~ 'main'
env:
CIRRUS_ARCH: arm64
PLATFORM: linux
ARCHITECTURES: arm64
matrix:
*RUBY_VERSIONS_MATRIX_LINUX
<<: *ENV_CHECK_SCRIPT
<<: *rake_package_and_test_docker
<<: *INSTALL_GH_CLI
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
linux_x64_matrix_docker_builder:
cpu: 4
memory: 4G
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-linux-x86_64\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_BRANCH =~ 'main'
env:
CIRRUS_ARCH: amd64
PLATFORM: linux
ARCHITECTURES: x86_64
matrix:
*RUBY_VERSIONS_MATRIX_LINUX
<<: *ENV_CHECK_SCRIPT
<<: *rake_package_and_test_docker
<<: *INSTALL_GH_CLI
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
linux_arm64_alpine_matrix_docker_builder:
cpu: 4
memory: 4G
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-linux-musl-arm64\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(alpine\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_BRANCH =~ 'main'
env:
CIRRUS_ARCH: arm64
PLATFORM: alpine
ARCHITECTURES: arm64
matrix:
*RUBY_VERSIONS_MATRIX_LINUX_ALPINE
<<: *ENV_CHECK_SCRIPT
<<: *rake_package_and_test_docker
<<: *INSTALL_GH_CLI
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
linux_x64_alpine_matrix_docker_builder:
cpu: 4
memory: 4G
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-linux-musl-x86_64\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(alpine\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_BRANCH =~ 'main'
env:
CIRRUS_ARCH: amd64
PLATFORM: alpine
ARCHITECTURES: x86_64
matrix:
*RUBY_VERSIONS_MATRIX_LINUX_ALPINE
<<: *ENV_CHECK_SCRIPT
<<: *rake_package_and_test_docker
<<: *INSTALL_GH_CLI
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
# ========================================
# MacOS
# ========================================
cirrus_cli_setup: &cirrus_cli_setup
cirrus_cli_script: |
ls $PLATFORM
echo "removing runtime and output folder"
find "$PLATFORM" -type d -name "output" -exec rm -rf {} +
find "$PLATFORM" -type d -name "runtime" -exec rm -rf {} +
echo "removing traveling-ruby packaged gems"
find "$PLATFORM" -type d -name "traveling-ruby-gems" -exec rm -rf {} +
echo "removing traveling-ruby packaged runtimes"
find "$PLATFORM" -type f -name "traveling-ruby-*.tar.gz" -exec rm -f {} +
echo "removing existing runtime if it exists"
find "$PLATFORM" -type f -name "$PLATFORM-runtime.tar.gz" -exec rm -f {} +
ls $PLATFORM
echo "chmoddiing script files due to lack of file perms in cirrus-cli"
find $PLATFORM shared -name '*.sh'
find $PLATFORM shared -name '*.sh' -exec chmod +x {} \;
chmod +x osx/internal/bin/c++
chmod +x osx/internal/bin/cc
ls $PLATFORM
download_macos_runtime: &download_macos_runtime
download_script: |
echo "downloading pre-packaged runtime"
curl -L -o $PLATFORM/runtime.tar.gz /~https://github.com/YOU54F/traveling-ruby/releases/download/rel-20240116/osx-runtime-$ARCHITECTURES.tar.gz
echo "unpacking pre-packaged runtime"
mkdir -p $PLATFORM/runtime
[[ -f "$PLATFORM/runtime.tar.gz" ]] && cd $PLATFORM && tar -xzf ../$PLATFORM/runtime.tar.gz && rm -rf ../$PLATFORM/runtime.tar.gz && echo "unpacked osx-runtime-$ARCHITECTURES.tar.gz" && ls -al ../$PLATFORM/runtime
cd ..
ls $PLATFORM
macos_check: &macos_check
check_script: |
ruby --version
bundler --version
brew leaves
xcode-select -p
which cc
which c++
cc --version -arch $CIRRUS_ARCH
c++ --version -arch $CIRRUS_ARCH
cc --version -arch x86_64
c++ --version -arch x86_64
set_bundler_version: &set_bundler_version
set_bundler_version_script: |
$USE_ROSETTA rbenv global system
$USE_ROSETTA sudo gem install bundler -v $(cat BUNDLER_VERSION.txt)
$USE_ROSETTA bundler --version
$USE_ROSETTA rbenv global 3.2.4
macos_check_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(mac-check\).*'
env:
PLATFORM: osx
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
<<: *macos_check
<<: *cirrus_cli_setup
mac_ruby_setup: &mac_ruby_setup
mac_ruby_script: |
RUBY_MAJOR_MINOR=$(echo $RUBY_VERSIONS | cut -d' ' -f2 | cut -d'.' -f1-2)
if [ "$RUBY_MAJOR_MINOR" = "3.3" ]; then
# brew install ruby --HEAD
echo "ruby HEAD installed"
else
brew install ruby@$RUBY_MAJOR_MINOR
fi
macos_stash_conflicting_paths: &macos_stash_conflicting_paths
stash_conflicting_paths_script: cd $PLATFORM && sudo rake stash_conflicting_paths
# ========================================
# MacOS - Packager
# ========================================
macos_packager_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(packager-macos\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(packager\).*'
env:
PLATFORM: osx
USE_HOMEBREW_RUBY: 1
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
# <<: *mac_ruby_setup
<<: *macos_check
<<: *cirrus_cli_setup
# <<: *set_bundler_version
<<: *macos_stash_conflicting_paths
<<: *download_macos_runtime
package_script: cd $PLATFORM && rake
package_script: cd $PLATFORM && rake
<<: *BINARY_ATRIFACTS
# ========================================
# MacOS - Matrix Package & Test
# ========================================
## The <os>_<arch>_matrix_builder jobs are used to build each
## version of ruby on seperate runners and run a test suite
## of docker containers to ensure the binaries are working
macos_arm64_matrix_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-macos\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-macos-arm64\).*' || $CIRRUS_BRANCH =~ 'main'
macos_instance:
# image: traveling-ruby-builder
# image: ghcr.io/cirruslabs/macos-ventura-vanilla:latest
image: ghcr.io/cirruslabs/macos-sonoma-base:latest
env:
PLATFORM: osx
ARCHITECTURES: arm64
matrix:
*RUBY_VERSIONS_MATRIX_MACOS
<<: *macos_check
<<: *cirrus_cli_setup
<<: *macos_stash_conflicting_paths
<<: *download_macos_runtime
<<: *rake_package_and_test
# upload_output_dir_script: cd $PLATFORM && tar -czvf $PLATFORM-runtime.tar.gz runtime
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
macos_x86_64_matrix_task:
timeout_in: 120m
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-macos\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix-macos-x86_64\).*' || $CIRRUS_BRANCH =~ 'main'
macos_instance:
# image: traveling-ruby-builder
image: ghcr.io/cirruslabs/macos-sonoma-base:latest
env:
PLATFORM: osx
ARCHITECTURES: x86_64
# $USE_ROSETTA: arch -m x86_64
matrix:
*RUBY_VERSIONS_MATRIX_MACOS
<<: *macos_check
<<: *cirrus_cli_setup
<<: *macos_stash_conflicting_paths
<<: *download_macos_runtime
install_rosetta_script: softwareupdate --install-rosetta --agree-to-license
<<: *rake_package_and_test
# upload_output_dir_script: cd $PLATFORM && tar -czvf $PLATFORM-runtime.tar.gz runtime
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
# ========================================
# Windows - Packager
# ========================================
windows_packager_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(packager-windows\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(packager\).*' || $CIRRUS_CHANGE_TITLE =~ 'ci\(matrix\).*' || $CIRRUS_BRANCH =~ 'main'
env:
PLATFORM: windows
matrix:
- script: rake --trace
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
windows_setup_script: |
brew install sevenzip
<<: *cirrus_cli_setup
package_script: cd $PLATFORM && rake
<<: *UPLOAD_TASK
<<: *BINARY_ATRIFACTS
# ========================================
# Windows - Matrix Package & Test
# ========================================
# ========================================
# Standalone Testing Tasks against GH releases
# ========================================
linux_gem_test_task:
only_if: $CIRRUS_CHANGE_TITLE =~ 'ci\(test-linux-gems\).*'
env:
GH_TOKEN: $GITHUB_TOKEN
matrix:
image: debian:latest
image: node:20-slim
# image: debian:bookworm-slim
# image: bitnami/minideb:latest
# image: busybox:glibc
# image: busybox:uclibc
# image: busybox:musl
# image: centos:centos8
# image: centos:centos9
# image: quay.io/centos/centos:stream
# image: quay.io/centos/centos:stream9
# image: quay.io/centos/centos:stream9-minimal
# image: quay.io/centos/centos:stream8
# image: quay.io/centos/centos:8
# image: centos:centos7
# image: alpine:latest
# image: alpine:3.18
# image: alpine:3.17
# image: alpine:3.16
# image: alpine:3.15
# image: ubuntu:latest
# image: ubuntu:20.04
# image: ubuntu:18.04
# image: ubuntu:16.04
# image: fedora:latest
# image: fedora:34
# image: fedora:33
# image: fedora:32
# image: opensuse/leap:latest
# image: opensuse/leap:15.3
# image: opensuse/leap:15.2
# image: opensuse/leap:15.1
# image: opensuse/leap:15.0
# image: gentoo/stage3-amd64
# image: raspbian/stretch
# image: raspbian/buster
# image: raspbian/bullseye
arm_container:
image: $image
check_dep_script: |
ldconfig -v | grep libffi || echo "libffi not found"
ldconfig -v | grep libyaml || echo "libyaml not found"
dependencies_script: |
if [ -f /etc/debian_version ]; then
apt-get update
apt-get install -y curl
elif [ -f /etc/alpine-release ]; then
apk add --no-cache curl
elif [ -f /etc/redhat-release ]; then
yum install -y curl
elif [ -f /etc/busybox-release ]; then
apk add --no-cache curl
else
echo "Unsupported Linux distribution"
exit 1
fi
<<: *INSTALL_GH_CLI
check_gh_cli_script: |
gh --version
echo "gh cli installed"
echo "repo: ${REPO}"
echo "tag: ${NEXT_TAG}"
unpack_script: |
gh release view --repo "${REPO}" "${NEXT_TAG}" --json assets -q '.[]|.[].name' | grep -e 'linux-arm'
ls -la
cd linux
gh release download --repo "${REPO}" "${NEXT_TAG}" -p "traveling-ruby-${PKG_DATE}*linux-arm*"
ls -la
../shared/list-versions.sh linux
../shared/unpack-versions.sh linux
../shared/test-all-gems.sh linux
# ========================================
# Test Standalone Cli.sh script
# ========================================
install_homebrew_script: &install_homebrew_script |
# curl required for downloader, build-essential/git required for linuxbrew
apt update && apt install --yes curl build-essential git
curl -fsSL https://raw.githubusercontent.com/you54f/traveling-ruby/main/cli.sh | sh -s -- --ci -v 2.6.10
echo 'export PATH=/root/.travelling-ruby/bin:${PATH}' >> /root/.profile
source /root/.profile
ruby --version
which ruby
HOMEBREW_BREW_GIT_REMOTE="/~https://github.com/you54f/brew" NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/you54f/install/HEAD/install.sh)"
git -C "/home/linuxbrew/.linuxbrew/Homebrew" remote set-url origin /~https://github.com/Homebrew/brew
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /root/.profile
source /root/.profile
brew --version
brew config
brew doctor || echo "brew doctor failed with warning about unsupported architecture"
brew upgrade
export PATH=/root/.travelling-ruby/bin:${PATH}:/home/linuxbrew/.linuxbrew/bin
echo "PATH=${PATH}" >>$CIRRUS_ENV
test_homebrew_script: &test_homebrew_script |
brew install you54f/pact/pact-plugin-cli
brew info you54f/pact/pact-plugin-cli
pact-plugin-cli --help
run_commands: &run_commands
install_homebrew_script: *install_homebrew_script
test_homebrew_script: *test_homebrew_script
# cli_arm_task:
# arm_container:
# image: ubuntu:22.04
# <<: *run_commands
# cli_amd_task:
# container:
# image: ubuntu:22.04
# <<: *run_commands