summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorlijia <[email protected]>2021-06-07 15:10:20 +0800
committerlijia <[email protected]>2021-06-07 15:10:20 +0800
commit8a2fcb5b049d1090b59d7be2b38f33ec57957abc (patch)
treeb5b0321125c25b0c47436ae168126a3eadf5891b /.gitlab-ci.yml
parentb3e59d07f21f12059cd40ea574e412bb349ec366 (diff)
增加CI.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml56
1 files changed, 56 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..4184703
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,56 @@
+image: "git.mesalab.cn:7443/mesa_platform/build-env:master"
+variables:
+ GIT_STRATEGY: "clone"
+ BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
+ INSTALL_PREFIX: "/home/mesasoft/"
+ SYMBOL_TARGET: benchmark_pcap
+
+stages:
+- build
+
+.build_by_travis:
+ before_script:
+ - mkdir -p $BUILD_PADDING_PREFIX/$CI_PROJECT_NAMESPACE/
+ - ln -s $CI_PROJECT_DIR $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH
+ - cd $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH
+ - chmod +x ./ci/travis.sh
+ script:
+ - yum makecache
+ tags:
+ - share
+
+
+develop_build_release:
+ stage: build
+ extends: .build_by_travis
+ variables:
+ BUILD_TYPE: RelWithDebInfo
+ PACKAGE: 1
+ UPLOAD: 1
+ PULP3_REPO_NAME: platform-testing-x86_64.el7
+ PULP3_DIST_NAME: platform-testing-x86_64.el7
+ artifacts:
+ name: "benchmark_pcap-$CI_COMMIT_REF_NAME-release"
+ paths:
+ - build/*.rpm
+ only:
+ - /^dev*.*$/i
+ - /^rel*.*$/i
+ - /^master.*$/i
+
+
+release_build_release:
+ stage: build
+ variables:
+ BUILD_TYPE: RelWithDebInfo
+ PACKAGE: 1
+ UPLOAD: 1
+ PULP3_REPO_NAME: platform-stable-x86_64.el7
+ PULP3_DIST_NAME: platform-stable-x86_64.el7
+ extends: .build_by_travis
+ artifacts:
+ name: "benchmark_pcap-$CI_COMMIT_REF_NAME-release"
+ paths:
+ - build/*.rpm
+ only:
+ - tags \ No newline at end of file