Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into csl
Browse files Browse the repository at this point in the history
  • Loading branch information
evie-mo committed Apr 22, 2024
2 parents a119919 + 8eff4c4 commit a829acf
Show file tree
Hide file tree
Showing 225 changed files with 40,802 additions and 2,615 deletions.
104 changes: 104 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Bug Report / Feature Request
description: 报告模板中的问题或者请求实现更多功能。

body:
- type: checkboxes
id: checklist
attributes:
label: 提交前检查
description: 请确保你提交的问题符合以下的要求。
options:
- label: 我已经充分阅读了模板文档。
required: true
- label: 我的问题并非关于模板的用法(否则请前往 discussions 提出)。
required: true
- label: 我已经搜索了已有的 issues 和 discussion,确认没有重复提交。
required: true

- type: input
id: system
attributes:
label: 系统
description: 使用的系统
placeholder: macOS 13.2 / Windows 11 / Ubuntu 24.04 / Overleaf / TeXPage
validations:
required: true

- type: input
id: tex-distro
attributes:
label: TeX 发行版
description: 使用的 TeX 发行版(在线平台可在项目设置中查看)
placeholder: TeX Live 2024 / MiKTeX 24.1 / CTEX 3.0.216.3
validations:
required: true

- type: input
id: tex-program
attributes:
label: TeX 编译器
description: 使用的 TeX 程序(如不了解,保留默认值)
placeholder: XeLaTeX / LuaLaTeX / pdfLaTeX
value: XeLaTeX
validations:
required: true

- type: input
id: version
attributes:
label: 版本
description: 使用的模板版本(可打开 `thuthesis.cls` 搜索 `\ProvidesClass` 查看)
placeholder: '7.4.0'
validations:
required: true

- type: dropdown
id: degree-type
attributes:
label: 学位类型
description: 模板的学位论文类型
options:
- bachelor
- master
- doctor
- postdoc
validations:
required: true

- type: textarea
id: bug-report
attributes:
label: 问题描述
description: 请简要描述你遇到的问题,并附上必要的截图等。
placeholder: |
《研究生学位论文写作指南》第 xx 页要求……
而模板编译的结果是……
validations:
required: true

- type: textarea
id: reproducer
attributes:
label: 复现代码
description: 能复现上述问题的最小代码片段
render: TeX
placeholder: |
\documentclass[degree=doctor]{thuthesis}
\begin{document}
abc
\end{document}
validations:
required: true

- type: textarea
id: log
attributes:
label: 编译日志
description: 相关的编译日志(文本形式粘贴)
render: Text

- type: textarea
id: additional-info
attributes:
label: 其他信息
description: 其他你认为有必要提供的信息
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: 模板文档
url: http://mirrors.ctan.org/macros/latex/contrib/thuthesis/thuthesis.pdf
about: 阅读模板使用文档。
- name: GitHub Discussions
url: https://github.com/tuna/thuthesis/discussions
about: 在讨论区询问模板的使用方法。
18 changes: 0 additions & 18 deletions .github/workflows/Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/build_test_env.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/install-packages.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/install-texlive.sh

This file was deleted.

108 changes: 78 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,91 @@
name: Test

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

env:
XECJK_PKGS: fontspec xecjk ulem xetex
CTEX_PKGS: cjk ctex everysel zhnumber
BIBLATEX_PKGS: biber biblatex biblatex-apa biblatex-gb7714-2015 biblatex-mla xstring
HYPERREF_PKGS: pdflscape
NOMENCL_PKGS: nomencl koma-script xkeyval
BIN_PKGS: latexmk l3build
REQUIRED_PKGS: >-
scheme-basic bibunits bigfoot caption enumitem
environ etoolbox filehook footmisc notoccite pdfpages threeparttable
titlesec trimspaces unicode-math lt3luabridge cell
FONT_PKGS: fandol tex-gyre xits
EXTRA_PKGS: algorithms apacite booktabs ntheorem siunitx
MARKDOWN_PKGS: markdown fancyvrb csvsimple gobble
DOC_PKGS: hologo hypdoc listings xcolor
EXAMPLE_PLGS: float fp metalogo multirow mwe


jobs:

test:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
container: ghcr.io/tuna/thuthesis-test-env
steps:
- uses: actions/checkout@v3
- name: Test thesis
run: make thesis
- name: Test spine
run: make spine
- name: Test doc
run: make doc
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install TeX Live
uses: teatimeguest/setup-texlive-action@v3
with:
packages: >-
${{ env.XECJK_PKGS }} ${{ env.CTEX_PKGS }} ${{ env.BIBLATEX_PKGS }}
${{ env.HYPERREF_PKGS }} ${{ env.NOMENCL_PKGS }} ${{ env.BIN_PKGS }}
${{ env.REQUIRED_PKGS }} ${{ env.FONT_PKGS }} ${{ env.EXTRA_PKGS }}
${{ env.MARKDOWN_PKGS }} ${{ env.DOC_PKGS }} ${{ env.EXAMPLE_PLGS }}
update-all-packages: true
- name: Build documentation and example
run: make all-dev
- name: Upload build results
uses: actions/upload-artifact@v4
with:
name: build-result
path: |
thuthesis.pdf
thuthesis-example.pdf
- name: Build release zip
run: |
version=$(git describe --tags)
echo "Current git revision: $version"
python3 utils/create_release.py --version $version
- name: Build CTAN release zip with l3build
run: l3build ctan --config utils/build-ctan
- name: Upload release zip
uses: actions/upload-artifact@v4
with:
name: thuthesis-snapshot-release
path: |
thuthesis-ctan.zip
dist/thuthesis-*.zip
test:
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install TeX Live
uses: teatimeguest/setup-texlive-action@v3
with:
packages: >-
${{ env.XECJK_PKGS }} ${{ env.CTEX_PKGS }} ${{ env.BIBLATEX_PKGS }}
${{ env.HYPERREF_PKGS }} ${{ env.NOMENCL_PKGS }} ${{ env.BIN_PKGS }}
${{ env.REQUIRED_PKGS }} ${{ env.FONT_PKGS }} ${{ env.EXTRA_PKGS }}
${{ env.MARKDOWN_PKGS }} ${{ env.DOC_PKGS }} ${{ env.EXAMPLE_PLGS }}
update-all-packages: true
- name: Test with l3build
run: make test
- name: Upload test results if failed
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-result
path: build/test/


build_release:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/v') || contains(github.event.head_commit.message, '[zip]')"
container: ghcr.io/tuna/thuthesis-test-env
steps:
- uses: actions/checkout@v3
- name: Install required packages
run: bash .github/workflows/install-packages.sh
- name: Build release zip with l3build
run: l3build ctan --config build-ctan
- name: Upload release zip
uses: actions/upload-artifact@v3
with:
name: thuthesis-ctan
path: thuthesis-ctan.zip
name: test-result-${{ matrix.os }}
path: |
build/test
build/test-testfiles
8 changes: 0 additions & 8 deletions .github/workflows/texlive.profile

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,6 @@ TSWLatexianTemp*
*.sta

yarn.lock

*.luabridge.lua

Loading

0 comments on commit a829acf

Please sign in to comment.