[libhandy/wip/exalm/ci: 1/2] ci: Speed up api-visibility job



commit 7743c25bdcee3d2376f2c09f3868c76132651b5d
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri May 22 16:20:20 2020 +0500

    ci: Speed up api-visibility job
    
    Stop using find, and use default image and empty before_script.

 .gitlab-ci.yml         | 2 +-
 lint/api-visibility.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 932547fe..b1e6363c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,8 +22,8 @@ before_script:
     ninja -C _build
 
 api-visibility:
-  image: debian:buster
   stage: build
+  before_script: []
   script:
     - lint/api-visibility.sh
 
diff --git a/lint/api-visibility.sh b/lint/api-visibility.sh
index 077757a6..ce8e7f58 100755
--- a/lint/api-visibility.sh
+++ b/lint/api-visibility.sh
@@ -1,14 +1,14 @@
 #!/bin/bash
 
 # Check that private headers aren't included in public ones.
-if grep "include.*private.h" $(find src -name '*\.h' -not -regex '.*private.h');
+if grep "include.*private.h" $(ls src/*.h | grep -v "private.h");
 then
   echo "Private headers shouldn't be included in public ones."
   exit 1
 fi
 
 # Check that handy.h contains all the public headers.
-for header in $(find src -name '*.h' -not -regex '.*private.h' -not -regex '.*/handy.h');
+for header in $(ls src | grep "\.h$" | grep -v "private.h" | grep -v handy.h);
 do
   if ! grep -q "$(basename $header)" src/handy.h;
   then


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