From aff9e6ac4ba8a13e430c2284d540c4c3fc297ebf Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Wed, 10 Aug 2022 23:52:46 +0200 Subject: [PATCH 01/16] try with cache --- .github/workflows/compile.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 9dcb57f..bda3841 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -4,16 +4,25 @@ name: generate showcase branches: - master - main + - 37-speed-up-ci jobs: build: runs-on: ubuntu-latest steps: - name: Checkout git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: lfs: true submodules: true + - name: Caching + id: cache-documentation + uses: actions/cache@v3 + with: + path: | + build + sub_* + key: ${{ runner.os }}-pengu-cache-documentation - name: Setup Python environment for sltx uses: actions/setup-python@v2 with: From ce12f1daf1b4092353292b2da7c796c3abad9445 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 08:36:45 +0200 Subject: [PATCH 02/16] adding sltx to the cache (to have both) --- .github/workflows/compile.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index bda3841..83e66af 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -20,6 +20,7 @@ jobs: uses: actions/cache@v3 with: path: | + /root/.sltx/ build sub_* key: ${{ runner.os }}-pengu-cache-documentation From 6b4d041b695885b82cd438258dcd19199c011adb Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 10:34:57 +0200 Subject: [PATCH 03/16] Update compile.yaml Try using latexmk for documentation (mobile) --- .github/workflows/compile.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 83e66af..bf0e1c9 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -20,7 +20,6 @@ jobs: uses: actions/cache@v3 with: path: | - /root/.sltx/ build sub_* key: ${{ runner.os }}-pengu-cache-documentation @@ -33,9 +32,12 @@ jobs: sudo apt install poppler-utils pip install six sltx echo "tx-default" | sltx docker + - uses: xu-cheng/latex-action@v2 + with: + root_file: documentation.tex - name: 'Compile the documents and generate previews' run: | - sltx compile --root --profile "tx-default" "showcase" "minimal" "documentation" + sltx compile --root --profile "tx-default" "showcase" "minimal" pdftoppm -png -r 300 -f 1 -l 1 ./showcase.pdf preview pdftoppm -png -r 300 -f 1 -l 1 ./minimal.pdf minimal - name: Commit From 613d1a6684843fbb9145e6022085ef0732b02132 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 10:36:45 +0200 Subject: [PATCH 04/16] Update compile.yaml --- .github/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index bf0e1c9..6ad825c 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -34,7 +34,7 @@ jobs: echo "tx-default" | sltx docker - uses: xu-cheng/latex-action@v2 with: - root_file: documentation.tex + root_file: documentation.tex - name: 'Compile the documents and generate previews' run: | sltx compile --root --profile "tx-default" "showcase" "minimal" From 7d71155c0783e794a21c9fd48525b31d3db726db Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 11:32:07 +0200 Subject: [PATCH 05/16] Update compile.yaml Fix documentation location to the build folder --- .github/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 6ad825c..bd27b01 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -44,7 +44,7 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add -f "showcase.pdf" "minimal.pdf" "documentation.pdf" "preview-1.png" "minimal-1.png" + git add -f "showcase.pdf" "minimal.pdf" "build/documentation.pdf" "preview-1.png" "minimal-1.png" git commit -m "Newly compiled data" - name: Push changes uses: ad-m/github-push-action@master From cf4f5d2b0077816765003eac881458f780511c89 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 12:51:46 +0200 Subject: [PATCH 06/16] force update of build artifacts --- .github/workflows/compile.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index bd27b01..be48b7f 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -15,6 +15,7 @@ jobs: with: lfs: true submodules: true +# https://github.com/actions/cache/issues/342 - name: Caching id: cache-documentation uses: actions/cache@v3 @@ -22,7 +23,8 @@ jobs: path: | build sub_* - key: ${{ runner.os }}-pengu-cache-documentation + key: ${{ runner.os }}-pengu-cache-doc-${{ github.run_id }} + restore-keys: ${{ runner.os }}-pengu-cache-doc- - name: Setup Python environment for sltx uses: actions/setup-python@v2 with: From bf362122837383aa90de83f81e3a466b36d26427 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 14:02:38 +0200 Subject: [PATCH 07/16] clean up workflow --- .github/workflows/compile.yaml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index be48b7f..566c189 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -25,28 +25,26 @@ jobs: sub_* key: ${{ runner.os }}-pengu-cache-doc-${{ github.run_id }} restore-keys: ${{ runner.os }}-pengu-cache-doc- - - name: Setup Python environment for sltx - uses: actions/setup-python@v2 + - name: Install PU for previews + run: sudo apt install poppler-utils + - name: Compile the Documentation, the Showcase and the Minimal + uses: xu-cheng/latex-action@v2 with: - python-version: '3.8' - - name: Setup and run sltx-install (and pu) + root_file: | + documentation.tex + showcase.tex + minimal.tex + - name: 'Generate previews' run: | - sudo apt install poppler-utils - pip install six sltx - echo "tx-default" | sltx docker - - uses: xu-cheng/latex-action@v2 - with: - root_file: documentation.tex - - name: 'Compile the documents and generate previews' + pdftoppm -png -r 300 -f 1 -l 1 ./build/showcase.pdf preview + pdftoppm -png -r 300 -f 1 -l 1 ./build/minimal.pdf minimal + - name: 'Move pdfs to their old positions' run: | - sltx compile --root --profile "tx-default" "showcase" "minimal" - pdftoppm -png -r 300 -f 1 -l 1 ./showcase.pdf preview - pdftoppm -png -r 300 -f 1 -l 1 ./minimal.pdf minimal + mv build/*.pdf ./ - name: Commit run: | git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add -f "showcase.pdf" "minimal.pdf" "build/documentation.pdf" "preview-1.png" "minimal-1.png" + git add -f "showcase.pdf" "minimal.pdf" "documentation.pdf" "preview-1.png" "minimal-1.png" git commit -m "Newly compiled data" - name: Push changes uses: ad-m/github-push-action@master From d7684d03ae37551b983c593b337c7d400c964122 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 14:03:54 +0200 Subject: [PATCH 08/16] update names --- .github/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 566c189..09c3e9a 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -27,7 +27,7 @@ jobs: restore-keys: ${{ runner.os }}-pengu-cache-doc- - name: Install PU for previews run: sudo apt install poppler-utils - - name: Compile the Documentation, the Showcase and the Minimal + - name: Compile the Documentation, showcase and minimal uses: xu-cheng/latex-action@v2 with: root_file: | From 009218a47e072c80f355c111050aaa2f15850ae6 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 14:05:55 +0200 Subject: [PATCH 09/16] adding user name again --- .github/workflows/compile.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 09c3e9a..55908ee 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -44,6 +44,7 @@ jobs: - name: Commit run: | git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" git add -f "showcase.pdf" "minimal.pdf" "documentation.pdf" "preview-1.png" "minimal-1.png" git commit -m "Newly compiled data" - name: Push changes From a82a69be2bbcb8b874cf5a568862df0200554d03 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 14:06:06 +0200 Subject: [PATCH 10/16] removing this branch again so that it does not dirty the compile file --- .github/workflows/compile.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 55908ee..68be020 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -4,7 +4,6 @@ name: generate showcase branches: - master - main - - 37-speed-up-ci jobs: build: From e5ffd634f6ce1593312c5c238283a6d795b13ec9 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 14:23:15 +0200 Subject: [PATCH 11/16] run on pull request --- .github/workflows/compile.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 68be020..99adb88 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -4,6 +4,10 @@ name: generate showcase branches: - master - main + pull_request: + types: + - opened + - edited jobs: build: From e9fd029dc30878289dac3275cbcaaa3cc839b62e Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 15:00:14 +0200 Subject: [PATCH 12/16] do not move pdfs (permission denied --- .github/workflows/compile.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 99adb88..ac5c4b4 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -41,14 +41,11 @@ jobs: run: | pdftoppm -png -r 300 -f 1 -l 1 ./build/showcase.pdf preview pdftoppm -png -r 300 -f 1 -l 1 ./build/minimal.pdf minimal - - name: 'Move pdfs to their old positions' - run: | - mv build/*.pdf ./ - name: Commit run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add -f "showcase.pdf" "minimal.pdf" "documentation.pdf" "preview-1.png" "minimal-1.png" + git add -f "build/showcase.pdf" "build/minimal.pdf" "build/documentation.pdf" "preview-1.png" "minimal-1.png" git commit -m "Newly compiled data" - name: Push changes uses: ad-m/github-push-action@master From 94de1719cc8b51bd7d48a7fe7f47411020e33fc2 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 15:00:45 +0200 Subject: [PATCH 13/16] update build pats in readme --- Readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index cf81974..015e2e8 100644 --- a/Readme.md +++ b/Readme.md @@ -1,8 +1,8 @@ # tikzpingus This is work in progress! -See the evolving [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/documentation.pdf). +See the evolving [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/build/documentation.pdf). -[](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/showcase.pdf) +[](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/build/showcase.pdf) -[](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/minimal.pdf) +[](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/build/minimal.pdf) From a3a402afe3bbb41f84c063e0e3860c21c67a6313 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 15:01:55 +0200 Subject: [PATCH 14/16] also run on synchronize of compile workflow --- .github/workflows/compile.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index ac5c4b4..cbf3d9e 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -8,6 +8,7 @@ name: generate showcase types: - opened - edited + - synchronize jobs: build: From 0cd1badb24dd39515bc32829cbc212bfd94ab602 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 15:25:04 +0200 Subject: [PATCH 15/16] separate status check ci --- .github/workflows/compile.yaml | 5 ---- .github/workflows/status_check.yaml | 45 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/status_check.yaml diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index cbf3d9e..fc52b29 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -4,11 +4,6 @@ name: generate showcase branches: - master - main - pull_request: - types: - - opened - - edited - - synchronize jobs: build: diff --git a/.github/workflows/status_check.yaml b/.github/workflows/status_check.yaml new file mode 100644 index 0000000..fc6ea44 --- /dev/null +++ b/.github/workflows/status_check.yaml @@ -0,0 +1,45 @@ +name: status check compile (does not push) +'on': + push: + branches-ignore: + - master + - main + pull_request: + types: + - opened + - edited + - synchronize + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout git repository + uses: actions/checkout@v3 + with: + lfs: true + submodules: true +# https://github.com/actions/cache/issues/342 + - name: Caching + id: cache-documentation + uses: actions/cache@v3 + with: + path: | + build + sub_* + key: ${{ runner.os }}-pengu-cache-doc-${{ github.run_id }} + restore-keys: ${{ runner.os }}-pengu-cache-doc- + - name: Compile the Documentation, showcase and minimal + uses: xu-cheng/latex-action@v2 + with: + root_file: | + documentation.tex + showcase.tex + minimal.tex + - uses: actions/upload-artifact@v3 + with: + name: status-artifact + path: | + build/minimal.pdf + build/showcase.pdf + build/documentation.pdf From fb5bb4e17829cfe3aa3dc44bad28605d45084cd9 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Thu, 11 Aug 2022 15:26:03 +0200 Subject: [PATCH 16/16] update name of the old compile ci --- .github/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index fc52b29..3481f66 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -1,4 +1,4 @@ -name: generate showcase +name: generate the documentation (and the showcases) 'on': push: branches: