[gnome-commander/gitlab_cicd] Add initial .gitlab-ci.yml
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/gitlab_cicd] Add initial .gitlab-ci.yml
- Date: Sat, 29 Jan 2022 21:27:08 +0000 (UTC)
commit df3496dc0462d529af0d135a639ec6b573203e55
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat Jan 29 18:54:13 2022 +0100
Add initial .gitlab-ci.yml
.gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..c3139b1b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,48 @@
+image: ubuntu:21.10
+
+variables:
+ GCMD_PATH: "/gnome-commander"
+
+stages: # List of stages for jobs, and their order of execution
+ - build
+ - test
+ - deploy
+
+build-job: # This job runs in the build stage, which runs first.
+ stage: build
+ script:
+ - apt-get update -qq && env DEBIAN_FRONTEND=noninteractive apt-get install make autoconf-archive flex
yelp-tools libunique-dev -y
+ - echo "Compiling the code..."
+ - ./autogen.sh
+ - make
+ - echo "Compile complete."
+
+unit-test-job: # This job runs in the test stage.
+ stage: test # It only starts when the job in the build stage completes successfully.
+ script:
+ - env DEBIAN_FRONTEND=noninteractive apt-get install cmake libgtest-dev autoconf-archive -y
+ - cd /usr/src/gtest
+ - cmake .
+ - make -j4
+ - ln -s /usr/src/gtest/libgtest.a /usr/lib/libgtest.a
+ - ln -s /usr/src/gtest/libgtest_main.a /usr/lib/libgtest_main.a
+ - cp -r . $GCMD_PATH
+ - cd $GCMD_PATH
+ - echo "Run unit tests..."
+ - make check
+ - echo "Unit tests finished."
+
+#lint-test-job: # This job also runs in the test stage.
+# stage: test # It can run at the same time as unit-test-job (in parallel).
+# script:
+# - echo "Linting code... This will take about 10 seconds."
+# - sleep 10
+# - echo "No lint issues found."
+
+deploy-job: # This job runs in the deploy stage.
+ stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
+ script:
+ - apt-get update -qq && env DEBIAN_FRONTEND=noninteractive apt-get install cmake libgtest-dev
autoconf-archive make flex yelp-tools libunique-dev -y
+ - echo "Test deploying application..."
+ - make distcheck
+ - echo "Application could be deployed."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]