diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 6eb16c71..ec26a37f 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -25,6 +25,7 @@ env: SUNDIALS_VERSION: 6.4.1 HDF5_VERSION: 1.12.2 GRAPHVIZ_VERSION: 7.0.4 + MIKTEX_VERSION: 23.5 jobs: build: @@ -189,12 +190,24 @@ jobs: - name: Install Sphinx run: pip install -U sphinx sphinx-rtd-theme breathe + - name: Cache MiKTeX + id: cache-miktex + uses: actions/cache@v3 + with: + path: "C:\Program Files\MiKTeX" + key: ${{runner.os}}-MiKTeXCache-${{env.MIKTEX_VERSION}} + - name: Install MiKTeX + if: steps.cache-miktex.outputs.cache-hit != 'true' shell: pwsh run: | - choco install miktex - echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - refreshenv + choco install miktex.install --version ${{env.MIKTEX_VERSION}} -y + C:\Program Files\MiKTeX\miktex\bin\x64\latex --version + latex --version + echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + latex --version + Add-Content $env:GITHUB_PATH "C:\Program Files\MiKTeX\miktex\bin\x64" + latex --version initexmf --admin --verbose --set-config-value=[MPM]AutoInstall=1 miktex --admin --verbose packages update-package-database miktex --admin --verbose packages update @@ -203,6 +216,10 @@ jobs: initexmf --admin --verbose --update-fndb initexmf --admin --verbose --mklinks --force updmap --admin + + - name: Add MiKTeX to PATH + shell: pwsh + run: Add-Content $env:GITHUB_PATH "C:\Program Files\MiKTeX\miktex\bin\x64" - name: Build Docs working-directory: ${{github.workspace}}