diff --git a/.github/scripts/install_deps.sh b/.github/scripts/install_deps.sh index e864e45fa..da984f6a3 100755 --- a/.github/scripts/install_deps.sh +++ b/.github/scripts/install_deps.sh @@ -3,9 +3,9 @@ set -eu case $# in - 1) OS="$1"; TOOLSET= ;; - 2) OS="$1"; TOOLSET="$2";; - *) echo >&2 "Usage: $0 [toolset]" && exit 1;; + 1) OS="$1"; TOOLSET= ;; + 2) OS="$1"; TOOLSET="$2" ;; + *) echo >&2 "Usage: $0 []" && exit 1 ;; esac case "${OS%%-*}" in @@ -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" @@ -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'" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8451017ba..bda28dfcf 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d77425919..08099e234 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -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: | @@ -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 @@ -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 @@ -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 }} diff --git a/test/fetch-test-deps.sh b/test/fetch-test-deps.sh index e27186344..56818bab6 100755 --- a/test/fetch-test-deps.sh +++ b/test/fetch-test-deps.sh @@ -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 @@ -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" ;; @@ -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"