Import some lcitool improvements to avoid packages that are not available through homebrew on MacOS, as well as some other tweaks:
- Bare libtorrent does not exist; libtorrent-rasterbar is available but fails to compile due to broken pkg-config --cflags - tcl is spelled tcl-tk - python3-boto3, sfdisk, and python3-libnbd are missing - Bare perl is sufficient for building the perl bindings, without needing a non-existent perl5-devel. - Homebrew warns that compiling against e2fsprogs intentionally requires a modification to PKG_CONFIG_PATH. With this, it's time to revert the allow-failure portion of commit 6b4178d0. Depends on https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/360 --- ci/cirrus/macos-12.vars | 4 ++-- ci/gitlab.yml | 7 +++++++ ci/gitlab/build-templates.yml | 31 ++++++++++++++++++++++++++++++- ci/gitlab/builds.yml | 3 +-- ci/manifest.yml | 3 +-- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/ci/cirrus/macos-12.vars b/ci/cirrus/macos-12.vars index db838166..8c06197b 100644 --- a/ci/cirrus/macos-12.vars +++ b/ci/cirrus/macos-12.vars @@ -11,6 +11,6 @@ MAKE='/opt/homebrew/bin/gmake' NINJA='/opt/homebrew/bin/ninja' PACKAGING_COMMAND='brew' PIP3='/opt/homebrew/bin/pip3' -PKGS='autoconf automake bash bash-completion ccache cpanminus curl e2fsprogs expect flake8 git gnutls golang gzip jq libssh libtool libtorrent-rasterbar libvirt lua make ocaml perl perl5-devel pkg-config python3 python3-boto3 python3-libnbd qemu rust sfdisk socat tcl xorriso xz zlib zstd' -PYPI_PKGS='' +PKGS='autoconf automake bash bash-completion ccache cpanminus curl e2fsprogs expect flake8 git gnutls golang gzip jq libssh libtool libvirt lua make ocaml perl pkg-config python3 qemu rust socat tcl-tk xorriso xz zlib zstd' +PYPI_PKGS='boto3' PYTHON='/opt/homebrew/bin/python3' diff --git a/ci/gitlab.yml b/ci/gitlab.yml index 68ffe725..643b6bf8 100644 --- a/ci/gitlab.yml +++ b/ci/gitlab.yml @@ -14,6 +14,12 @@ # created/updated. Setting this variable to a non-empty # value allows CI testing prior to opening a merge request. # +# - RUN_PIPELINE_UPSTREAM_ENV - same semantics as RUN_PIPELINE, +# but uses the CI environment (containers) from the upstream project +# rather than creating and updating a throwaway environment +# Should not be used if the pushed branch includes CI container +# changes. +# # - RUN_CONTAINER_BUILDS - CI pipelines in upstream only # publish containers if CI file changes are detected. # Setting this variable to a non-empty value will force @@ -44,6 +50,7 @@ variables: RUN_UPSTREAM_NAMESPACE: nbdkit + FF_SCRIPT_SECTIONS: 1 workflow: diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml index 0de34b7d..1bdec227 100644 --- a/ci/gitlab/build-templates.yml +++ b/ci/gitlab/build-templates.yml @@ -37,6 +37,13 @@ - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' when: on_success + # forks: pushes to a branch when a pipeline run in upstream env is explicitly requested + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success + # upstream: other web/api/scheduled pipelines targeting the default branch - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' when: manual @@ -75,6 +82,11 @@ - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' when: on_success + # forks: avoid build in local env when job requests run in upstream containers + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: never + + # forks: pushes to branches with pipeline requested - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' when: manual allow_failure: true @@ -151,6 +163,13 @@ - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' when: on_success + # forks: pushes to a branch when a pipeline run in upstream env is explicitly requested + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success + # upstream: other web/api/scheduled pipelines targeting the default branch - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' when: manual @@ -189,6 +208,11 @@ - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' when: on_success + # forks: avoid build in local env when job requests run in upstream containers + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: never + + # forks: pushes to branches with pipeline requested - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' when: manual allow_failure: true @@ -272,12 +296,17 @@ - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push"' when: on_success - # forks: pushes to branches with pipeline requested + # forks: pushes to branches with pipeline requested (including pipeline in upstream environment) - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' when: manual allow_failure: true - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' when: on_success + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success # upstream+forks: Run pipelines on MR, web, api & scheduled - if: '$CI_PIPELINE_SOURCE =~ /(web|api|schedule|merge_request_event)/ && $JOB_OPTIONAL' diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 1e1ae91d..745fba68 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -405,7 +405,6 @@ aarch64-macos-12: INSTALL_COMMAND: brew install NAME: macos-12 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 - PERL: skip - 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 + 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:/opt/homebrew/opt/e2fsprogs/lib/pkgconfig UPDATE_COMMAND: brew update UPGRADE_COMMAND: brew upgrade diff --git a/ci/manifest.yml b/ci/manifest.yml index 961917bd..2aaf4490 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -98,7 +98,6 @@ targets: allow-failure: true variables: 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 - PERL: skip + 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:/opt/homebrew/opt/e2fsprogs/lib/pkgconfig ubuntu-2004: x86_64 -- 2.39.2 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs