From b0f10f6ce7f96ffd748a87855935de479100e599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 15 Sep 2021 11:32:26 +0200 Subject: [PATCH] Switch to github actions (#17) * Switch to github actions * Install all needed TeXLive packages * Install only needed TeXLive packages --- .github/workflows/build.yml | 52 +++++++++++++++++++++++++++++++++++++ .travis.yml | 42 ------------------------------ tex-packages.txt | 22 ++++++++++++++++ 3 files changed, 74 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml create mode 100644 tex-packages.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f8347ee --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,52 @@ +name: CI + +on: [push, pull_request] + +env: + TEXLIVE_VERSION: 2021 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Setup + run: | + # install current version of inkscape + sudo add-apt-repository -y ppa:inkscape.dev/stable + sudo apt-get update -q + # curl for download, dbus-x11 fixes a lot of warnings from inkscape that + # cluttered the log + sudo apt-get install inkscape curl dbus-x11 -y + inkscape --version + + # install texlive + pip install https://github.com/MaxNoe/texlive-batch-installation/archive/master.tar.gz + install_texlive -t $TEXLIVE_VERSION --collection='-a' --package-file tex-packages.txt -p $HOME/.local/texlive -v + echo "$HOME/.local/texlive/$TEXLIVE_VERSION/bin/x86_64-linux" >> $GITHUB_PATH + + - name: Install Montserrat Font + run: | + curl -Lo $HOME/montserrat.zip https://fonts.google.com/download?family=Montserrat + mkdir -p $HOME/.local/share/fonts + unzip -d $HOME/.local/share/fonts $HOME/montserrat.zip + fc-cache + fc-list 'Montserrat' + luaotfload-tool --update --force + + - name: Build + run: | + dbus-run-session python create_logos.py -n 2 + zip -r ./s4f_all_logos.zip ./s4f_all_logos -x '*.zip' + mv s4f_all_logos.zip s4f_all_logos + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: s4f_all_logos/*.zip diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0ee1fc7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -sudo: required -dist: focal -language: python - -python: 3.7 - -install: - # install current version of inkscape - - sudo add-apt-repository -y ppa:inkscape.dev/stable - - sudo apt-get update -q - # curl for download, dbus-x11 fixes a lot of warnings from inkscape that - # cluttered the log - - sudo apt-get install inkscape curl dbus-x11 -y - - inkscape --version - # install minimal version of TeX Live via automatic installation script - - pip install https://github.com/MaxNoe/texlive-batch-installation/archive/master.tar.gz - - install_texlive -t 2020 -s d -i 'luatex85,xkeyval,standalone,luaotfload,xcolor,pgf,graphicx,fontspec,xifthen,tools,ifmtarg' -p $HOME/.local/texlive -v - - export PATH="$HOME/.local/texlive/2020/bin/x86_64-linux:$PATH" - # install montserrat font - - curl -Lo $HOME/montserrat.zip https://fonts.google.com/download?family=Montserrat - - mkdir -p $HOME/.local/share/fonts - - unzip -d $HOME/.local/share/fonts $HOME/montserrat.zip - - fc-cache - - fc-list 'Montserrat' - - luaotfload-tool --update --force - -script: - - dbus-run-session python create_logos.py -n 2 - - zip -r ./s4f_all_logos.zip ./s4f_all_logos -x '*.zip' - - mv s4f_all_logos.zip s4f_all_logos - - -deploy: - provider: releases - skip_cleanup: true - api_key: - secure: nYk4J043DL7idGLcR1gYZqB+36HPLcoqnTL2LDQ4bWDGWBxCYjg32MHRMcX8ltU+0SRxp0rmkid2lwnYKiCRpEnmmcfAtiAAct4adyKVyCmTjvXoPy+/8yXw5bjp2iKoXFbPVw6mCaoaQrwVB4HrlO9uqMOunh3o6tF1braEyipbAS10yH82lS0zbPxW7NUiSSVuUksqBak+JDOPx6QIo2nDZiVboTfqsHOdkG284qbCjMHIv+MkDfirF9RyRRAO/QP6dCt7ZR0WkDAvxw2BgblS+RtWMBtRuUtcw6MqO4Mqf3DOdFc0vPwvhUHZdgJDJvE2Kws/cKPSEVVY7/Fxtlf22KoR/srKypPSxfy1vB9WRznwG86OSZvZXifdj6y4yWenlhGBab0Kgc53DH3boqpy5EsWB/jlxFLNoHK4qeuU1qb7ZWfB2ubCXFMYsZJro3KWDGqXcJpWCNrIux+/RZoKdwJ5z+1/PGJRsTtJfgjtjAZnE9zY5qCdSQCQf9QTkRvadJyiblMwTbYTuvqIS5cAAywUNqkRJV6sRw33H3J7iPXh5HsCgAZ/lbVU85i0S4vUZxAZ0bGwI1Ryl74iaEYqDTDl82WWS8na7EnLFcPTY/tVMdoSlnPUtTZ2njNyyegI5/YX7dq+hkSh7np6UtuQFxPcCoONKrLnZHg9Mc4= - file_glob: true - file: s4f_all_logos/*.zip - on: - repo: s4f-dortmund/regionalgruppen_logos - tags: true diff --git a/tex-packages.txt b/tex-packages.txt new file mode 100644 index 0000000..737e975 --- /dev/null +++ b/tex-packages.txt @@ -0,0 +1,22 @@ +epstopdf-pkg +fontspec +geometry +graphics +ifmtarg +infwarerr +latex +latex-bin +luacode +lualatex-math +luaotfload +luatex +luatex85 +luatex85 +luatexbase +pgf +standalone +tools +xcolor +xifthen +xkeyval +ltxcmds