changelog shortlog graph tags branches changeset files file revisions raw help

Mercurial > infra / annotate virt/build-ci-worker.sh

changeset 42: 36c0358a46be
parent: eed390084dba
child: e627a4f4046a
author: ellis <ellis@rwest.io>
date: Sun, 31 Dec 2023 00:21:40 -0500
permissions: -rwxr-xr-x
description: patience is key
32
2a87ac5a25eb arch->alpine for workers
ellis <ellis@rwest.io>
parents:
diff changeset
1
 #!/usr/bin/env bash
2a87ac5a25eb arch->alpine for workers
ellis <ellis@rwest.io>
parents:
diff changeset
2
 
2a87ac5a25eb arch->alpine for workers
ellis <ellis@rwest.io>
parents:
diff changeset
3
 # these should be spawned as needed by a ci-leader box within a
2a87ac5a25eb arch->alpine for workers
ellis <ellis@rwest.io>
parents:
diff changeset
4
 # dedicated pod named 'ci'.
33
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
5
 
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
6
 id=$(buildah from alpine-base)
34
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
7
 buildah copy $id etc/skel /etc/skel
33
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
8
 buildah run $id adduser alik -D
34
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
9
 buildah run $id adduser demon -D -k /etc/skel
42
36c0358a46be patience is key
ellis <ellis@rwest.io>
parents: 35
diff changeset
10
 buildah run $id apk add build-base zstd-dev sbcl curl make git linux-headers cargo openssl perl
33
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
11
 buildah config --workingdir /home/demon $id
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
12
 buildah config -l=demo $id
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
13
 buildah run --net host $id hg clone https://vc.compiler.company/comp/core
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
14
 buildah run --net host $id hg clone https://vc.compiler.company/comp/infra
34
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
15
 buildah run --net host $id sh -c 'cd infra && make rocksdb-install'
33
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
16
 buildah run --net host $id sh -c 'cd infra && make sbcl-install'
34
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
17
 buildah run --net host $id sh -c 'cd infra && make ts-langs'
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
18
 buildah run --net host $id sh -c 'cd infra && make dist/fasl'
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
19
 buildah run --net host $id sh -c 'mv infra/dist/fasl/* /usr/local/lib/sbcl/'
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
20
 buildah run --net host $id sh -c './infra/scripts/install-cargo-tools.sh'
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
21
 buildah run --net host $id sh -c 'cd infra && make clean'
04d40f43430e added quicklisp, rm sqlx-cli
ellis <ellis@rwest.io>
parents: 33
diff changeset
22
 buildah config --entrypoint '["sbcl", "--core", "/usr/local/lib/sbcl/prelude.fasl"]' $id
33
727a4cb16360 alpine to the rescue
ellis <ellis@rwest.io>
parents: 32
diff changeset
23
 buildah commit $id ci-worker