Skip to content

Commit

Permalink
Update circleci to 2.1. (#366)
Browse files Browse the repository at this point in the history
* Update circleci convenience images.

* Update circleci to 2.1

* Upgraded permissions

* One more sudo

* Elevate permissions to install texlive

* Elevate permissions for adding packages.

* Trying to get resource usage down. Put everything in a single job in an attempt to only downloaded and set up LaTeX once.

* Clean between each build.

* Clean up. Disable cache for now as it does not seem to be benefitting the unit test.
  • Loading branch information
BrianCriswell authored Dec 17, 2024
1 parent 443eabe commit 6d8c149
Showing 1 changed file with 53 additions and 47 deletions.
100 changes: 53 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,68 @@
---
version: 2
# CircleCI configuration file
version: 2.1

_job: &job
docker:
- image: debian:bullseye
steps:
- checkout
- run:
name: Install system dependencies
command: apt update -y && apt install -y libfontconfig1 make perl-doc wget
- restore_cache:
key: v1-{{ checksum "packages.txt" }}
- run:
name: Install minimal TeXLive
command: ./bin/install-texlive
- run:
name: Install package dependencies
command: ./bin/install-packages packages.txt
- save_cache:
key: v1-{{ checksum "packages.txt" }}
paths:
- ~/.texlive
- /srv/texlive
- run:
name: Add TeXLive to PATH
command: echo 'export PATH="/srv/texlive/bin/x86_64-linux:${PATH}"' >>$BASH_ENV
- run:
name: Compile document
command: make
commands:
clean_and_build:
description: "Clean and build example document."
parameters:
engine:
description: "Which engine to use for compilation."
default: "pdflatex"
type: string
steps:
- run:
name: clean build
command: make clean
- run:
name: build with << parameters.engine >>
command: make
environment:
LATEX: << parameters.engine >>

jobs:
lint:
docker:
- image: circleci/node:latest
- image: cimg/node:current
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run: make lint
pdflatex:
<<: *job
environment:
LATEX: pdflatex
lualatex:
<<: *job
environment:
LATEX: lualatex
xelatex:
<<: *job
environment:
LATEX: xelatex
check_build:
docker:
- image: cimg/base:current
description: "Set up LaTeX environment and build document against pdfLaTeX, luaLaTeX, and XeTeX."
steps:
- checkout
- run:
name: Install system dependencies
command: sudo apt update -y && sudo apt install -y libfontconfig1 make perl-doc wget
# - restore_cache:
# key: v2-{{ checksum "packages.txt" }}
- run:
name: Install minimal TeXLive
command: sudo ./bin/install-texlive
- run:
name: Install package dependencies
command: sudo ./bin/install-packages packages.txt
# - save_cache:
# key: v2-{{ checksum "packages.txt" }}
# paths:
# - ~/.texlive
# - /srv/texlive
- run:
name: Add TeXLive to PATH
command: echo 'export PATH="/srv/texlive/bin/x86_64-linux:${PATH}"' >>$BASH_ENV
- clean_and_build:
engine: pdflatex
- clean_and_build:
engine: lualatex
- clean_and_build:
engine: xelatex

workflows:
version: 2
build:
check_pr:
jobs:
- lint
- pdflatex
- lualatex
- xelatex
- check_build

0 comments on commit 6d8c149

Please sign in to comment.