[gnome-build-meta/jjardon/abi-check: 8/8] Use external repo for ABI checker



commit 80f71ab109af7bcd97cdb86b640c3a866daa8675
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Apr 8 17:36:17 2020 +0100

    Use external repo for ABI checker
    
    This is now at
    https://gitlab.com/freedesktop-sdk/buildstream-abi-checker
    
    It's needed to use a diffent job because
    CI_MERGE_REQUEST_TARGET_BRANCH_NAME is only defined in Merge Requests

 .gitlab-ci.yml                | 55 ++++++++++++++++++++++++++++++++-----------
 .gitmodules                   |  3 +++
 utils/buildstream-abi-checker |  1 +
 3 files changed, 45 insertions(+), 14 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3af7d85..be423c5b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,16 +9,18 @@ variables:
   BST: "bst $BST_STRICT --config build.conf --log-file logs/build.log --colors"
   DOCKER_IMAGE_ID: '80f4a16af18b8641874fe037710dcaad4710ff50'
   FLATPAK_BRANCH: master
-  STABLE_ABI: false
 
   # Docker Images
   DOCKER_REGISTRY: "registry.gitlab.com/freedesktop-sdk/infrastructure/freedesktop-sdk-docker-images"
   DOCKER_AMD64: "${DOCKER_REGISTRY}/bst14/amd64:${DOCKER_IMAGE_ID}"
   DOCKER_AARCH64: "${DOCKER_REGISTRY}/bst14/arm64:${DOCKER_IMAGE_ID}"
 
+  GIT_SUBMODULE_STRATEGY: "recursive"
+
 stages:
 - track
 - build
+- abi_check
 - image
 - prepare_flatpak
 - flatpak
@@ -101,6 +103,27 @@ default:
     - logs
     expire_in: '1 week'
 
+.abi-template:
+  stage: abi_check
+  script:
+  - ${BST} -o arch "${ARCH}" build flatpak/platform-image.bst flatpak/sdk-image.bst
+  - export REFERENCE=$(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD)
+  - ./utils/buildstream-abi-checker/check-abi --suppressions=utils/abidiff-suppressions.ini 
--old="${REFERENCE}" --new=HEAD abi/abi-image.bst
+  cache: &bst-cache
+    key: bst-$FLATPAK_BRANCH
+    paths:
+    - "${XDG_CACHE_HOME}/buildstream/sources/"
+  # Store artifacts so we can inspect build failures
+  artifacts: &logging-artifacts
+    when: always
+    paths:
+    - logs
+    - project.refs
+    expire_in: 1 week
+  rules:
+  - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^gnome-\d-\d\d$/'
+    when: always
+
 .vm-image-template:
   stage: image
   script:
@@ -229,6 +252,23 @@ build-gnome-core-arm:
   <<: *arm
 
 
+abi-check-x86_64:
+  extends: .abi-template
+  <<: *x86_64
+
+abi-check-i386:
+  extends: .abi-template
+  <<: *i686
+
+abi-check-aarch64:
+  extends: .abi-template
+  <<: *aarch64
+
+abi-check-core-arm:
+  extends: .abi-template
+  <<: *arm
+
+
 vm-image-x86_64:
   extends: .vm-image-template
   # run as soon as the x86_64 build job is done, don't wait for other arches
@@ -317,16 +357,3 @@ cve_report:
     - cve-reports
   rules:
   - if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^gnome-\d-\d\d$/
-
-check_abi:
-  <<: *x86_64
-  stage: reports
-  dependencies: [build]
-  script:
-    - if [ $STABLE_ABI != 'false' ]; then \
-        REFERENCE=$(git merge-base origin/$FLATPAK_BRANCH HEAD) \
-        ./utils/buildstream-abi-checker/check-abi ---suppressions=utils/abidiff-suppressions.ini 
-old=$REFERENCE --new=HEAD abi/abi-image.bst
-      fi
-  only:
-    - master
-    - /^gnome-\d-\d\d$/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..04ae20af
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "utils/buildstream-abi-checker"]
+       path = utils/buildstream-abi-checker
+       url = https://gitlab.com/freedesktop-sdk/buildstream-abi-checker.git
diff --git a/utils/buildstream-abi-checker b/utils/buildstream-abi-checker
new file mode 160000
index 00000000..7f4ae33f
--- /dev/null
+++ b/utils/buildstream-abi-checker
@@ -0,0 +1 @@
+Subproject commit 7f4ae33fa66bb90e51fb0f5a532433b54dc7da2a


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]