From bd08da9ac4080a50cc00ea6fb801c620a4e13901 Mon Sep 17 00:00:00 2001 From: Vit Kabele Date: Mon, 5 Apr 2021 22:01:40 +0100 Subject: [PATCH] Add the CI configurations --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 15 +++++++++++++++ README.md | 6 ++++++ 3 files changed, 55 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..06aa3c4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # 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" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: { image: 'exaexa/latex' } + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - name: Build the thesis + run: make + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: Thesis + path: | + *.pdf + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..54a6422 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +# +# This GitLab CI configuration builds the thesis on each push +# The thesis is stored as an repository artifact +# +# It works with the gitlab.mff.cuni.cz instance. +# +image: exaexa/latex + +build: + script: make + artifacts: + paths: + - thesis.pdf + - abstract-cz.pdf + - abstract-en.pdf diff --git a/README.md b/README.md index 63bc028..9935cf5 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,15 @@ What's new: - autobuilding of abstract PDF/A from metadata - university-wide variants of the front page (nature faculty&bioinformatics!) - Czech localization with nicely named references +- Dockerized environment See the [pre-built version](build/thesis.pdf) for details +## CI configuration + +The repository contains valid configuration for both *GitLab* CI and the *GitHub* actions. +No matter what GIT hosting you use, you can always download latest version of your thesis right from the artifacts! + ## How-to 1. Type `make`, check that everything compiles. You should get a `thesis.pdf` that passes the PDF/A validation. If not, complain.