-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the
latex.x86_64
image for building the PDF docs on Buildkite (#…
…224)
- Loading branch information
1 parent
4ee5ba3
commit 3c78e50
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using RootfsUtils: parse_build_args, upload_gha, test_sandbox | ||
using RootfsUtils: debootstrap | ||
using RootfsUtils: root_chroot | ||
|
||
args = parse_build_args(ARGS, @__FILE__) | ||
arch = args.arch | ||
archive = args.archive | ||
image = args.image | ||
|
||
packages = [ | ||
"bash", | ||
"locales", | ||
"localepurge", | ||
] | ||
|
||
artifact_hash, tarball_path, = debootstrap(arch, image; archive, packages) do rootfs, chroot_ENV | ||
my_chroot(args...) = root_chroot(rootfs, "bash", "-eu", "-o", "pipefail", "-c", args...; ENV=chroot_ENV) | ||
|
||
additional_packages = String[ | ||
"curl", | ||
"latexmk", | ||
"python3-pygments", | ||
"texlive-latex-base", | ||
"texlive-latex-extra", | ||
"texlive-latex-recommended", | ||
"texlive-luatex", | ||
] | ||
additional_packages_string = join(additional_packages, " ") | ||
cmd = """ | ||
set -Eeu -o pipefail | ||
apt-get update | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(additional_packages_string) | ||
rm -rf /var/lib/apt/lists/* | ||
""" | ||
my_chroot(cmd) | ||
end | ||
|
||
upload_gha(tarball_path) | ||
test_sandbox(artifact_hash) |