added github action 'debug'

master
Martin Scheidt 2022-02-09 14:09:41 +01:00
parent 74a419c972
commit 476f263972
4 changed files with 64 additions and 13 deletions

43
.github/workflows/debug.yml vendored Normal file
View File

@ -0,0 +1,43 @@
# This is a basic workflow to help you get started with Actions
name: debug
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
debug:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# - name: "install TeXLive"
# # Actually pick a version, do not point on master, or the build won't be reproducible
# uses: DanySK/setup-texlive-action@master
# # You can omit the following if the default path is ok with you
# with:
# requirements-file: .github/texlive/requirements.txt
- name: "Setup TeX Live"
uses: teatimeguest/setup-texlive-action@v1
with:
package-file: .github/texlive/requirements.txt
- name: "checkout"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v2
- name: "install tikz-trackschematic"
run: |
chmod +x dev-install.sh
./dev-install.sh -b
- name: Setup upterm session
uses: lhotari/action-upterm@v1
with:
## limits ssh access and adds the ssh public keys of the listed GitHub users
limit-access-to-users: railtoolkit,kaat0

View File

@ -20,12 +20,16 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: "install TeXLive"
# Actually pick a version, do not point on master, or the build won't be reproducible
uses: DanySK/setup-texlive-action@master
# You can omit the following if the default path is ok with you
# - name: "install TeXLive"
# # Actually pick a version, do not point on master, or the build won't be reproducible
# uses: DanySK/setup-texlive-action@master
# # You can omit the following if the default path is ok with you
# with:
# requirements-file: .github/texlive/requirements.txt
- name: "Setup TeX Live"
uses: teatimeguest/setup-texlive-action@v1
with:
requirements-file: .github/texlive/requirements.txt
package-file: .github/texlive/requirements.txt
- name: "checkout"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@ -34,7 +38,7 @@ jobs:
- name: "install tikz-trackschematic"
run: |
chmod +x dev-install.sh
./dev-install.sh -q
./dev-install.sh -b
- name: "test tikz-trackschematic"
run: |

View File

@ -8,14 +8,18 @@ set -e
## -- pass getopts
usage() { echo "Usage: dev-install.sh [-q]"; }
usage() { echo "Usage: dev-install.sh [-q] [-b]"; }
verbose=1
batch_mode=0
while getopts ":q" opt; do
while getopts ":qb" opt; do
case ${opt} in
q ) verbose=0
;;
b ) batch_mode=1
verbose=0
;;
\? ) usage
exit 1
;;
@ -79,7 +83,7 @@ DEVDIR="tex/latex/tikz-trackschematic-dev"
PROJECTDIR=$(pwd -P)
if [ "$verbose" -eq 1 ]; then
if [ "$batch_mode" -eq 0 ]; then
echo ""
echo "Do you wish to link this package from"
echo "$PROJECTDIR/src to"

View File

@ -49,13 +49,13 @@ check_trackschematic() {
ls $TEXMFLOCAL/$DEVDIR/tikz-trackschematic.sty >> /dev/null 2>&1 || status=1
if [ $status = 0 ]; then
if [ "$verbose" -eq 1 ]; then
echo "tikz-trackschematic found"
echo "tikz-trackschematic-dev found"
fi
return 0
fi
echo "Library 'tikz-trackschematic' not found."
echo "Be sure to have tikz-trackschematic installed!"
echo "Library 'tikz-trackschematic-dev' not found."
echo "Be sure to have tikz-trackschematic-dev installed!"
exit 1
}
@ -87,7 +87,7 @@ for TEST in $1*.tex; do
if [ "$verbose" -eq 1 ]; then
echo "Testing: ${TEST%.*}"
fi
pdflatex -output-directory=.testing -interaction=batchmode -halt-on-error $TEST # 2>&1 > /dev/null
pdflatex -output-directory=.testing -interaction=batchmode -halt-on-error $TEST 2>&1 > /dev/null
compare -metric DSSIM -colorspace RGB .testing/${TEST%.*}.pdf ${TEST%.*}_expected.pdf .testing/${TEST%.*}_diff.png
if [ "$verbose" -eq 1 ]; then
echo "% difference"