added list of packages for doc compilation and included TeX memory increase for build script
parent
25e66b6e79
commit
25c007c70f
|
@ -0,0 +1,53 @@
|
||||||
|
## -- engine used to compile (pdflatex)
|
||||||
|
latex-bin
|
||||||
|
latexmk
|
||||||
|
|
||||||
|
## -- direct dependencies
|
||||||
|
tikz-trackschematic
|
||||||
|
koma-script
|
||||||
|
pgf
|
||||||
|
xkeyval
|
||||||
|
etoolbox
|
||||||
|
adjustbox
|
||||||
|
booktabs
|
||||||
|
xltabular
|
||||||
|
tools
|
||||||
|
marginnote
|
||||||
|
babel-english
|
||||||
|
vhistory
|
||||||
|
carlisle
|
||||||
|
xcolor-solarized
|
||||||
|
enumitem
|
||||||
|
listings
|
||||||
|
siunitx
|
||||||
|
amsmath
|
||||||
|
hyperref
|
||||||
|
bookmark
|
||||||
|
preprint
|
||||||
|
|
||||||
|
## -- lwarp dependencies
|
||||||
|
lwarp
|
||||||
|
ifptex
|
||||||
|
|
||||||
|
## -- indirect dependencies
|
||||||
|
standalone
|
||||||
|
epstopdf-pkg
|
||||||
|
ltablex
|
||||||
|
collectbox
|
||||||
|
geometry
|
||||||
|
environ
|
||||||
|
xpatch
|
||||||
|
infwarerr
|
||||||
|
catchfile
|
||||||
|
ltxcmds
|
||||||
|
etexcmds
|
||||||
|
letltxmacro
|
||||||
|
newunicodechar
|
||||||
|
upquote
|
||||||
|
kvoptions
|
||||||
|
kvsetkeys
|
||||||
|
comment
|
||||||
|
xstring
|
||||||
|
microtype
|
||||||
|
psnfss
|
||||||
|
collection-fontsrecommended
|
|
@ -49,7 +49,7 @@ jobs:
|
||||||
uses: paolobrasolin/setup-texlive-action@v1
|
uses: paolobrasolin/setup-texlive-action@v1
|
||||||
with:
|
with:
|
||||||
profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
|
profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
|
||||||
packages-path: ${{ github.workspace }}/.github/tex/packages.test.txt
|
packages-path: ${{ github.workspace }}/.github/tex/packages.doc.txt
|
||||||
|
|
||||||
# - name: "install tikz-trackschematic"
|
# - name: "install tikz-trackschematic"
|
||||||
# run: ./build.sh --non-interactive --install-dev
|
# run: ./build.sh --non-interactive --install-dev
|
||||||
|
|
|
@ -14,11 +14,26 @@ jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# 1. checkout the repo
|
||||||
- name: "checkout"
|
- name: "checkout"
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
## create varibale ${{ steps.tag.outputs.tag }}
|
# 2. install TeX Live
|
||||||
|
- name: "install ghostscript"
|
||||||
|
run: sudo apt-get install -y ghostscript
|
||||||
|
|
||||||
|
- name: "setup TeX Live (via paolobrasolin)"
|
||||||
|
uses: paolobrasolin/setup-texlive-action@v1
|
||||||
|
with:
|
||||||
|
profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
|
||||||
|
packages-path: ${{ github.workspace }}/.github/tex/packages.doc.txt
|
||||||
|
|
||||||
|
# 3. (re-)compile the documentation
|
||||||
|
- name: "update tikz-trackschematic documentation before release"
|
||||||
|
run: ./build.sh --non-interactive --memory-increase --compile-doc
|
||||||
|
|
||||||
|
# 4. create package and release notes
|
||||||
|
## get varibale ${{ steps.tag.outputs.tag }}
|
||||||
- name: "get tag"
|
- name: "get tag"
|
||||||
id: tag
|
id: tag
|
||||||
uses: dawidd6/action-get-tag@v1
|
uses: dawidd6/action-get-tag@v1
|
||||||
|
@ -26,12 +41,10 @@ jobs:
|
||||||
# Optionally strip `v` prefix
|
# Optionally strip `v` prefix
|
||||||
strip_v: false
|
strip_v: false
|
||||||
|
|
||||||
- name: "update tikz-trackschematic documentation before release"
|
|
||||||
run: ./build.sh --non-interactive --compile-doc
|
|
||||||
|
|
||||||
- name: "create tikz-trackschematic package"
|
- name: "create tikz-trackschematic package"
|
||||||
run: ./build.sh --non-interactive --release ${{ steps.tag.outputs.tag }}
|
run: ./build.sh --non-interactive --release ${{ steps.tag.outputs.tag }}
|
||||||
|
|
||||||
|
# 5. publish package as new release on github
|
||||||
- name: "create release"
|
- name: "create release"
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
|
@ -60,3 +73,6 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
id: ${{ steps.create_release.outputs.id }}
|
id: ${{ steps.create_release.outputs.id }}
|
||||||
|
|
||||||
|
# 6. upload new release to CTAN
|
||||||
|
## TODO
|
60
build.sh
60
build.sh
|
@ -37,6 +37,8 @@ install, test or release a package for tikz-trackschematic
|
||||||
-u, --uninstall-dev Deinstall dev-package from local TeX Live environment.
|
-u, --uninstall-dev Deinstall dev-package from local TeX Live environment.
|
||||||
The -u option overrides any previous -i option.
|
The -u option overrides any previous -i option.
|
||||||
|
|
||||||
|
-x, --memory-increase Increase available TeX memory.
|
||||||
|
|
||||||
-t, --test Tests the current src/ against the test/.
|
-t, --test Tests the current src/ against the test/.
|
||||||
|
|
||||||
-c, --compile-doc Compile documentation sources.
|
-c, --compile-doc Compile documentation sources.
|
||||||
|
@ -53,6 +55,7 @@ EOF
|
||||||
VERBOSITY=2 # set by cli argument
|
VERBOSITY=2 # set by cli argument
|
||||||
NOINTERACT=0 # set by cli argument
|
NOINTERACT=0 # set by cli argument
|
||||||
INSTALL=0 # set by cli argument
|
INSTALL=0 # set by cli argument
|
||||||
|
TEXMEMORY=0 # set by cli argument
|
||||||
TESTING=0 # set by cli argument
|
TESTING=0 # set by cli argument
|
||||||
COMPILE=0 # set by cli argument
|
COMPILE=0 # set by cli argument
|
||||||
SYMBOLOGY=0 # set by cli argument
|
SYMBOLOGY=0 # set by cli argument
|
||||||
|
@ -90,6 +93,9 @@ process_arguments() {
|
||||||
-u|--uninstall-dev)
|
-u|--uninstall-dev)
|
||||||
INSTALL=2
|
INSTALL=2
|
||||||
;;
|
;;
|
||||||
|
-x|--memory-increase)
|
||||||
|
TEXMEMORY=1
|
||||||
|
;;
|
||||||
-t|--test)
|
-t|--test)
|
||||||
TESTING=1
|
TESTING=1
|
||||||
;;
|
;;
|
||||||
|
@ -587,20 +593,6 @@ run_compile_documentation() {
|
||||||
MEMORY_USAGE=$(grep "words of memory out of" .tex/${NAME}.log | cut -d " " -f2)
|
MEMORY_USAGE=$(grep "words of memory out of" .tex/${NAME}.log | cut -d " " -f2)
|
||||||
MEMORY_USAGE=$(($MEMORY_USAGE/1000))
|
MEMORY_USAGE=$(($MEMORY_USAGE/1000))
|
||||||
#
|
#
|
||||||
## compiling snipptes.tex may run out of memory!
|
|
||||||
## to increase available memory find local texmf.cnf:
|
|
||||||
# kpsewhich -a texmf.cnf
|
|
||||||
# returns /usr/local/texlive/2021/texmf.cnf
|
|
||||||
## append in /usr/local/texlive/2021/texmf.cnf
|
|
||||||
# % increase available memory
|
|
||||||
# main_memory = 12000000
|
|
||||||
# extra_mem_bot = 12000000
|
|
||||||
# font_mem_size = 12000000
|
|
||||||
# pool_size = 12000000
|
|
||||||
# buf_size = 12000000
|
|
||||||
## run
|
|
||||||
# sudo mktexlsr
|
|
||||||
#
|
|
||||||
if [ $EXIT_CODE = 0 ]; then
|
if [ $EXIT_CODE = 0 ]; then
|
||||||
log_info " - build successful in ${TIME}s and with ${MEMORY_USAGE}k memory."
|
log_info " - build successful in ${TIME}s and with ${MEMORY_USAGE}k memory."
|
||||||
#
|
#
|
||||||
|
@ -869,6 +861,37 @@ remove_dev_files() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
change_tex_memory() {
|
||||||
|
## compiling snipptes.tex may run out of memory!
|
||||||
|
## to increase available memory find local texmf.cnf:
|
||||||
|
TEXMF_PATH=$(kpsewhich -a texmf.cnf | awk "NR==1") # default .../texlive/YYYY/texmf.cnf
|
||||||
|
log_note "Found local texmf.cnf at $TEXMF_PATH"
|
||||||
|
##
|
||||||
|
## check for already made changes
|
||||||
|
STATUS=0
|
||||||
|
grep -qs '%% \[tikz-trackschematic\] increase available memory' $TEXMF_PATH || STATUS=1
|
||||||
|
if [ $STATUS = 0 ]; then
|
||||||
|
log_note "$TEXMF_PATH has already been modified!"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
##
|
||||||
|
user_confirmation "Do you wish to increase TeX memory by modifying the file $TEXMF_PATH?"
|
||||||
|
## increase available memory
|
||||||
|
echo '%% [tikz-trackschematic] increase available memory' | $rootrun tee -a $TEXMF_PATH >> /dev/null 2>&1
|
||||||
|
echo 'main_memory = 12000000' | $rootrun tee -a $TEXMF_PATH >> /dev/null 2>&1
|
||||||
|
echo 'extra_mem_bot = 12000000' | $rootrun tee -a $TEXMF_PATH >> /dev/null 2>&1
|
||||||
|
echo 'font_mem_size = 12000000' | $rootrun tee -a $TEXMF_PATH >> /dev/null 2>&1
|
||||||
|
echo 'pool_size = 12000000' | $rootrun tee -a $TEXMF_PATH >> /dev/null 2>&1
|
||||||
|
echo 'buf_size = 12000000' | $rootrun tee -a $TEXMF_PATH >> /dev/null 2>&1
|
||||||
|
## update TeX Live installation
|
||||||
|
TEXlsr=`which mktexlsr`
|
||||||
|
if [ $VERBOSITY -ge 3 ]; then
|
||||||
|
$rootrun $TEXlsr
|
||||||
|
else
|
||||||
|
$rootrun $TEXlsr --quiet
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
## -- cleanup
|
## -- cleanup
|
||||||
## from create_release
|
## from create_release
|
||||||
|
@ -938,6 +961,15 @@ if [ $INSTALL = 2 ]; then
|
||||||
remove_dev_files
|
remove_dev_files
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $TEXMEMORY = 1 ]; then
|
||||||
|
##
|
||||||
|
check_texlive
|
||||||
|
check_sudo
|
||||||
|
|
||||||
|
##
|
||||||
|
change_tex_memory
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $TESTING = 1 ]; then
|
if [ $TESTING = 1 ]; then
|
||||||
##
|
##
|
||||||
check_pdflatex
|
check_pdflatex
|
||||||
|
|
Loading…
Reference in New Issue