Skip to content
Draft
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
15 changes: 10 additions & 5 deletions .github/scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -eu

case $# in
1) OS="$1"; TOOLSET= ;;
2) OS="$1"; TOOLSET="$2";;
*) echo >&2 "Usage: $0 <os> [toolset]" && exit 1;;
1) OS="$1"; TOOLSET= ;;
2) OS="$1"; TOOLSET="$2" ;;
*) echo >&2 "Usage: $0 <os> [<toolset>]" && exit 1 ;;
esac

case "${OS%%-*}" in
Expand All @@ -21,19 +21,22 @@ case "${OS%%-*}" in
TOOLSET=
;;
'' | lcov)
pkgs="$pkgs libpng-dev pkgconf $TOOLSET"
pkgs="$pkgs libpng-dev pkgconf python3-pil $TOOLSET"
TOOLSET=
;;
esac
sudo apt-get update -qq
# shellcheck disable=SC2086 # (This word splitting is intentional.)
sudo apt-get install -yq $pkgs
case "$TOOLSET" in
mingw32|mingw64) py -3 -m pip install pillow ;;
esac
;;
macos)
# macOS bundles GNU Make 3.81, which doesn't support synced output.
# We leave it as the default in `PATH`, to test that our Makefile works with it.
# However, CMake automatically uses Homebrew's `gmake`, so our CI has synced output.
brew install bison make
brew install bison make pillow
# Export `bison` to allow using the version we install from Homebrew,
# instead of the outdated one preinstalled on macOS (which doesn't even support `-Wall`...).
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
Expand All @@ -47,6 +50,8 @@ case "${OS%%-*}" in
choco install -y winflexbison3 cmake
# The below expects the base name, not the Windows-specific name.
bison() { win_bison "$@"; } # An alias doesn't work, so we use a function instead.
# Python and the Pillow library are dependencies for libbet, a repo built by our external tests.
py -3 -m pip install pillow
;;
*)
echo "Cannot install deps for OS '$1'"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
- name: Install deps
run: |
.github/scripts/install_deps.sh ubuntu-latest lcov
- name: Install test dependency dependencies
run: |
test/fetch-test-deps.sh --get-deps ubuntu
- name: Generate coverage report
run: |
contrib/coverage.bash ubuntu-ci
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ jobs:
continue-on-error: true
run: |
test/fetch-test-deps.sh
- name: Install test dependency dependencies
run: |
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
- name: Run tests using our script
if: matrix.buildsys == 'make'
run: |
Expand Down Expand Up @@ -152,9 +149,6 @@ jobs:
continue-on-error: true
run: |
test/fetch-test-deps.sh
- name: Install test dependency dependencies
run: |
test/fetch-test-deps.sh --get-deps macos
- name: Run tests
run: |
ctest --test-dir build --schedule-random
Expand Down Expand Up @@ -211,9 +205,6 @@ jobs:
continue-on-error: true
run: |
test/fetch-test-deps.sh
- name: Install test dependency dependencies
run: |
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
- name: Run tests using CTest
run: |
ctest --test-dir build --schedule-random -C Debug
Expand Down Expand Up @@ -304,9 +295,6 @@ jobs:
continue-on-error: true
run: |
test/fetch-test-deps.sh
- name: Install test dependency dependencies
run: |
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
- name: Run tests
run: |
test/run-tests.sh --os ${{ matrix.os }}
Expand Down
28 changes: 0 additions & 28 deletions test/fetch-test-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Options:
-h, --help show this help message
--only-free download only freely licensed codebases
--only-internal do not download any codebases
--get-deps install programs' own dependencies instead of themselves
--get-hash print programs' commit hashes instead of downloading them
--get-paths print programs' GitHub paths instead of downloading them
EOF
Expand All @@ -34,11 +33,6 @@ while [[ $# -gt 0 ]]; do
--only-internal)
external=false
;;
--get-deps)
actionname="$1"
shift
osname="$1"
;;
--get-hash|--get-paths)
actionname="$1"
;;
Expand All @@ -54,28 +48,6 @@ while [[ $# -gt 0 ]]; do
done

case "$actionname" in
--get-deps)
action() { # _ _ repo _
# libbet depends on PIL to build
if [ "$3" = "libbet" ]; then
case "${osname%%-*}" in
ubuntu | debian)
sudo apt-get install python3-pil
;;
macos)
python3 -m pip install --break-system-packages pillow
;;
windows)
py -3 -m pip install pillow
;;
*)
echo "WARNING: Cannot install Pillow for OS '$osname'"
;;
esac
fi
}
;;

--get-hash)
action() { # _ _ repo commit
printf "%s@%s-" "$3" "$4"
Expand Down
Loading