aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-09-07 09:22:01 -0700
committerAndersBroman <a.broman58@gmail.com>2020-09-07 19:35:45 +0000
commit322f6f3988d3707114f2856dac8108e30eacaa81 (patch)
treeef0048321e20ff1f03b9bad13f6dcb7be73bc28e
parent5a874c5796d487054a3f562379731720931340d3 (diff)
GitLab CI: Restrict the Windows build to wireshark/wireshark.
The Windows runners are constrained by the following: * We require quite a bit of software not present in the stanadard runner[1] which takes a long time to install, including Python, Perl, and Qt. * You can't specify an arbitrary Docker image like you can with Linux runners. As a result we have a project-specific runner for wireshark/wireshark that runs a custom Windows Docker image. Update the CI rules so that merge-request:windows only runs for gitlab.com/wireshark/wireshark. The GitLab documentation recommends rules over only/except, so switch to them. Fixup .editorconfig while we're here. [1]https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/blob/master/cookbooks/preinstalled-software/README.md
-rw-r--r--.editorconfig2
-rw-r--r--.gitlab-ci.yml20
2 files changed, 10 insertions, 12 deletions
diff --git a/.editorconfig b/.editorconfig
index 0394fbb1bc..78d03d0157 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -40,7 +40,7 @@ indent_style = space
indent_size = 2
# YAML
-[*.{yml}]
+[*.yml]
indent_style = space
indent_size = 2
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9694cf0141..fa65347f88 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,8 +8,6 @@
# The custom Ubuntu image pre-installs dependencies and compilers to speed up the build:
# https://hub.docker.com/r/wireshark/wireshark-ubuntu-dev
# https://github.com/wireshark/wireshark-ubuntu-dev-docker
-# XXX - We might be able to speed things up using ccache:
-# https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
.build-ubuntu: &build-ubuntu
<<: *build
image: wireshark/wireshark-ubuntu-dev
@@ -153,13 +151,12 @@ merge-request:ubuntu-dpkg:
<<: *build-ubuntu
tags:
- docker
- only:
- - merge_requests
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- apt-get install -y lintian
# build-ubuntu puts us in `build`.
- cd ..
- # From the Buildbot Petri Dish. We might want to spread these across different builders.
- bash ./tools/pre-commit 'HEAD^1'
- sh -c '[ ! -e tools/validate-commit.py ] || tools/validate-commit.py'
- DH_QUIET=1 CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ dpkg-buildpackage -us -uc -rfakeroot -jauto -Zgzip -zfast
@@ -169,8 +166,8 @@ merge-request:ubuntu-gcc-ctest:
<<: *build-ubuntu
tags:
- docker
- only:
- - merge_requests
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
# build-ubuntu puts us in `build`.
- perl ../tools/make-version.pl --set-release || ../perl make-version.pl --set-release
@@ -184,8 +181,8 @@ merge-request:ubuntu-clang-other-tests:
extends: clang-10
tags:
- docker
- only:
- - merge_requests
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- apt-get install -y cppcheck clang-tools
# build-ubuntu puts us in `build`.
@@ -208,8 +205,9 @@ merge-request:windows:
tags:
- wireshark-windows-dev
stage: build
- only:
- - merge_requests
+ rules:
+ # The Windows Docker image is currently only available via a dedicated runner.
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_URL == "https://gitlab.com/wireshark/wireshark"'
before_script:
# XXX Find a better location.
- mkdir c:\Development