Skip to content

Commit

Permalink
windows ci (#1)
Browse files Browse the repository at this point in the history
* windows ci
  • Loading branch information
rreece authored Jan 14, 2024
1 parent a47a4d1 commit 853f19a
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 19 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,27 @@ jobs:
- name: Run make pdf
run: make pdf

build_windows:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Update PATH
run: Add-Content $env:GITHUB_PATH "C:\\texlive\\2024\\bin\\windows"

- name: Run make install_for_windows
run: make install_for_windows

- name: Run make html
run: make html

- name: Run make pdf
run: make pdf

77 changes: 58 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ install_for_ubuntu:
if [ ! -f /usr/bin/pdflatex ]; then \
echo "Installing texlive..." ; \
sudo apt-get -y install texlive-latex-extra ; \
fi ; \
echo "which pdflatex: `which pdflatex`" ; \
fi ;
@echo "which pdflatex: `which pdflatex`" ; \
if [ ! -f /usr/bin/pandoc ]; then \
echo "Installing pandoc..." ; \
wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-1-amd64.deb ; \
sudo dpkg -i pandoc-2.13-1-amd64.deb ; \
fi ; \
echo "which pandoc: `which pandoc`" ; \
fi ;
@echo "which pandoc: `which pandoc`" ; \
pandoc --version ; \
if [ ! -f /usr/local/bin/pandoc-crossref ]; then \
echo "Installing pandoc-crossref..." ; \
Expand All @@ -182,11 +182,13 @@ install_for_ubuntu:
sudo chmod a+x /usr/local/bin/pandoc-crossref ; \
sudo mkdir -p /usr/local/man/man1 ; \
sudo mv pandoc-crossref.1 /usr/local/man/man1 ; \
fi ; \
echo "which pandoc-crossref: `which pandoc-crossref`" ; \
echo "Installing other dependencies..." ; \
pip install --upgrade pip ; \
pip install -r requirements.txt ;
fi ;
@echo "which pandoc-crossref: `which pandoc-crossref`" ; \
if [ ! -f requirements.txt ]; then \
echo "pip installing other dependencies..." ; \
pip install --upgrade pip ; \
pip install -r requirements.txt ; \
fi ;
$(PRINT) "make $@ done."

install_for_mac:
Expand All @@ -202,25 +204,62 @@ install_for_mac:
if [ ! -f /usr/local/bin/pdflatex ]; then \
echo "Installing texlive..." ; \
brew install texlive ; \
fi ; \
echo "which pdflatex: `which pdflatex`" ; \
fi ;
@echo "which pdflatex: `which pdflatex`" ; \
if [ ! -f /usr/local/bin/pandoc ]; then \
wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-macOS.pkg ; \
echo "Installing pandoc..." ; \
wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-macOS.pkg ; \
sudo installer -pkg pandoc-2.13-macOS.pkg -target / ; \
fi ; \
echo "which pandoc: `which pandoc`" ; \
fi ;
@echo "which pandoc: `which pandoc`" ; \
pandoc --version ; \
if [ ! -f /usr/local/bin/pandoc-crossref ]; then \
echo "Installing pandoc-crossref..." ; \
wget -c https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.10.0a/pandoc-crossref-macOS.tar.xz ; \
tar -xf pandoc-crossref-macOS.tar.xz ; \
sudo mv pandoc-crossref /usr/local/bin/ ; \
sudo chmod a+x /usr/local/bin/pandoc-crossref ; \
fi ; \
echo "which pandoc-crossref: `which pandoc-crossref`" ; \
echo "Installing other dependencies..." ; \
pip install --upgrade pip ; \
pip install -r requirements.txt ;
fi ;
@echo "which pandoc-crossref: `which pandoc-crossref`" ; \
if [ ! -f requirements.txt ]; then \
echo "pip installing other dependencies..." ; \
pip install --upgrade pip ; \
pip install -r requirements.txt ; \
fi ;
$(PRINT) "make $@ done."

install_for_windows:
@echo "Installing for windows..." ; \
choco install wget ; \
if [ ! -f /c/texlive/2024/bin/windows/pdflatex.exe ]; then \
echo "Installing texlive..." ; \
choco install texlive --params="/collections:latexrecommended,fontsrecommended,plaingeneric /extraPackages:xpatch" ; \
fi ;
@echo "which latex: `which latex`" ;
@echo "which pdftex: `which pdftex`" ;
@echo "which pdflatex: `which pdflatex`" ; \
if [ ! -f /c/texlive/2024/bin/windows/pandoc.exe ]; then \
echo "Installing pandoc..." ; \
wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-windows-x86_64.zip ; \
unzip pandoc-2.13-windows-x86_64.zip ; \
ls ; \
mv pandoc-2.13/pandoc.exe /c/texlive/2024/bin/windows/ ; \
fi ;
@echo "which pandoc: `which pandoc`" ; \
pandoc --version ; \
if [ ! -f /c/texlive/2024/bin/windows/pandoc-crossref.exe ]; then \
echo "Installing pandoc-crossref..." ; \
wget -c https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.10.0a/pandoc-crossref-Windows.7z ; \
7z x pandoc-crossref-Windows.7z ; \
ls ; \
mv pandoc-crossref.exe /c/texlive/2024/bin/windows/ ; \
fi ;
@echo "which pandoc-crossref: `which pandoc-crossref`" ; \
if [ ! -f requirements.txt ]; then \
echo "pip installing other dependencies..." ; \
pip install --upgrade pip ; \
pip install -r requirements.txt ; \
fi ;
$(PRINT) "make $@ done."


0 comments on commit 853f19a

Please sign in to comment.