Skip to content

Commit 4618946

Browse files
committed
Use docker for CI
1 parent 9a30eb7 commit 4618946

File tree

3 files changed

+33
-28
lines changed

3 files changed

+33
-28
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -e
3+
4+
export PATH="/tmp/texlive/bin/x86_64-linux:$PATH";
5+
6+
XECJK_PKGS="fontspec ulem xecjk xetex";
7+
CTEX_PKGS="cjk ctex environ everysel trimspaces zhnumber";
8+
ALGORITHM2E_PKGS="algorithm2e ifoddpage relsize";
9+
BIBLATEX_PKGS="biber biblatex biblatex-gb7714-2015 xstring";
10+
NOMENCL_PKGS="nomencl koma-script xkeyval";
11+
12+
BIN_PKGS="latexmk l3build";
13+
REQUIRED_PKGS="$XECJK_PKGS $CTEX_PKGS caption footmisc filehook notoccite \
14+
multirow titlesec unicode-math";
15+
FONT_PKGS="fandol tex-gyre xits";
16+
EXTRA_PKGS="$ALGORITHM2E_PKGS $BIBLATEX_PKGS $NOMENCL_PKGS siunitx";
17+
DOC_PKGS="booktabs hypdoc listings xcolor";
18+
19+
tlmgr install $BIN_PKGS $REQUIRED_PKGS $FONT_PKGS $EXTRA_PKGS $DOC_PKGS;
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
14
REMOTE="https://mirrors.ctan.org/systems/texlive/tlnet";
25
INSTALL="/tmp/install-texlive";
36

7+
# install TeX Live & remove installer
48
mkdir -p "$INSTALL";
59
curl -sSL "$REMOTE/install-tl-unx.tar.gz" | tar -xz -C "$INSTALL" \
610
--strip-components=1;
711
"$INSTALL/install-tl" -no-gui -repository $REMOTE \
812
-profile .github/workflows/texlive.profile;
13+
rm -rf "$INSTALL";
914

15+
# add packages with tlmgr
1016
export PATH="/tmp/texlive/bin/x86_64-linux:$PATH";
11-
12-
XECJK_PKGS="fontspec ulem xecjk xetex";
13-
CTEX_PKGS="cjk ctex environ everysel trimspaces zhnumber";
14-
ALGORITHM2E_PKGS="algorithm2e ifoddpage relsize";
15-
BIBLATEX_PKGS="biber biblatex biblatex-gb7714-2015 xstring";
16-
NOMENCL_PKGS="nomencl koma-script xkeyval";
17-
18-
BIN_PKGS="latexmk l3build";
19-
REQUIRED_PKGS="$XECJK_PKGS $CTEX_PKGS caption footmisc filehook notoccite \
20-
multirow titlesec unicode-math";
21-
FONT_PKGS="fandol tex-gyre xits";
22-
EXTRA_PKGS="$ALGORITHM2E_PKGS $BIBLATEX_PKGS $NOMENCL_PKGS siunitx";
23-
DOC_PKGS="booktabs hypdoc listings xcolor";
24-
25-
tlmgr install $BIN_PKGS $REQUIRED_PKGS $FONT_PKGS $EXTRA_PKGS $DOC_PKGS;

.github/workflows/test.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ jobs:
66
test:
77

88
runs-on: ubuntu-latest
9-
9+
if: "!contains(github.event.head_commit.message, 'ci skip')"
10+
container: tunathu/thuthesis-test-env
1011
steps:
11-
- uses: actions/checkout@v1
12-
- name: Install TeX Live
13-
run: bash .github/workflows/install-texlive.sh
12+
- uses: actions/checkout@v2
13+
- name: Install required packages
14+
run: bash .github/workflows/install-packages.sh
1415
- name: Test thesis
15-
run: |
16-
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
17-
make main
16+
run: make main
1817
- name: Test doc
19-
run: |
20-
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
21-
make doc
18+
run: make doc
2219
- name: l3build check
23-
run: |
24-
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
25-
make test
20+
run: make test

0 commit comments

Comments
 (0)