Skip to content

Commit

Permalink
refactor(ci): split workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Menke <henri@henrimenke.de>
  • Loading branch information
hmenke committed Dec 17, 2021
1 parent 065c015 commit 50267ec
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 24 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Test suite

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
/tmp/texlive
/tmp/tlpkg
~/.texlive
key: texlive-2021

- name: Set up TeX Live environment
uses: pgf-tikz/actions/install-tl@master
with:
packages:
amsfonts
amsmath
atbegshi
atveryend
bigintcalc
bitset
colortbl
courier
ctablestack
dvipdfmx
dvips
dvisvgm
ec
epstopdf-pkg
etexcmds
fp
geometry
gettitlestring
graphics
graphics-def
hycolor
hyperref
iftex
imakeidx
intcalc
kvdefinekeys
kvoptions
kvsetkeys
l3build
latex
latex-bin
letltxmacro
listings
lm
ltxcmds
luainputenc
luaotfload
luatex
luatexbase
luaxml
make4ht
makeindex
metafont
mfware
ms
oberdiek
pdfescape
pdftexcmds
psnfss
refcount
rerunfilecheck
stringenc
symbol
tex4ht
texlive-scripts
times
todonotes
tools
uniquecounter
url
xcolor
xetex
xkeyval
zapfding

- name: Install PGF
run: |
tlmgr init-usertree --usertree $PWD
echo "TEXMFHOME=$PWD" >> $GITHUB_ENV
- name: Generate the revision file
run: |
l3build revisionfile
cat tex/generic/pgf/pgf.revision.tex
echo "GIT_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: Run test suite
run: |
l3build check -q -H --show-log-on-error
119 changes: 119 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Manual

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
/tmp/texlive
/tmp/tlpkg
~/.texlive
key: texlive-2021

- name: Set up TeX Live environment
uses: pgf-tikz/actions/install-tl@master
with:
packages:
amsfonts
amsmath
atbegshi
atveryend
bigintcalc
bitset
colortbl
courier
ctablestack
dvipdfmx
dvips
dvisvgm
ec
epstopdf-pkg
etexcmds
fp
geometry
gettitlestring
graphics
graphics-def
hycolor
hyperref
iftex
imakeidx
intcalc
kvdefinekeys
kvoptions
kvsetkeys
l3build
latex
latex-bin
letltxmacro
listings
lm
ltxcmds
luainputenc
luaotfload
luatex
luatexbase
luaxml
make4ht
makeindex
metafont
mfware
ms
oberdiek
pdfescape
pdftexcmds
psnfss
refcount
rerunfilecheck
stringenc
symbol
tex4ht
texlive-scripts
times
todonotes
tools
uniquecounter
url
xcolor
xetex
xkeyval
zapfding

- name: Install PGF
run: |
tlmgr init-usertree --usertree $PWD
echo "TEXMFHOME=$PWD" >> $GITHUB_ENV
- name: Generate the revision file
run: |
l3build revisionfile
cat tex/generic/pgf/pgf.revision.tex
echo "GIT_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: Build the manual
run: |
l3build doc -q -H
- uses: actions/upload-artifact@v2
with:
name: pgfmanual
path: build/doc/pgfmanual.pdf

- name: Deploy tlcontrib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get update -qq
sudo apt-get install -qq libxml-parser-perl libxml-xpath-perl libtext-unidecode-perl tree
cp build/doc/pgfmanual.pdf ../
bash ci/update_tlcontrib.sh
33 changes: 9 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: CI
name: Release

on: [push, pull_request]
on:
push:
tags:
- '**'

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -90,7 +92,7 @@ jobs:
xkeyval
zapfding

- name: 'Install PGF'
- name: Install PGF
run: |
tlmgr init-usertree --usertree $PWD
echo "TEXMFHOME=$PWD" >> $GITHUB_ENV
Expand All @@ -111,10 +113,9 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: pgfmanual
path: doc/generic/pgf/pgfmanual.pdf
path: build/doc/pgfmanual.pdf

- name: "ZIP: Sign"
if: startsWith(github.ref, 'refs/tags/')
env:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
Expand All @@ -136,19 +137,9 @@ jobs:
gpg --verify "pgf_${GIT_TAG}.ctan.flatdir.zip.sig"
rm -rf "$GNUPGHOME"
- name: Deploy tlcontrib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get update -qq
sudo apt-get install -qq libxml-parser-perl libxml-xpath-perl libtext-unidecode-perl tree
cp doc/generic/pgf/pgfmanual.pdf ../
bash ci/update_tlcontrib.sh
- name: "Release: create"
uses: actions/create-release@v1
id: create_release
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -158,18 +149,16 @@ jobs:

- name: "Release: upload manual"
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: doc/generic/pgf/pgfmanual.pdf
asset_path: build/doc/pgfmanual.pdf
asset_name: pgfmanual-${{ env.GIT_TAG }}.pdf
asset_content_type: application/pdf

- name: "Release: upload public key"
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -180,7 +169,6 @@ jobs:

- name: "Release: upload TDS zip"
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -191,7 +179,6 @@ jobs:

- name: "Release: upload TDS signature"
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -202,7 +189,6 @@ jobs:

- name: "Release: upload CTAN zip"
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -213,7 +199,6 @@ jobs:

- name: "Release: upload CTAN signature"
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -248,7 +233,7 @@ jobs:
version: ${{ env.GIT_TAG }}

- name: "CTAN: Upload"
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'pgf-tikz/pgf'
if: github.repository == 'pgf-tikz/pgf'
uses: pgf-tikz/actions/ctan-upload@master
with:
action: upload
Expand Down

0 comments on commit 50267ec

Please sign in to comment.