The base OS image might include outdated contents, and we don't
want to get spurious failures caused by bugs that have already been
fixed in the respective packages.
This is particularly important on macOS, because 'brew install foo'
will fail if 'foo' is already installed but outdated: upgrading all
packages first ensures we never run into this scenario.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
.gitlab-ci.yml | 4 ++++
ci/cirrus/build.yml | 1 +
2 files changed, 5 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3fa616261e93..3cb6ff5e6b26 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -115,6 +115,7 @@ stages:
-e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g"
-e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g"
-e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g"
+ -e "s|[@]UPGRADE_COMMAND@|$UPGRADE_COMMAND|g"
-e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g"
-e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g"
-e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g"
@@ -423,6 +424,7 @@ x64-freebsd-12-build:
CIRRUS_VM_IMAGE_SELECTOR: image_family
CIRRUS_VM_IMAGE_NAME: freebsd-12-2
UPDATE_COMMAND: pkg update
+ UPGRADE_COMMAND: pkg upgrade -y
INSTALL_COMMAND: pkg install -y
x64-freebsd-13-build:
@@ -433,6 +435,7 @@ x64-freebsd-13-build:
CIRRUS_VM_IMAGE_SELECTOR: image_family
CIRRUS_VM_IMAGE_NAME: freebsd-13-0
UPDATE_COMMAND: pkg update
+ UPGRADE_COMMAND: pkg upgrade -y
INSTALL_COMMAND: pkg install -y
x64-macos-11-build:
@@ -443,6 +446,7 @@ x64-macos-11-build:
CIRRUS_VM_IMAGE_SELECTOR: image
CIRRUS_VM_IMAGE_NAME: big-sur-base
UPDATE_COMMAND: brew update
+ UPGRADE_COMMAND: brew upgrade
INSTALL_COMMAND: brew install
PATH_EXTRA:
/usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin:/usr/local/opt/rpcgen/bin
PKG_CONFIG_PATH:
/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml
index 39c17dc08a43..867d5f297b7e 100644
--- a/ci/cirrus/build.yml
+++ b/ci/cirrus/build.yml
@@ -15,6 +15,7 @@ env:
build_task:
install_script:
- @UPDATE_COMMAND@
+ - @UPGRADE_COMMAND@
- @INSTALL_COMMAND@ @PKGS@
- if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
clone_script:
--
2.32.0