c576d8bfbb
On the GitLab side we're invoking the Cirrus CI job using the cirrus-run tool which speaks to the Cirrus REST API. Cirrus sometimes tasks 5-10 minutes to actually schedule the task, and thus the execution time of 'cirrus-run' inside GitLab will be slightly longer than the execution time of the Cirrus CI task. Setting the timeout in the GitLab CI job should thus be done in relation to the timeout set for the Cirrus CI job. While Cirrus CI defaults to 60 minutes, it is better to set this explicitly, and make the relationship between the jobs explicit Signed-off-by: "Daniel P. Berrangé" <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230912184130.3056054-4-berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230914155422.426639-7-alex.bennee@linaro.org>
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
@CIRRUS_VM_INSTANCE_TYPE@:
|
|
@CIRRUS_VM_IMAGE_SELECTOR@: @CIRRUS_VM_IMAGE_NAME@
|
|
cpu: @CIRRUS_VM_CPUS@
|
|
memory: @CIRRUS_VM_RAM@
|
|
|
|
env:
|
|
CIRRUS_CLONE_DEPTH: 1
|
|
CI_REPOSITORY_URL: "@CI_REPOSITORY_URL@"
|
|
CI_COMMIT_REF_NAME: "@CI_COMMIT_REF_NAME@"
|
|
CI_COMMIT_SHA: "@CI_COMMIT_SHA@"
|
|
PATH: "@PATH@"
|
|
PKG_CONFIG_PATH: "@PKG_CONFIG_PATH@"
|
|
PYTHON: "@PYTHON@"
|
|
MAKE: "@MAKE@"
|
|
CONFIGURE_ARGS: "@CONFIGURE_ARGS@"
|
|
TEST_TARGETS: "@TEST_TARGETS@"
|
|
|
|
build_task:
|
|
# A little shorter than GitLab timeout in ../cirrus.yml
|
|
timeout_in: 60m
|
|
install_script:
|
|
- @UPDATE_COMMAND@
|
|
- @INSTALL_COMMAND@ @PKGS@
|
|
- if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
|
|
clone_script:
|
|
- git clone --depth 100 "$CI_REPOSITORY_URL" .
|
|
- git fetch origin "$CI_COMMIT_REF_NAME"
|
|
- git reset --hard "$CI_COMMIT_SHA"
|
|
build_script:
|
|
- mkdir build
|
|
- cd build
|
|
- ../configure --enable-werror $CONFIGURE_ARGS
|
|
|| { cat config.log meson-logs/meson-log.txt; exit 1; }
|
|
- $MAKE -j$(sysctl -n hw.ncpu)
|
|
- for TARGET in $TEST_TARGETS ;
|
|
do
|
|
$MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1 ;
|
|
done
|
|
always:
|
|
build_result_artifacts:
|
|
path: build/meson-logs/*log.txt
|
|
type: text/plain
|