summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2023-05-12 18:06:36 +0000
committerSimon McVittie <smcv@collabora.com>2023-05-12 18:06:36 +0000
commita841b8ec8f43691c07313de6d1f27f6cbd82b1ca (patch)
treeee5445c5d2998eed19c0dccb5ee74fb520582530
parent35ade3c8f7aca16d1c6289828a2597859d1c503b (diff)
parenta3a14ea09eb3ade08cd6b4c6af57afd8b1c0b8bb (diff)
downloaddbus-a841b8ec8f43691c07313de6d1f27f6cbd82b1ca.tar.gz
Merge branch 'wip/smcv/fix-ci' into 'master'
Fix CI See merge request dbus/dbus!405
-rw-r--r--.gitlab-ci.yml23
-rwxr-xr-xtools/ci-build.sh4
-rwxr-xr-xtools/ci-install.sh13
-rw-r--r--tools/docker/windows/Dockerfile4
4 files changed, 30 insertions, 14 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f20b0ee5..a5dd5782 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,9 +20,14 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+workflow:
+ rules:
+ - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
+ - if: $CI_PIPELINE_SOURCE == 'push' && $CI_PROJECT_NAMESPACE == 'dbus'
+
include:
- project: 'freedesktop/ci-templates'
- ref: e9a461877f8c7f9fed9fff5491067ec3c3472559
+ ref: fb33e1b244ec2a0b8edf8ee5590a96369c3b4666
file:
- '/templates/debian.yml'
- '/templates/freebsd.yml'
@@ -40,8 +45,6 @@ variables:
ci_local_packages: "yes"
ci_parallel: "2"
ci_sudo: "yes"
- # Temporarily needed to clean up after dbus/dbus#447
- GIT_STRATEGY: clone
###
# IMPORTANT
@@ -49,7 +52,7 @@ variables:
# If you are hacking on them or need a them to rebuild, its enough
# to change any part of the string of the image you want.
###
- WINDOWS_TAG: "2022-02-06.2"
+ WINDOWS_TAG: "2023-05-12.0"
UPSTREAM_BRANCH: 'master'
UPSTREAM_REPO: 'dbus/dbus'
@@ -68,7 +71,7 @@ variables:
.opensuse-vars:
variables:
FDO_DISTRIBUTION_VERSION: 'leap'
- FDO_DISTRIBUTION_TAG: '2022-05-14.0' # Bump this version on every ci-install.sh change
+ FDO_DISTRIBUTION_TAG: '2023-05-12.0' # Bump this version on every ci-install.sh change
.freebsd-vars:
variables:
@@ -116,7 +119,7 @@ windows amd64 image:
tags:
- windows
- shell
- - "1809"
+ - "2022"
script:
# We need to pass an array and to resolve the env vars, so we can't use a variable:
- $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$UPSTREAM_BRANCH")
@@ -127,6 +130,8 @@ windows amd64 image:
echo "Failed to build the image"
Exit 1
}
+ # This is extremely slow, and is getting in the way of having CI at all
+ when: manual
.unix-host-build:
stage: build
@@ -305,6 +310,8 @@ opensuse mingw64 cmake debug:
ci_host: "x86_64-w64-mingw32"
ci_local_packages: "no"
ci_variant: "debug"
+ # Currently broken, https://gitlab.freedesktop.org/dbus/dbus/-/issues/455
+ when: manual
opensuse mingw64 meson debug:
extends:
@@ -337,7 +344,7 @@ ubuntu jammy autotools:
tags:
- 'docker'
- 'windows'
- - '1809'
+ - '2022'
needs:
- "windows amd64 image"
timeout: '2h'
@@ -346,6 +353,8 @@ ubuntu jammy autotools:
- $WarningPreference = "Stop"
- $env:DBUS_TEST_MALLOC_FAILURES = 0
- $env:PATH += ";C:\bin"
+ # These are extremely slow, and are getting in the way of having CI at all
+ when: manual
windows msys64 ucrt64 cmake:
extends: .win-build
diff --git a/tools/ci-build.sh b/tools/ci-build.sh
index df22b8ba..4115a593 100755
--- a/tools/ci-build.sh
+++ b/tools/ci-build.sh
@@ -558,6 +558,10 @@ case "$ci_buildsys" in
$meson_setup "$@" "$srcdir"
meson compile -v
+
+ # This is too slow and verbose to keep enabled at the moment
+ export DBUS_TEST_MALLOC_FAILURES=0
+
[ "$ci_test" = no ] || meson test --print-errorlogs
DESTDIR=DESTDIR meson install
( cd DESTDIR && find . -ls)
diff --git a/tools/ci-install.sh b/tools/ci-install.sh
index eabb75ec..2afcd789 100755
--- a/tools/ci-install.sh
+++ b/tools/ci-install.sh
@@ -261,11 +261,12 @@ case "$ci_distro" in
)
packages=(
"${packages[@]}"
+ mingw${bits}-cross-cmake
mingw${bits}-cross-gcc-c++
+ mingw${bits}-cross-meson
mingw${bits}-cross-pkgconf
- mingw${bits}-libexpat-devel
mingw${bits}-glib2-devel
- mingw${bits}-cross-meson
+ mingw${bits}-libexpat-devel
)
;;
@@ -273,9 +274,9 @@ case "$ci_distro" in
packages=(
"${packages[@]}"
gcc-c++
- libexpat-devel
glib2-devel
libX11-devel
+ libexpat-devel
systemd-devel
)
;;
@@ -285,8 +286,10 @@ case "$ci_distro" in
if [ "$ci_in_docker" = yes ]; then
# Add the user that we will use to do the build inside the
# Docker container, and let them use sudo
- useradd -m user
- passwd -ud user
+ if ! getent passwd user >/dev/null; then
+ useradd -m user
+ passwd -ud user
+ fi
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopasswd
chmod 0440 /etc/sudoers.d/nopasswd
fi
diff --git a/tools/docker/windows/Dockerfile b/tools/docker/windows/Dockerfile
index bff4c501..53be741b 100644
--- a/tools/docker/windows/Dockerfile
+++ b/tools/docker/windows/Dockerfile
@@ -1,6 +1,6 @@
# escape=`
-FROM 'mcr.microsoft.com/windows/servercore:ltsc2019'
+FROM 'mcr.microsoft.com/windows/servercore:ltsc2022'
# Make sure any failure in PowerShell scripts is fatal
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
@@ -24,7 +24,7 @@ RUN pip3 install meson
# See also: https://bugs.python.org/issue36011
RUN pip3 install --upgrade certifi
RUN pip3 install python-certifi-win32
-RUN (New-Object System.Net.WebClient).DownloadString('https://sourceforge.net') >$null
+RUN (New-Object System.Net.WebClient).DownloadString('https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.gz.sig') >$null
RUN (New-Object System.Net.WebClient).DownloadString('https://wrapdb.mesonbuild.com/v2/pcre_8.37-2/get_patch') >$null
RUN (New-Object System.Net.WebClient).DownloadString('https://zlib.net/fossils/') >$null