Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NJUThesis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NJU LUG
NJU LaTeX Templates
NJUThesis
Commits
97c961c1
Commit
97c961c1
authored
3 years ago
by
Yu Xiong
Browse files
Options
Downloads
Patches
Plain Diff
chore: 优化测试脚本
parent
169582b1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/build.yml
+64
-82
64 additions, 82 deletions
.github/workflows/build.yml
.github/workflows/texlive.profile
+14
-0
14 additions, 0 deletions
.github/workflows/texlive.profile
source/njuthesis.dtx
+0
-1
0 additions, 1 deletion
source/njuthesis.dtx
with
78 additions
and
83 deletions
.github/workflows/build.yml
+
64
−
82
View file @
97c961c1
name
:
Build LaTeX document
name
:
Build LaTeX document
on
:
on
:
push
:
push
:
branches
:
branches
:
...
@@ -11,117 +12,98 @@ on:
...
@@ -11,117 +12,98 @@ on:
branches
:
branches
:
-
master
-
master
env
:
CTAN_URL
:
https://mirrors.rit.edu/CTAN
TL_PACKAGES
:
alphalph auxhook background biber biblatex biblatex-gb7714-2015 bibtex blindtext booktabs caption cleveref cm-unicode colortbl csquotes ctex dashundergaps diagbox emptypage enumitem everypage fancyhdr fancyvrb fandol floatrow footmisc gbt7714 hologo hycolor hypdoc hyperref l3build latexmk libertinus-fonts listings lm-math lua-ul lualatex-math luatex85 makecell makeindex mathtools mhchem microtype multirow natbib ninecolors njuvisual ntheorem pict2e preview psnfss setspace siunitx standalone symbol tabularray tex-gyre tex-gyre-math thmtools threeparttable tocloft translator underscore unicode-math url wrapfig xits xstring zhlipsum zref
jobs
:
jobs
:
build
_test
:
build
-on-ubuntu
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
if
:
"
!startsWith(github.ref,
'refs/tags/v')"
if
:
"
!startsWith(github.ref,
'refs/tags/v')"
strategy
:
env
:
matrix
:
SET_PATH
:
|
latex
:
[
xelatex
,
lualatex
]
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
steps
:
steps
:
-
name
:
Set up Git repository
-
name
:
Set up Git repository
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
-
name
:
Download njuvisual package (1/2)
-
name
:
Install TeX Live
uses
:
wei/curl@master
run
:
|
with
:
${{ env.SET_PATH }}
args
:
-s -o "njuvisual.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual.dtx"
wget ${{ env.CTAN_URL }}/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
-
name
:
Download njuvisual package (2/2)
cd install-tl-20* && ./install-tl --profile ../.github/workflows/texlive.profile
uses
:
wei/curl@master
tlmgr install ${{ env.TL_PACKAGES }}
with
:
tlmgr update --self --all --no-auto-install --repository=${{ env.CTAN_URL }}/systems/texlive/tlnet/
args
:
-s -o "njuvisual-curves.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual-curves.dtx"
-
name
:
Install latest njuthesis
-
name
:
Extract cls from njuthesis
run
:
|
uses
:
FengChendian/latex-dtx2cls-action@4.0.1
${{ env.SET_PATH }}
with
:
l3build install
root_file
:
njuthesis.dtx
working_directory
:
./source/
-
name
:
Compile test file
run
:
|
-
name
:
Extract sty from njuvisual
${{ env.SET_PATH }}
uses
:
FengChendian/latex-dtx2cls-action@4.0.1
cd test
with
:
latexmk -halt-on-error -time -pdfxe -jobname=test-xetex test.tex
root_file
:
njuvisual.dtx
latexmk -halt-on-error -time -pdflua -jobname=test-luatex test.tex
working_directory
:
./
-
name
:
Copy files to test folder
run
:
cp ./njuvisual.sty source/njuthesis.cls test/
-
name
:
Compile to PDF
uses
:
HermitSun/latex-action@v3
with
:
root_file
:
test.tex
working_directory
:
./test/
latexmk_use_${{ matrix.latex }}
:
true
args
:
"
-bibtex"
-
name
:
Upload PDF
-
name
:
Upload PDF
uses
:
actions/upload-artifact@v2
uses
:
actions/upload-artifact@v2
with
:
with
:
name
:
PDF_${{ matrix.latex }}
name
:
generated-pdf
path
:
path
:
test/
test
.pdf
test/
*
.pdf
release
:
release
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
if
:
startsWith(github.ref, 'refs/tags/v')
if
:
startsWith(github.ref, 'refs/tags/v')
env
:
SET_PATH
:
|
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
steps
:
steps
:
-
name
:
Set up Git repository
-
name
:
Set up Git repository
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
-
name
:
Set Version
-
name
:
Set Version
run
:
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
run
:
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
-
name
:
Download njuvisual package (1/2)
uses
:
wei/curl@master
with
:
args
:
-s -o "njuvisual.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual.dtx"
-
name
:
Download njuvisual package (2/2)
uses
:
wei/curl@master
with
:
args
:
-s -o "njuvisual-curves.dtx" "https://mirrors.rit.edu/CTAN/macros/latex/contrib/njuvisual/njuvisual-curves.dtx"
-
name
:
Extract cls from njuthesis
uses
:
FengChendian/latex-dtx2cls-action@4.0.1
with
:
root_file
:
njuthesis.dtx
working_directory
:
./source/
-
name
:
Extract sty from njuvisual
uses
:
FengChendian/latex-dtx2cls-action@4.0.1
with
:
root_file
:
njuvisual.dtx
working_directory
:
./
-
name
:
Compile class documentation
-
name
:
Install TeX Live
uses
:
HermitSun/latex-action@v3
run
:
|
with
:
${{ env.SET_PATH }}
root_file
:
njuthesis.dtx
wget ${{ env.CTAN_URL }}/systems/texlive/tlnet/install-tl-unx.tar.gz
working_directory
:
./source/
tar -xzf install-tl-unx.tar.gz
latexmk_use_xelatex
:
true
cd install-tl-20* && ./install-tl --profile ../.github/workflows/texlive.profile
args
:
"
-bibtex"
tlmgr install ${{ env.TL_PACKAGES }}
pre_compile
:
"
xetex
njuthesis.dtx"
tlmgr update --self --all --no-auto-install --repository=${{ env.CTAN_URL }}/systems/texlive/tlnet/
post_compile
:
"
mv
njuthesis.pdf
njuthesis-$VERSION.pdf"
-
name
:
Zip RELEASE package
run
:
zip -r njuthesis-$VERSION.zip .vscode docs/njuthesis-sample.bib docs/njuthesis-sample.tex source/njuthesis.cls njuvisual.sty conf.txsprofile LICENSE README.md
-
name
:
Download njuvisual package
run
:
|
wget ${{ env.CTAN_URL }}/macros/latex/contrib/njuvisual/njuvisual.dtx
wget ${{ env.CTAN_URL }}/macros/latex/contrib/njuvisual/njuvisual-curves.dtx
-
name
:
Zip CTAN package
-
name
:
Zip CTAN package
run
:
run
:
|
mkdir -p njuthesis/
${{ env.SET_PATH }}
cp source/njuthesis-$VERSION.pdf njuthesis/njuthesis.pdf
l3build ctan
cp source/README-CTAN.md njuthesis/README.md
mv njuthesis-ctan.zip njuthesis-ctan-$VERSION.zip
cp source/njuthesis.dtx source/njuthesis.ins njuthesis/
cp build/doc/njuthesis.pdf njuthesis-$VERSION.pdf
zip -r njuthesis-ctan-$VERSION.zip njuthesis/
-
name
:
Zip RELEASE package
run
:
|
${{ env.SET_PATH }}
xetex njuvisual.dtx
mv build/unpacked/njuthesis.cls njuthesis.cls
mv docs/njuthesis-sample.bib njuthesis-sample.bib
mv docs/njuthesis-sample.tex njuthesis-sample.tex
zip -r njuthesis-$VERSION.zip .vscode njuthesis-sample.tex njuthesis-sample.bib njuthesis.cls njuvisual.sty conf.txsprofile LICENSE README.md
-
uses
:
"
marvinpinto/action-automatic-releases@latest"
-
uses
:
"
marvinpinto/action-automatic-releases@latest"
with
:
with
:
repo_token
:
"
${{
secrets.GITHUB_TOKEN
}}"
repo_token
:
"
${{
secrets.GITHUB_TOKEN
}}"
prerelease
:
false
prerelease
:
false
files
:
files
:
|
source/
njuthesis-v*.pdf
njuthesis-v*.pdf
njuthesis-v*.zip
njuthesis-v*.zip
njuthesis-ctan-v*.zip
njuthesis-ctan-v*.zip
This diff is collapsed.
Click to expand it.
.github/workflows/texlive.profile
0 → 100644
+
14
−
0
View file @
97c961c1
# From latex3
# https://github.com/latex3/latex3/blob/main/support/texlive.profile
selected_scheme
scheme
-
infraonly
TEXDIR
/
tmp
/
texlive
TEXMFSYSCONFIG
/
tmp
/
texlive
/
texmf
-
config
TEXMFSYSVAR
/
tmp
/
texlive
/
texmf
-
var
TEXMFLOCAL
/
tmp
/
texlive
/
texmf
-
local
TEXMFHOME
~/
texmf
TEXMFCONFIG
~/.
texlive
/
texmf
-
config
TEXMFVAR
~/.
texlive
/
texmf
-
var
option_doc
0
option_src
0
tlpdbopt_autobackup
0
This diff is collapsed.
Click to expand it.
source/njuthesis.dtx
+
0
−
1
View file @
97c961c1
...
@@ -1454,7 +1454,6 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
...
@@ -1454,7 +1454,6 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
caption,
caption,
floatrow,
floatrow,
setspace,
setspace,
lastpage,
emptypage,
emptypage,
fancyhdr,
fancyhdr,
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment