Tools: Add an install-test-deps option to macos-setup-brew

This commit is contained in:
Gerald Combs 2023-10-13 13:17:44 -07:00
parent 25f263b5cc
commit 669d47119b
3 changed files with 11 additions and 15 deletions

View File

@ -13,18 +13,8 @@ jobs:
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3.8 python-version: 3.8
- name: Install dmgbuild
run: pip3 install dmgbuild
- name: Install pytest
run: pip install pytest pytest-xdist
- name: Install biplist
run: pip install biplist
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install deps - name: Install deps
run: ./tools/macos-setup-brew.sh --install-optional --install-doc-deps run: ./tools/macos-setup-brew.sh --install-optional --install-doc-deps --install-dmg-deps --install-test-deps
env: env:
HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_AUTO_UPDATE: 1
- name: Mkdir - name: Mkdir

View File

@ -208,7 +208,7 @@ variables:
# Make sure /usr/local/bin is first in order to work around asdf. # Make sure /usr/local/bin is first in order to work around asdf.
- export PATH=/usr/local/bin:$PATH - export PATH=/usr/local/bin:$PATH
- printf "\e[0Ksection_start:%s:brew_section[collapsed=true]\r\e[0KInstalling prerequisites" "$( date +%s)" - printf "\e[0Ksection_start:%s:brew_section[collapsed=true]\r\e[0KInstalling prerequisites" "$( date +%s)"
- ./tools/macos-setup-brew.sh --install-optional - ./tools/macos-setup-brew.sh --install-optional --install-test-deps
- printf "\e[0Ksection_end:%s:brew_section\r\e[0K" "$( date +%s)" - printf "\e[0Ksection_end:%s:brew_section\r\e[0K" "$( date +%s)"
- export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark - export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark
- mkdir -p ccache - mkdir -p ccache

View File

@ -45,6 +45,7 @@ INSTALL_OPTIONAL=0
INSTALL_DOC_DEPS=0 INSTALL_DOC_DEPS=0
INSTALL_DMG_DEPS=0 INSTALL_DMG_DEPS=0
INSTALL_SPARKLE_DEPS=0 INSTALL_SPARKLE_DEPS=0
INSTALL_TEST_DEPS=0
OPTIONS=() OPTIONS=()
for arg; do for arg; do
case $arg in case $arg in
@ -64,11 +65,15 @@ for arg; do
--install-sparkle-deps) --install-sparkle-deps)
INSTALL_SPARKLE_DEPS=1 INSTALL_SPARKLE_DEPS=1
;; ;;
--install-test-deps)
INSTALL_TEST_DEPS=1
;;
--install-all) --install-all)
INSTALL_OPTIONAL=1 INSTALL_OPTIONAL=1
INSTALL_DOC_DEPS=1 INSTALL_DOC_DEPS=1
INSTALL_DMG_DEPS=1 INSTALL_DMG_DEPS=1
INSTALL_SPARKLE_DEPS=1 INSTALL_SPARKLE_DEPS=1
INSTALL_TEST_DEPS=1
;; ;;
*) *)
OPTIONS+=("$arg") OPTIONS+=("$arg")
@ -134,9 +139,6 @@ fi
install_formulae "${ACTUAL_LIST[@]}" install_formulae "${ACTUAL_LIST[@]}"
# Install python modules
pip3 install pytest pytest-xdist
if [ $INSTALL_DMG_DEPS -ne 0 ] ; then if [ $INSTALL_DMG_DEPS -ne 0 ] ; then
pip3 install dmgbuild pip3 install dmgbuild
fi fi
@ -145,6 +147,10 @@ if [ $INSTALL_SPARKLE_DEPS -ne 0 ] ; then
brew cask install sparkle brew cask install sparkle
fi fi
if [ $INSTALL_TEST_DEPS -ne 0 ] ; then
pip3 install pytest pytest-xdist
fi
# Uncomment to add PNG compression utilities used by compress-pngs: # Uncomment to add PNG compression utilities used by compress-pngs:
# brew install advancecomp optipng oxipng pngcrush # brew install advancecomp optipng oxipng pngcrush