diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-09-08 17:30:24 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2022-09-08 17:30:24 +0000 |
commit | a4fe5d9f3c1692d4d36af30947c506d9273fd44f (patch) | |
tree | 6fc3b5be1308f8d1e0776081f0046693f36417f8 | |
parent | 0613ce1164a274df1fc22cc49aacf3cc817e1929 (diff) | |
parent | 922265069d81cedb798f7f583c5f2d3a3996a67e (diff) | |
download | librsvg-a4fe5d9f3c1692d4d36af30947c506d9273fd44f.tar.gz |
Merge branch 'backport-ci-fixes-2.55' into 'librsvg-2.55'
Backport fixes to the CI from the main branch
See merge request GNOME/librsvg!743
-rw-r--r-- | .gitlab-ci.yml | 64 | ||||
-rw-r--r-- | ci/container_builds.yml | 4 | ||||
-rw-r--r-- | ci/install-grcov.sh | 8 | ||||
-rw-r--r-- | ci/install-rust-tools.sh | 11 | ||||
-rwxr-xr-x | ci/install-rust.sh | 16 |
5 files changed, 55 insertions, 48 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 082002eb..ef0a6dc7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,10 +23,8 @@ stages: - check - build - lint - - unit test + - analysis - acceptance test - - cross distro - - release - docs default: @@ -61,13 +59,13 @@ cargo_test: script: - cargo test -- --skip loading_crash --skip reference --skip render_crash -.build-rsvg: +.build-rsvg-no-docs: extends: '.cache' stage: build script: - mkdir -p _build - cd _build - - ../autogen.sh --enable-gtk-doc --enable-vala + - ../autogen.sh --disable-gtk-doc --enable-vala - make - make check artifacts: @@ -77,11 +75,27 @@ cargo_test: - _build/tests/output expire_in: 1 day +.build-rsvg-full: + extends: '.cache' + stage: build + script: + - mkdir -p _build + - cd _build + - ../autogen.sh --enable-gtk-doc --enable-vala + - make + - make check + artifacts: + when: 'always' + paths: + - _build/doc/ + - _build/tests/*.log + expire_in: 1 day + build-rsvg-opensuse@x86_64.stable: extends: - '.container.opensuse@x86_64.stable' - .fdo.distribution-image@opensuse - - .build-rsvg + - .build-rsvg-full # make check runs extra tests that require extra crates, hence cache is pushed - .cache_push needs: @@ -94,7 +108,7 @@ build-rsvg-opensuse@x86_64.minimum: extends: - '.container.opensuse@x86_64.minimum' - .fdo.distribution-image@opensuse - - .build-rsvg + - .build-rsvg-no-docs needs: - job: opensuse-container@x86_64.minimum artifacts: false @@ -105,7 +119,7 @@ build-rsvg-opensuse@x86_64.nightly: extends: - '.container.opensuse@x86_64.nightly' - .fdo.distribution-image@opensuse - - .build-rsvg + - .build-rsvg-no-docs needs: - job: opensuse-container@x86_64.nightly artifacts: false @@ -116,7 +130,7 @@ build-rsvg-opensuse@x86_64.nightly: extends: - .container.opensuse@aarch64 - .fdo.distribution-image@opensuse - - .build-rsvg + - .build-rsvg-no-docs needs: - job: opensuse-container@aarch64 artifacts: false @@ -127,7 +141,7 @@ build-rsvg-fedora@x86_64: extends: - .container.fedora@x86_64 - .fdo.distribution-image@fedora - - .build-rsvg + - .build-rsvg-no-docs needs: - job: fedora-container@x86_64 artifacts: false @@ -143,7 +157,7 @@ build-rsvg-fedora@x86_64: extends: - .container.fedora@aarch64 - .fdo.distribution-image@fedora - - .build-rsvg + - .build-rsvg-no-docs needs: - job: fedora-container@aarch64 artifacts: false @@ -159,7 +173,7 @@ build-rsvg-fedora@x86_64: extends: - '.container.debian@x86_64' - '.fdo.distribution-image@debian' - - '.build-rsvg' + - '.build-rsvg-no-docs' variables: # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907306 # export GDK_PIXBUF_QUERYLOADERS=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders @@ -180,7 +194,7 @@ build-rsvg-fedora@x86_64: extends: - '.container.debian@aarch64' - '.fdo.distribution-image@debian' - - '.build-rsvg' + - '.build-rsvg-no-docs' variables: # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907306 # export GDK_PIXBUF_QUERYLOADERS=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders @@ -263,7 +277,7 @@ coverage: - '.container.opensuse@x86_64.stable' - .fdo.distribution-image@opensuse - .cache - stage: unit test + stage: analysis needs: - job: opensuse-container@x86_64.stable - job: check @@ -284,7 +298,7 @@ coverage: script: - mkdir -p _build - cd _build - - ../autogen.sh --enable-gtk-doc --enable-vala --enable-debug + - ../autogen.sh --disable-gtk-doc --disable-vala --enable-debug - make - make -k check after_script: @@ -313,7 +327,7 @@ cargo_bench: - '.container.opensuse@x86_64.stable' - '.fdo.distribution-image@opensuse' - '.cache' - stage: unit test + stage: analysis needs: - job: check script: | @@ -355,7 +369,7 @@ msys2-mingw64: - if: '$CI_PIPELINE_SOURCE == "schedule"' distcheck: - stage: release + stage: acceptance test extends: - '.container.opensuse@x86_64.stable' - '.fdo.distribution-image@opensuse' @@ -368,7 +382,6 @@ distcheck: LIBRSVG_DEBUG: "no" script: - ./autogen.sh --enable-vala - - make - make distcheck artifacts: when: 'on_success' @@ -377,22 +390,11 @@ distcheck: expire_in: 1 week reference: - extends: - - '.container.opensuse@x86_64.stable' - - '.fdo.distribution-image@opensuse' - - '.cache' stage: docs needs: - - job: opensuse-container@x86_64.stable - artifacts: false - - job: check - artifacts: false + - job: build-rsvg-opensuse@x86_64.stable + artifacts: true script: - - mkdir -p _build - - cd _build - - ../autogen.sh --enable-vala - - make - - cd .. - mkdir -p public/ - mv _build/doc/Rsvg-2.0 public/ artifacts: diff --git a/ci/container_builds.yml b/ci/container_builds.yml index 96425c08..1d7ba0bc 100644 --- a/ci/container_builds.yml +++ b/ci/container_builds.yml @@ -6,7 +6,7 @@ include: variables: # When branching change the suffix to avoid conflicts with images # from the main branch - BASE_TAG: "2022-09-05.0-librsvg-2.55" + BASE_TAG: "2022-09-06.0-librsvg-2.55" RUST_STABLE: "1.60.0" RUST_MINIMUM: "1.58.1" @@ -32,6 +32,8 @@ variables: FDO_DISTRIBUTION_TAG: "x86_64-${RUST_STABLE}-${BASE_TAG}" FDO_DISTRIBUTION_EXEC: >- bash ci/install-rust.sh ${RUST_STABLE} x86_64-unknown-linux-gnu && + bash ci/install-rust-tools.sh && + bash ci/install-grcov.sh && pip3 install gi-docgen sphinx sphinx_rtd_theme .container.opensuse@x86_64.minimum: diff --git a/ci/install-grcov.sh b/ci/install-grcov.sh new file mode 100644 index 00000000..436dc85e --- /dev/null +++ b/ci/install-grcov.sh @@ -0,0 +1,8 @@ +source ./ci/env.sh + +set -eu +export CARGO_HOME='/usr/local/cargo' + +# Coverage tools +cargo install grcov +rustup component add llvm-tools-preview diff --git a/ci/install-rust-tools.sh b/ci/install-rust-tools.sh new file mode 100644 index 00000000..87318b5f --- /dev/null +++ b/ci/install-rust-tools.sh @@ -0,0 +1,11 @@ +source ./ci/env.sh + +set -eu +export CARGO_HOME='/usr/local/cargo' + +rustup component add clippy +rustup component add rustfmt +# cargo install --force cargo-c +cargo install --version ^1.0 gitlab_clippy +# cargo install --force cargo-deny +# cargo install --force cargo-outdated diff --git a/ci/install-rust.sh b/ci/install-rust.sh index 1e1e6817..e0c75798 100755 --- a/ci/install-rust.sh +++ b/ci/install-rust.sh @@ -18,19 +18,3 @@ chmod -R a+w $RUSTUP_HOME $CARGO_HOME rustup --version cargo --version rustc --version - -rustup component add clippy-preview -rustup component add rustfmt -# cargo install --force cargo-c -cargo install --version ^1.0 gitlab_clippy -# cargo install --force cargo-deny -# cargo install --force cargo-outdated - -# Coverage tools -cargo install grcov -rustup component add llvm-tools-preview - -if [ "$RUST_VERSION" = "nightly" ]; then - # Documentation tools - cargo install --force rustdoc-stripper -fi |