renames workflow #7
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
name: Build Dissertation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
os: [ubuntu-latest] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create environment with Mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Miniforge # mamba is faster than base conda | |
miniforge-version: latest | |
channels: conda-forge, bioconda | |
auto-activate-base: false | |
activate-environment: 2025-dotson-thesis | |
environment-file: environment.yml | |
use-mamba: true | |
use-only-tar-bz2: true | |
- run: | | |
conda config --env --set pip_interop_enabled True | |
# Set up caching to speed up subsequent runs | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.texlive | |
~/.miktex | |
/usr/local/texlive | |
${{ runner.temp }}/latex_cache | |
key: ${{ runner.os }}-latex-${{ hashFiles('**/Snakefile') }} | |
restore-keys: | | |
${{ runner.os }}-latex- | |
# Install LaTeX on each OS | |
- name: Install LaTeX | |
run: | | |
if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then | |
sudo apt-get update | |
sudo apt-get install -y texlive-full biber | |
elif [[ ${{ matrix.os }} == 'macos-latest' ]]; then | |
brew install --cask mactex-no-gui | |
sudo tlmgr update --self && sudo tlmgr install biber | |
elif [[ ${{ matrix.os }} == 'windows-latest' ]]; then | |
choco install miktex -y | |
miktexsetup finish | |
initexmf --update-fndb | |
initexmf --mklinks | |
initexmf --mklangs | |
fi | |
# Execute the Snakemake workflow | |
- name: Run Snakemake workflow | |
run: | | |
cd analysis && snakemake -j2 | |
# Upload the generated PDF as an artifact | |
- name: Upload PDF artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: thesis-pdf | |
path: docs/thesis.pdf |