From b1cf3ce4370ddf602f6e692d3ac9bf9513c04fbf Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Mon, 14 Oct 2024 13:57:45 +0200 Subject: [PATCH] Fix CI: Create a Python venv (#371) --- .github/workflows/compile.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index a63a899c..1386dec3 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -2,7 +2,7 @@ name: compilepaper on: [push, pull_request] jobs: paper: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: DIR: . steps: @@ -19,7 +19,10 @@ jobs: texlive-fonts-recommended texlive-fonts-extra lmodern fonts-linuxlibertine \ python3 python3-yaml \ xz-utils make sed gpg-agent + python3 -m venv ${{ env.DIR }}/venv && source ${{ env.DIR }}/venv/bin/activate python3 -m pip install -r ${{ env.DIR }}/requirements.txt + # Workaround for https://github.com/tomduck/pandoc-xnos/pull/29 + python3 -m pip install --force-reinstall git+https://github.com/tomduck/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos - name: Fetch bibliography run : | # resolve relative paths in forked projects @@ -28,7 +31,7 @@ jobs: git config --local submodule.recurse true - name: pandoc compile working-directory: ${{ env.DIR }} - run: make all + run: source ${{ env.DIR }}/venv/bin/activate && make all - name: move run: mkdir -p github_artifacts && mv ${{ env.DIR }}/*.pdf ./github_artifacts/ - name: Upload pdf as artifact