Skip to content

Commit 4054285

Browse files
ISSOtmRangi42
authored andcommitted
Install Pillow together with the rest of our CI deps
We shouldn't assume how the user wants to install things. In particular, `--break-system-packages` seems... egregious.
1 parent ac2a022 commit 4054285

File tree

4 files changed

+4
-45
lines changed

4 files changed

+4
-45
lines changed

.github/scripts/install_deps.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ case "${OS%%-*}" in
2121
TOOLSET=
2222
;;
2323
'' | lcov)
24-
pkgs="$pkgs libpng-dev pkgconf $TOOLSET"
24+
pkgs="$pkgs libpng-dev pkgconf python3-pil $TOOLSET"
2525
TOOLSET=
2626
;;
2727
esac
@@ -33,7 +33,7 @@ case "${OS%%-*}" in
3333
# macOS bundles GNU Make 3.81, which doesn't support synced output.
3434
# We leave it as the default in `PATH`, to test that our Makefile works with it.
3535
# However, CMake automatically uses Homebrew's `gmake`, so our CI has synced output.
36-
brew install bison make
36+
brew install bison make pillow
3737
# Export `bison` to allow using the version we install from Homebrew,
3838
# instead of the outdated one preinstalled on macOS (which doesn't even support `-Wall`...).
3939
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
@@ -47,6 +47,8 @@ case "${OS%%-*}" in
4747
choco install -y winflexbison3 cmake
4848
# The below expects the base name, not the Windows-specific name.
4949
bison() { win_bison "$@"; } # An alias doesn't work, so we use a function instead.
50+
# Python and the Pillow library are dependencies for libbet, a repo built by our external tests.
51+
py -3 -m pip install pillow
5052
;;
5153
*)
5254
echo "Cannot install deps for OS '$1'"

.github/workflows/coverage.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ jobs:
1818
- name: Install deps
1919
run: |
2020
.github/scripts/install_deps.sh ubuntu-latest lcov
21-
- name: Install test dependency dependencies
22-
run: |
23-
test/fetch-test-deps.sh --get-deps ubuntu
2421
- name: Generate coverage report
2522
run: |
2623
contrib/coverage.bash ubuntu-ci

.github/workflows/testing.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ jobs:
9494
continue-on-error: true
9595
run: |
9696
test/fetch-test-deps.sh
97-
- name: Install test dependency dependencies
98-
run: |
99-
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
10097
- name: Run tests using our script
10198
if: matrix.buildsys == 'make'
10299
run: |
@@ -152,9 +149,6 @@ jobs:
152149
continue-on-error: true
153150
run: |
154151
test/fetch-test-deps.sh
155-
- name: Install test dependency dependencies
156-
run: |
157-
test/fetch-test-deps.sh --get-deps macos
158152
- name: Run tests
159153
run: |
160154
ctest --test-dir build --schedule-random
@@ -211,9 +205,6 @@ jobs:
211205
continue-on-error: true
212206
run: |
213207
test/fetch-test-deps.sh
214-
- name: Install test dependency dependencies
215-
run: |
216-
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
217208
- name: Run tests using CTest
218209
run: |
219210
ctest --test-dir build --schedule-random -C Debug
@@ -304,9 +295,6 @@ jobs:
304295
continue-on-error: true
305296
run: |
306297
test/fetch-test-deps.sh
307-
- name: Install test dependency dependencies
308-
run: |
309-
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
310298
- name: Run tests
311299
run: |
312300
test/run-tests.sh --os ${{ matrix.os }}

test/fetch-test-deps.sh

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Options:
1010
-h, --help show this help message
1111
--only-free download only freely licensed codebases
1212
--only-internal do not download any codebases
13-
--get-deps install programs' own dependencies instead of themselves
1413
--get-hash print programs' commit hashes instead of downloading them
1514
--get-paths print programs' GitHub paths instead of downloading them
1615
EOF
@@ -34,11 +33,6 @@ while [[ $# -gt 0 ]]; do
3433
--only-internal)
3534
external=false
3635
;;
37-
--get-deps)
38-
actionname="$1"
39-
shift
40-
osname="$1"
41-
;;
4236
--get-hash|--get-paths)
4337
actionname="$1"
4438
;;
@@ -54,28 +48,6 @@ while [[ $# -gt 0 ]]; do
5448
done
5549

5650
case "$actionname" in
57-
--get-deps)
58-
action() { # _ _ repo _
59-
# libbet depends on PIL to build
60-
if [ "$3" = "libbet" ]; then
61-
case "${osname%%-*}" in
62-
ubuntu | debian)
63-
sudo apt-get install python3-pil
64-
;;
65-
macos)
66-
python3 -m pip install --break-system-packages pillow
67-
;;
68-
windows)
69-
py -3 -m pip install pillow
70-
;;
71-
*)
72-
echo "WARNING: Cannot install Pillow for OS '$osname'"
73-
;;
74-
esac
75-
fi
76-
}
77-
;;
78-
7951
--get-hash)
8052
action() { # _ _ repo commit
8153
printf "%s@%s-" "$3" "$4"

0 commit comments

Comments
 (0)