image: $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA variables: BUILDAH_FORMAT: docker BUILDAH_ISOLATION: chroot MESON_OPTIONS: > -Dlibdrm_drivers=intel,nouveau,amdgpu -Doverlay=enabled -Dchamelium=enabled -Dvalgrind=enabled -Dman=enabled -Dtests=enabled -Drunner=enabled -Dlibunwind=enabled LANG: "C.UTF-8" stages: - build-containers - build - test - containers - deploy ################# BUILD CONTAINERS ####################### build-containers:build-debian: stage: build-containers image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 script: - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-minimal build-debian-minimal - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian build-debian build-containers:build-debian-armhf: stage: build-containers image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 script: - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-armhf build-debian-armhf build-containers:build-debian-arm64: stage: build-containers image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 script: - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-arm64 build-debian-arm64 build-containers:build-debian-mips: stage: build-containers image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 script: - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-mips build-debian-mips build-containers:build-fedora: stage: build-containers image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 script: - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-fedora build-fedora #################### BUILD ######################### build:tests-fedora: stage: build script: - meson --prefix=/opt/igt $MESON_OPTIONS build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 - DESTDIR="$PWD/installdir" ninja -C build install - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc artifacts: paths: - build - installdir build:tests-fedora-no-libunwind: stage: build script: - dnf remove -y libunwind-devel - meson -Dlibunwind=disabled build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 # documentation building is different with meson<0.47 build:tests-fedora-oldest-meson: stage: build script: - dnf remove -y meson - pip install /usr/src/meson-*.tar.gz - meson $MESON_OPTIONS build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc # ensure igt_nouveau stubs build when nouveau support for libdrm is disabled build:tests-fedora-no-libdrm-nouveau: stage: build script: - meson -Dlibdrm_drivers= build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 build:tests-fedora-clang: stage: build variables: CC: clang script: - meson $MESON_OPTIONS build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 artifacts: paths: - build build:tests-debian-meson: image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian:commit-$CI_COMMIT_SHA stage: build script: - meson $MESON_OPTIONS build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 - cp build/tests/test-list.txt meson-test-list.txt artifacts: paths: - meson-test-list.txt build:tests-debian-minimal: image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA stage: build script: - meson -Dtests=disabled -Dlibdrm_drivers="" build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 artifacts: paths: - build build:tests-debian-meson-armhf: image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-armhf:commit-$CI_COMMIT_SHA stage: build script: - export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/ - meson --cross-file meson-cross-armhf.txt build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 artifacts: paths: - build build:tests-debian-meson-arm64: image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-arm64:commit-$CI_COMMIT_SHA stage: build script: - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ - meson --cross-file meson-cross-arm64.txt build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 artifacts: paths: - build build:tests-debian-meson-mips: image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-mips:commit-$CI_COMMIT_SHA stage: build script: - export PKG_CONFIG_PATH=/usr/lib/mips-linux-gnu/pkgconfig/ - meson --cross-file meson-cross-mips.txt build - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 artifacts: paths: - build #################### TEST ########################## test:ninja-test: retry: 2 dependencies: - build:tests-fedora stage: test script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4} test:ninja-test-clang: retry: 2 dependencies: - build:tests-fedora-clang variables: CC: clang stage: test script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4} test:ninja-test-minimal: retry: 2 image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA dependencies: - build:tests-debian-minimal stage: test script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4} # arm testing temporarily disabled until converted to run on native arm HW # test:ninja-test-arm64: # retry: 2 # image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-arm64:commit-$CI_COMMIT_SHA # dependencies: # - build:tests-debian-meson-arm64 # stage: test # script: # - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ # - env > build/envdump.txt # - meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4} # artifacts: # paths: # - build # when: on_failure # # test:ninja-test-armhf: # retry: 2 # image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-armhf:commit-$CI_COMMIT_SHA # dependencies: # - build:tests-debian-meson-armhf # stage: test # script: # - export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/ # - env > build/envdump.txt # - meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4} # artifacts: # paths: # - build # when: on_failure # mips testing temporarily disabled # test:ninja-test-mips: # retry: 2 # image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-mips:commit-$CI_COMMIT_SHA # dependencies: # - build:tests-debian-meson-mips # stage: test # script: # - export PKG_CONFIG_PATH=/usr/lib/mips-linux-gnu/pkgconfig/ # - env > build/envdump.txt # - meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4} # artifacts: # paths: # - build # when: on_failure test:list-undocumented-tests: dependencies: - build:tests-fedora stage: test script: .gitlab-ci/list_undocumented_tests.py build/tests/test-list.txt > undocumented_tests.txt artifacts: paths: - undocumented_tests.txt test:verify-blacklists: dependencies: - build:tests-fedora stage: test script: for bl in tests/intel-ci/blacklist{,-pre-merge}.txt; do scripts/verify-blacklist.sh build/runner/igt_runner build/tests "$bl" || exit 1; done ################### DEPLOY ######################### pages: when: manual dependencies: - build:tests-fedora stage: deploy script: - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc - cp -r build/docs/reference/igt-gpu-tools/html public artifacts: paths: - public only: - master ############## CONTAINERS #################### containers:igt: stage: containers image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 dependencies: - build:tests-fedora variables: FORCE_REBUILD: 1 script: - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - .gitlab-ci/pull-or-rebuild.sh igt Dockerfile igt