Skip to content

Fix for HPC

Fix for HPC #58

Workflow file for this run

on:
push:
branches:
- main
jobs:
prebuild:
name: Prepare for building
runs-on: ubuntu-latest
if: github.event.head_commit.author.email != 'github-actions[bot]@users.noreply.github.com'
outputs:
change_acn: ${{ steps.filter.outputs.change_acn }}
change_psem: ${{ steps.filter.outputs.change_psem }}
change_hpc: ${{ steps.filter.outputs.change_hpc }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
change_acn:
- '3rd Year/Analisi e Calcolo Numerico/notes/**'
change_psem:
- '3rd Year/Programmazione di Sistemi Embedded e Multicore/notes/**'
change_hpc:
- 'Extra/HPC/**'
build_acn:
name: Build Analisi e Calcolo Numerico
runs-on: ubuntu-latest
needs: prebuild
if: ${{ needs.prebuild.outputs.change_acn == 'true' }}
permissions:
contents: write
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- name: Install Tectonic
run: |
sudo apt install curl
curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net | sh
- name: Compile the template
run: |
./tectonic "3rd Year/Analisi e Calcolo Numerico/notes/main.tex" -Z continue-on-errors --color=always
- name: Commit PDF
run: |
mv "3rd Year/Analisi e Calcolo Numerico/notes/main.pdf" "3rd Year/Analisi e Calcolo Numerico/notes/Analisi e Calcolo Numerico.pdf"
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git pull --recurse-submodules
git add "3rd Year/Analisi e Calcolo Numerico/notes/Analisi e Calcolo Numerico.pdf"
git commit -m 'Add compiled ACN notes'
- name: Push PDF
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: "main"
build_psem:
name: Build Programmazione di Sistemi Embedded e Multicore
runs-on: ubuntu-latest
needs: prebuild
if: ${{ needs.prebuild.outputs.change_psem == 'true' }}
permissions:
contents: write
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- name: Install Tectonic
run: |
sudo apt install curl
curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net | sh
- name: Compile the template
run: |
./tectonic "3rd Year/Programmazione di Sistemi Embedded e Multicore/notes/main.tex" -Z continue-on-errors --color=always
- name: Commit PDF
run: |
mv "3rd Year/Programmazione di Sistemi Embedded e Multicore/notes/main.pdf" "3rd Year/Programmazione di Sistemi Embedded e Multicore/notes/Programmazione di Sistemi Embedded e Multicore.pdf"
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git pull --recurse-submodules
git add "3rd Year/Programmazione di Sistemi Embedded e Multicore/notes/Programmazione di Sistemi Embedded e Multicore.pdf"
git commit -m 'Add compiled PSEM notes'
- name: Push PDF
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: "main"
build_hpc:
name: Build High Performance Computing
runs-on: ubuntu-latest
needs: prebuild
if: ${{ needs.prebuild.outputs.change_hpc == 'true' }}
permissions:
contents: write
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- name: Install Tectonic
run: |
sudo apt install curl
curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net | sh
- name: Compile the template
run: |
./tectonic "Extra/HPC/main.tex" -Z continue-on-errors --color=always
- name: Commit PDF
run: |
mv "Extra/HPC/main.pdf" "Extra/HPC/High Performance Computing.pdf"
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git pull --recurse-submodules
git add "Extra/HPC/High Performance Computing.pdf"
git commit -m 'Add compiled HPC notes'
- name: Push PDF
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PUSH_TOKEN }}
branch: "main"