From 9723c5595c05b2d3606a3b8201bcc4eb1b032d22 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 16 Aug 2023 11:57:47 +0000 Subject: [PATCH] ci: Use `meson compile` rather than bare `ninja` This makes it more consistent with `meson setup` in the rest of the file. --- .gitlab-ci.yml | 29 ++++++++++++++--------------- .gitlab-ci/test-msvc.bat | 2 +- .gitlab-ci/test-msys2.sh | 7 +++---- CONTRIBUTING.md | 2 +- docs/reference/glib/building.xml | 6 +++--- 5 files changed, 22 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d9e212f0..bd10823a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -118,7 +118,7 @@ fedora-x86_64: -Dinstalled_tests=true -Dgtk_doc=true _build - - ninja -C _build + - meson compile -C _build - mkdir -p _coverage - lcov --config-file .lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov" - .gitlab-ci/run-tests.sh @@ -163,7 +163,7 @@ debian-stable-x86_64: -Dsystemtap=true -Ddtrace=true _build - - ninja -C _build + - meson compile -C _build - .gitlab-ci/run-tests.sh artifacts: reports: @@ -194,8 +194,8 @@ installed-tests: -Ddefault_library=both -Ddtrace=false _build - - ninja -C _build - - sudo ninja -C _build install + - meson compile -C _build + - sudo meson install -C _build # Remove old headers, possibly present in current installation - sudo rm -f /usr/include/glib-2.0/glib/gurifuncs.h - sudo chown -R `id -un`:`id -gn` _build/ @@ -231,7 +231,7 @@ G_DISABLE_ASSERT: -Dinstalled_tests=true -Dglib_assert=false _build - - ninja -C _build + - meson compile -C _build - bash -x ./.gitlab-ci/run-tests.sh artifacts: reports: @@ -262,7 +262,7 @@ valgrind: -Ddtrace=true -Dinstalled_tests=true _build - - ninja -C _build + - meson compile -C _build # Valgrind doesn’t work when the soft FD limit is set too high # See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2710 - ulimit -Sn 1024 @@ -299,7 +299,7 @@ cross-android_arm64: script: # FIXME: add --werror - meson setup ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build - - ninja -C _build + - meson compile -C _build cross-mingw64: extends: @@ -311,7 +311,7 @@ cross-mingw64: script: # FIXME: Add --werror - meson setup ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build - - ninja -C _build + - meson compile -C _build artifacts: reports: junit: @@ -475,7 +475,7 @@ freebsd-12-x86_64: # FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404 # localstatedir is needed for access to /var/lib/dbus/machine-id - meson setup ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build - - ninja -C _build + - meson compile -C _build - bash -x ./.gitlab-ci/run-tests.sh artifacts: reports: @@ -504,7 +504,7 @@ freebsd-13-x86_64: - bash .gitlab-ci/show-execution-environment.sh script: - meson setup ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build - - ninja -C _build + - meson compile -C _build - bash -x ./.gitlab-ci/run-tests.sh artifacts: reports: @@ -561,7 +561,7 @@ macos-x86_64: --wrap-mode=default --werror _build - - ninja -C _build + - meson compile -C _build - .gitlab-ci/run-tests.sh artifacts: reports: @@ -645,7 +645,7 @@ scan-build: -Ddtrace=true -Dinstalled_tests=true _coverity_build - - $HOME/cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C _coverity_build + - $HOME/cov-analysis-linux64-*/bin/cov-build --dir cov-int meson compile -C _coverity_build - tar cfz cov-int.tar.gz cov-int - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL @@ -680,9 +680,8 @@ dist-job: - for m in $(git submodule foreach -q 'echo $path'); do git config --global --add safe.directory "${PWD}/${m}"; done - meson subprojects download - meson setup ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build - - cd _build - - ninja dist - - ninja glib-doc gobject-doc gio-doc + - meson dist -C _build + - ninja -C _build glib-doc gobject-doc gio-doc - tar -c -J -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html - tar -c -J -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html - tar -c -J -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index a0d76d5dd..aee77d33d 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -15,7 +15,7 @@ set args=%args:~1% pip3 install --upgrade --user meson==1.0.0 || goto :error meson setup %args% _build || goto :error python .gitlab-ci/check-missing-install-tag.py _build || goto :error -ninja -C _build || goto :error +meson compile -C _build || goto :error meson test -v -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% || goto :error meson test -v -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --setup=unstable_tests --suite=failing --suite=flaky diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index f03e3d5c2..aaeff165e 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -41,8 +41,7 @@ else meson setup ${MESON_COMMON_OPTIONS} --werror _build fi -cd _build -ninja +meson compile -C _build if [[ "$CFLAGS" == *"-coverage"* ]]; then lcov \ @@ -54,8 +53,8 @@ if [[ "$CFLAGS" == *"-coverage"* ]]; then --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov" fi -meson test -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" -meson test -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ +meson test -C _build -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" +meson test -C _build -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ --setup=unstable_tests --suite=failing --suite=flaky || true if [[ "$CFLAGS" == *"-coverage"* ]]; then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45a6b9ffc..0466c178c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -144,7 +144,7 @@ configure your build using Meson: ```sh $ meson setup _builddir . -$ ninja -C _builddir +$ meson compile -C _builddir ``` Typically, you should work on your own branch: diff --git a/docs/reference/glib/building.xml b/docs/reference/glib/building.xml index b42125f51..edfdfbea3 100644 --- a/docs/reference/glib/building.xml +++ b/docs/reference/glib/building.xml @@ -23,14 +23,14 @@ meson setup _build - ninja -C _build - ninja -C _build install + meson compile -C _build + meson install -C _build On FreeBSD: env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,--disable-new-dtags" meson setup -Dxattr=false -Dinstalled_tests=true -Db_lundef=false _build - ninja -C _build + meson compile -C _build