Skip to content

Commit 1ca9c63

Browse files
authored
Updated CircleCI config for ImageMagick (#1646)
1 parent 7331800 commit 1ca9c63

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

.circleci/config.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,22 @@ jobs:
2525
- v1.4-courseography-haskell-{{ checksum "courseography.cabal" }}
2626
- v1.4-courseography-haskell-{{ checksum "stack.yaml.lock" }}
2727
- v1.4-courseography-haskell-
28+
- restore_cache:
29+
name: Restore Cached Dependencies (Imagemagick)
30+
keys:
31+
- v1.4-courseography-imagemagick-squashfs-root
2832

2933
- run:
3034
name: Install Package Dependencies
3135
command: |
3236
sudo apt-get update
3337
sudo apt-get install -y graphviz
3438
sudo apt-get install -y texlive-latex-base
35-
sudo wget http://imagemagick.org/archive/binaries/magick
36-
sudo cp magick /usr/local/bin
37-
sudo chmod 777 /usr/local/bin/magick
39+
if [ ! -d squashfs-root ]; then
40+
sudo wget https://imagemagick.org/archive/binaries/magick
41+
sudo chmod u+x ./magick
42+
sudo ./magick --appimage-extract
43+
fi
3844
sudo dpkg --remove --force-remove-reinstreq nodejs
3945
stack update
4046
@@ -45,6 +51,12 @@ jobs:
4551
corepack enable
4652
corepack prepare yarn@stable --activate
4753
54+
- run:
55+
name: Set PATH
56+
command: |
57+
echo 'export PATH=$(pwd)/squashfs-root/usr/bin:"$PATH"' >> "$BASH_ENV"
58+
source "$BASH_ENV"
59+
4860
- run:
4961
name: Resolve/Update Dependencies
5062
command: |
@@ -55,6 +67,19 @@ jobs:
5567
stack build hpc-lcov
5668
yarn install
5769
70+
- save_cache:
71+
name: Cache Dependencies (Haskell)
72+
key: v1.4-courseography-haskell-{{ checksum "courseography.cabal" }}-{{ checksum "stack.yaml.lock" }}
73+
paths:
74+
- "/root/.stack"
75+
- ".stack-work"
76+
77+
- save_cache:
78+
name: Cache Dependencies (Imagemagick)
79+
key: v1.4-courseography-imagemagick-squashfs-root
80+
paths:
81+
- "squashfs-root"
82+
5883
- run:
5984
name: Run Frontend Tests and Generate Coverage
6085
command: |
@@ -70,13 +95,6 @@ jobs:
7095
- coveralls/upload:
7196
coverage_files: coverage/frontend.info coverage/backend.info
7297

73-
- save_cache:
74-
name: Cache Dependencies (Haskell)
75-
key: v1.4-courseography-haskell-{{ checksum "courseography.cabal" }}-{{ checksum "stack.yaml.lock" }}
76-
paths:
77-
- "/root/.stack"
78-
- ".stack-work"
79-
8098
- run:
8199
name: Run lint-staged checks
82100
command: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
- Modified CI config to take advantage of partial dependency caching and exploit parallelism when resolving/updating dependencies
5252
- Migrate graph-related components (FocusBar, FocusTab, GraphDropdown, GraphFallback, Infobox, and Sidebar) from classes to functions
5353
- Added `lint-staged` development dependency and fixed eslint issues
54+
- Updated CircleCI ImageMagick setup to avoid using AppImage executable and to cache download
5455

5556
## [0.7.1] - 2025-06-16
5657

0 commit comments

Comments
 (0)