ci: only build docs if any docs changed
[mesa.git] / .gitlab-ci.yml
index 4a75381fbd2c12f9766aac4cfdf86aeeb1f385d2..ca9a22358c3e07e5558afe421b091388476c3a80 100644 (file)
@@ -35,7 +35,11 @@ pages:
     paths:
     - public
   only:
-  - master
+    refs:
+    - master@mesa/mesa
+    changes:
+    - docs/**/*
+    - .gitlab-ci.yml
 
 # When to automatically run the CI
 .ci-run-policy:
@@ -118,20 +122,27 @@ success:
   extends:
     - .ci-run-policy
   rules:
+    # Run pipeline by default in the main project if any CI pipeline
+    # configuration files were changed, to ensure docker images are up to date
+    - if: '$CI_PROJECT_PATH == "mesa/mesa"'
+      changes:
+      - .gitlab-ci.yml
+      - .gitlab-ci/**/*
+      when: on_success
     # Run pipeline by default if it was triggered by Marge Bot, is for a
-    # merge request, and any files affecting it were changed
-    - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+    # merge request, and any files affecting the pipeline were changed
+    - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
       changes:
         *all_paths
       when: on_success
-    # Run pipeline by default in the main project if any files affecting it were
-    # changed
-    - if: '$CI_PROJECT_PATH == "mesa/mesa"'
+    # Run pipeline by default in the main project if it was not triggered by
+    # Marge Bot, and any files affecting the pipeline were changed
+    - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
       changes:
         *all_paths
       when: on_success
-    # Allow triggering jobs manually for MRs or branches of forked projects if
-    # any files affecting the pipeline were changed
+    # Allow triggering jobs manually in other cases if any files affecting the
+    # pipeline were changed
     - changes:
         *all_paths
       when: manual
@@ -305,7 +316,7 @@ arm64_test:
   extends:
     - .use-arm_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-22-tracie"
+    FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
 
 .use-arm64_test:
   variables:
@@ -558,7 +569,7 @@ meson-clang:
     CC: "ccache clang-9"
     CXX: "ccache clang++-9"
 
-.meson-windows-vs2019:
+meson-windows-vs2019:
   extends:
     - .build-windows
     - .use-windows_build_vs2019
@@ -802,6 +813,11 @@ piglit-quick_shader:
   extends: .test-vk
   script:
     - ./install/fossilize-runner.sh
+  artifacts:
+    when: on_failure
+    name: "mesa_${CI_JOB_NAME}"
+    paths:
+      - results/
 
 llvmpipe-gles2:
   variables:
@@ -987,8 +1003,6 @@ arm64_a630_traces:
     # missing.
     MESA_GLSL_VERSION_OVERRIDE: "460"
     MESA_GL_VERSION_OVERRIDE: "4.6"
-  rules:
-    - when: always
 
 # Along with checking gmem path, check that we don't get obvious nir
 # validation failures (though it's too expensive to have it on for the