-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
388 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
kind: pipeline | ||
type: docker | ||
name: TeXlive | ||
|
||
steps: | ||
- name: build | ||
image: texlive/texlive | ||
commands: | ||
- tlmgr option repository https://ctan.gutenberg-asso.fr/systems/texlive/tlnet | ||
- tlmgr update --self --all | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: minimal TeXlive | ||
|
||
steps: | ||
- name: build | ||
image: texlive/texlive:latest-minimal | ||
pull: always | ||
commands: | ||
- tlmgr option repository https://ctan.gutenberg-asso.fr/systems/texlive/tlnet | ||
- tlmgr update --self --all | ||
- tlmgr install latex-bin latexmk | ||
- xargs tlmgr install < texlive.deps | ||
- tlmgr path add | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: Ubuntu + TeXlive 2023 | ||
|
||
environment: | ||
TEXLIVE_RELEASE: 2023 | ||
|
||
steps: | ||
- name: build | ||
image: ubuntu | ||
commands: | ||
- apt update && apt install -y curl perl | ||
- export PATH=$HOME/texlive/bin/x86_64-linux:$HOME/texlive/bin/aarch64-linux:$PATH | ||
- ./ci/install-texlive | ||
- xargs tlmgr install < texlive-2023.deps | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: Ubuntu + TeXlive rolling | ||
|
||
environment: | ||
TEXLIVE_RELEASE: rolling | ||
|
||
steps: | ||
- name: build | ||
image: ubuntu | ||
commands: | ||
- apt update && apt install -y curl perl | ||
- export PATH=$HOME/texlive/bin/x86_64-linux:$HOME/texlive/bin/aarch64-linux:$PATH | ||
- ./ci/install-texlive | ||
- xargs tlmgr install < texlive.deps | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] |
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 was deleted.
Oops, something went wrong.
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
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,100 @@ | ||
#!/usr/bin/env bash | ||
set -o nounset | ||
set -o errexit | ||
set -o errtrace | ||
set -o pipefail | ||
IFS= | ||
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR | ||
|
||
shopt -s extglob | ||
declare -A DEPS | ||
|
||
: "${TEXLIVE_REPOSITORY:=http://mirror.ctan.org/systems/texlive/tlnet}" | ||
TEXLIVE_REPOSITORY="$(curl -LIs -o /dev/null -w '%{url_effective}' "$TEXLIVE_REPOSITORY")" | ||
PREFIX="$(kpsewhich --var-value TEXMFROOT)" | ||
|
||
function die { | ||
local code="${1:-1}" | ||
[[ $# -ge 1 ]] && shift | ||
|
||
printf "$(tput setaf 1)%s$(tput sgr0)\n" "$@" 1>&2 | ||
exit "$code" | ||
} | ||
|
||
function info-inline { | ||
printf "$(tput setaf 3)%s$(tput sgr0)" "$@" 1>&2 | ||
} | ||
|
||
function info { | ||
info-inline "$@" | ||
printf "\n" 1>&2 | ||
} | ||
|
||
function texlive-release() { | ||
tlmgr --version \ | ||
| sed '/^tlmgr/d ; s/.*version //' | ||
} | ||
|
||
function filter-inputs { | ||
sed -e '\#^INPUT '"$PREFIX"'/texmf-dist#!d' \ | ||
-e 's#^INPUT '"$PREFIX"'/##' \ | ||
"$@" | ||
} | ||
|
||
function query-package-containing { | ||
local filename="${1?}" | ||
tlmgr --repository "$TEXLIVE_REPOSITORY" \ | ||
search --global --file "$filename" \ | ||
| sed '/^\t/d ; /^tlmgr:/d ; s/:$//' | ||
} | ||
|
||
function list-package-files { | ||
local pkgname="${1?}" | ||
tlmgr --repository "$TEXLIVE_REPOSITORY" \ | ||
info --list "$pkgname" \ | ||
| sed '/^ /!d ; s/^ *//' | ||
} | ||
|
||
function encache-file { | ||
local filename="${1?}" pkgname | ||
pkgname="$(query-package-containing "${filename}")" | ||
while read -r provided; do | ||
DEPS["$provided"]="$pkgname" | ||
done < <(list-package-files "$pkgname") | ||
} | ||
|
||
function package-name { | ||
local filename="${1?}" | ||
info-inline "$filename" | ||
if [[ -z "${DEPS["$filename"]+found}" ]]; then | ||
info " (querying ${TEXLIVE_REPOSITORY})" | ||
encache-file "$filename" | ||
echo "${DEPS["$filename"]}" || info "failed to resolve ${filename}" | ||
else | ||
info " (from ${DEPS[$filename]})" | ||
fi | ||
} | ||
|
||
function find-packages { | ||
while read -r filename; do | ||
package-name "$filename" | ||
done | ||
} | ||
|
||
function list-deps { | ||
local main="${1:-main}" | ||
main="${main%.@(tex|aux|fls)}" # extglob | ||
[[ -f "$main.fls" ]] || die 1 "no such file: $main.fls" | ||
|
||
filter-inputs "$main.fls" | sort --unique > "$main.inputs" | ||
info "$(wc -l "$main.inputs")" | ||
|
||
find-packages < "$main.inputs" | tee "$main.deps" | ||
sort --unique --output "$main.deps" "$main.deps" | ||
} | ||
|
||
# Only call the main function if this script was called as a command. This makes | ||
# it possible to source this script as a library. | ||
if [[ ${BASH_SOURCE[0]} == "$0" ]]; then | ||
list-deps "$@" | ||
fi |
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,2 @@ | ||
% Paper format for https://librairie.bod.fr | ||
\providecommand{\setuppage}{\bodpage}\input{sbabook} |
Oops, something went wrong.