-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9dc35dc
Showing
16 changed files
with
3,119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build LaTeX diff document | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build_latex: | ||
runs-on: ubuntu-latest | ||
env: | ||
PAPER: ${{ github.event.repository.name }} | ||
MAIN: ${{ github.event.pull_request.base.sha }} | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Compile LaTeX diff | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
root_file: | | ||
${{ env.PAPER }}-diff${{ env.MAIN }}.tex | ||
working_directory: . | ||
extra_system_packages: "git patch" | ||
latexmk_shell_escape: true | ||
pre_compile: git config --global --add safe.directory /github/workspace && latexdiff-vc --git --flatten --disable-auto-mbox --exclude-safecmd="Cref,Cref\*,hspace" -r ${{ env.MAIN }} ${{ env.PAPER }}.tex | ||
env: | ||
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:" | ||
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common" | ||
BIBINPUTS: ".:$PWD/../latex-styles-master/share" | ||
- name: Upload PDF | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: DiffPDF | ||
path: | | ||
${{ env.PAPER }}-diff${{ env.MAIN }}.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build LaTeX document | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build_latex: | ||
runs-on: ubuntu-latest | ||
env: | ||
PAPER: ${{ github.event.repository.name }} | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
root_file: | | ||
${{ env.PAPER }}.tex | ||
working_directory: . | ||
extra_system_packages: "git patch" | ||
latexmk_shell_escape: true | ||
pre_compile: git config --global --add safe.directory /github/workspace | ||
env: | ||
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:" | ||
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common" | ||
BIBINPUTS: ".:$PWD/../latex-styles-master/share" | ||
- name: Upload PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: PDF | ||
path: | | ||
${{ env.PAPER }}.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: latexindent | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'master' | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checking out repository | ||
uses: actions/checkout@v3 | ||
- name: Install latexindent | ||
run: brew install latexindent | ||
- name: Run latexindent | ||
id: run-latexindent | ||
run: | | ||
shopt -s nullglob # allow empty loops below | ||
cd paper | ||
for f in *.tex; do latexindent -l ./localSettings.yaml -m -r -w $f; done | ||
for f in *.bib; do latexindent -l ./localSettings.yaml -m -r -w $f; done | ||
rm *.bak[0-9] | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: ChkTeX | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checking out repository | ||
uses: actions/checkout@v4 | ||
- name: LaTeX linter (chktex) | ||
uses: dpo/chktex-action@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build comment | ||
id: build-comment | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
result-encoding: string | ||
script: | | ||
const fs = require('fs'); | ||
return "Chktex output: \n```\n" + fs.readFileSync("${{ github.workspace }}/chktex_output.txt", "utf8").toString() + "```"; | ||
- name: Comment in PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
message: ${{ steps.build-comment.outputs.result }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: add artifact links to pr | ||
on: | ||
workflow_run: | ||
workflows: ["Build LaTeX document", "Build LaTeX diff document"] | ||
types: [completed] | ||
|
||
jobs: | ||
artifacts-url-comments: | ||
name: add artifact links to pull request and related issues job | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: add artifact links to pull request and related issues step | ||
uses: veitbjarsch/artifacts-url-comments@v1.1.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
prefix: "Here is the compiled" | ||
format: "name" | ||
addTo: "pull" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Code | ||
|
||
Put all the code necessary to reproduce numerical results here. | ||
All results, tables and figures should be generated by running a single script. | ||
Add a `Project.toml` with appropriate versions here so results can be reproduced. |
Oops, something went wrong.