Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
pull_request:

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container: registry.gitlab.com/islandoftex/images/texlive:TL2024-2025-01-05-medium@sha256:3c51378a5396fefbeb722c347450660e9a9b5539ffbfcf5da13df7c6a22cb0e3

steps:
- uses: actions/checkout@v4

- name: Run a one-line script
shell: bash
run: . ./ci.sh

- uses: actions/upload-artifact@v4.5.0
with:
path: course-notes.pdf
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ course-notes.pdf
incrementAges.png
linked_list_sum_recursive.png
language.md
search_tree.png
16 changes: 16 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pushd ..

git clone https://github.com/btj/jlearner
export JLEARNERPATH=`pwd`/jlearner

curl --remote-name https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
texlua install-getnonfreefonts
export PATH=/usr/local/texlive/2024/bin/x86_64-linux:$PATH
getnonfreefonts --sys luximono

apt-get update
apt-get install -y pandoc

popd

. ./make-pdf.sh
2 changes: 1 addition & 1 deletion make-pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pandoc -o course-notes.html -f gfm \
multi_object_doc_instr.md \
iterators.md \
generics.md
pandoc --wrap=none -V documentclass=book --toc --template=latex.template --listings -o course-notes.tex course-notes.html
pandoc --wrap=none -V documentclass=book -V papersize:a4 --toc --template=latex.template --listings -o course-notes.tex course-notes.html
if [ `uname -s` = Darwin ]; then
SED_IN_PLACE=(-i '')
else
Expand Down
Loading