Open muzimuzhi opened 6 months ago
main.yml 没有一致使用存在 env.CTAN_URL 的 CTAN 镜像,会导致 CI 结果不稳定。
main.yml
env.CTAN_URL
目前的 main.yml,
CTAN_URL
install-tl
tlmgr install
tlmgr update --self --all
tlmgr update
build-ubuntu
tlmgr: Remote database (revision 70684 of the texlive-scripts package) seems to be older than the local installation (rev 70707 of texlive-scripts); please use a different mirror and/or wait a day or two.
但是,在 build-windows job 里,tlmgr install 一步连接的是 illinois 的镜像,这个 job 就没有失败。
build-windows
https://github.com/stone-zeng/fduthesis/blob/d84e0dd7df657d47943e98c98ff843cc1336bc5f/.github/workflows/main.yml#L5-L6 https://github.com/stone-zeng/fduthesis/blob/d84e0dd7df657d47943e98c98ff843cc1336bc5f/.github/workflows/main.yml#L25-L32
从提高 CI 结果稳定性的角度,tlmgr 的所有命令都支持 --repository 选项,也可以通过 tlmgr option repository <uri> 一次性设置。
tlmgr
--repository
tlmgr option repository <uri>
从简化 workflow 设置、缩短 CI 运行时间的角度,也许可以像 CTeX-org/ctex-kit 里那样(https://github.com/CTeX-org/ctex-kit/pull/683/commits/dc9e68d9262daf3bc1cabde8d2567a51c01d6773 ),使用 action teatimeguest/setup-texlive-action。它能自动缓存 texlive 安装目录、自动设置 PATH,最近也支持了指定 CTAN 镜像 (v3.1.0)。
CTeX-org/ctex-kit
teatimeguest/setup-texlive-action
main.yml
没有一致使用存在env.CTAN_URL
的 CTAN 镜像,会导致 CI 结果不稳定。目前的
main.yml
,CTAN_URL
,对应 rit 的 CTAN 镜像install-tl
时,使用的是env.CTAN_URL
指定的镜像tlmgr install
安装宏包时,使用的是自动选择的 CTAN 镜像tlmgr update --self --all
升级时,使用的是env.CTAN_URL
指定的镜像tlmgr update
这一步,如果 rit 的镜像比安装宏包时连接的 CTAN 镜像要老,就会产生错误,导致 CI 失败。tlmgr install
时连接了较新的 princeton 的镜像,于是在tlmgr update
时报错,整个build-ubuntu
job 失败。但是,在
build-windows
job 里,tlmgr install
一步连接的是 illinois 的镜像,这个 job 就没有失败。https://github.com/stone-zeng/fduthesis/blob/d84e0dd7df657d47943e98c98ff843cc1336bc5f/.github/workflows/main.yml#L5-L6 https://github.com/stone-zeng/fduthesis/blob/d84e0dd7df657d47943e98c98ff843cc1336bc5f/.github/workflows/main.yml#L25-L32
从提高 CI 结果稳定性的角度,
tlmgr
的所有命令都支持--repository
选项,也可以通过tlmgr option repository <uri>
一次性设置。从简化 workflow 设置、缩短 CI 运行时间的角度,也许可以像
CTeX-org/ctex-kit
里那样(https://github.com/CTeX-org/ctex-kit/pull/683/commits/dc9e68d9262daf3bc1cabde8d2567a51c01d6773 ),使用 actionteatimeguest/setup-texlive-action
。它能自动缓存 texlive 安装目录、自动设置 PATH,最近也支持了指定 CTAN 镜像 (v3.1.0)。