[retro-gtk] ci: Move the API visibility checks to a script
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] ci: Move the API visibility checks to a script
- Date: Sat, 10 Apr 2021 07:26:43 +0000 (UTC)
commit 244b591a702d0d47b1ddf79431a70e15ec76b779
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Apr 8 23:52:42 2021 +0200
ci: Move the API visibility checks to a script
This makes the CI simpler and make it closer to libmanette.
.gitlab-ci.yml | 22 ++++------------------
tools/check-api-visibility.sh | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 18 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3837fdb..08cae6b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,27 +1,13 @@
stages:
- - lint
+ - pre
- build
- test
- publish
-api-visibility:
- stage: lint
+lint:
+ stage: pre
script:
- # Check that private headers aren't included in public ones.
- - if grep "include.*private.h" $(ls retro-gtk/*.h shared/*.h | grep -v private);
- then
- echo "Private headers shouldn't be included in public ones.";
- exit 1;
- fi
- # Check that retro-gtk.h contains all the public headers.
- - for header in $(ls retro-gtk shared | grep \.h$ | grep -v private | grep -v retro-gtk.h);
- do
- if ! grep -q "$header" retro-gtk/retro-gtk.h;
- then
- echo "The public header" $header "should be included in retro-gtk.h.";
- exit 1;
- fi;
- done
+ - tools/check-api-visibility.sh
variables:
BUNDLE: "retro-demo-samples-test-git.flatpak"
diff --git a/tools/check-api-visibility.sh b/tools/check-api-visibility.sh
new file mode 100755
index 0000000..a3b96c1
--- /dev/null
+++ b/tools/check-api-visibility.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Check that private headers aren't included in public ones.
+if grep "include.*private.h" $(ls retro-gtk/*.h shared/*.h | grep -v private);
+then
+ echo "Private headers shouldn't be included in public ones.";
+ exit 1
+fi
+
+# Check that retro-gtk.h contains all the public headers.
+for header in $(ls retro-gtk shared | grep \.h$ | grep -v private | grep -v retro-gtk.h);
+do
+ if ! grep -q "$(basename $header)" retro-gtk/retro-gtk.h;
+ then
+ echo "The public header" $(basename $header) "should be included in retro-gtk.h."
+ exit 1
+ fi
+done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]