summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Prakash Jana <engineerarun@gmail.com>2021-10-15 11:18:20 +0530
committerArun Prakash Jana <engineerarun@gmail.com>2021-10-15 11:52:10 +0530
commitef406c1e1cb823653870cccfb1210bcbc333d697 (patch)
tree1cc554fe34293dfbd794ddabc58e69ac65bb1b4b
parent6280b34cfd51d7525b11169b524edd9be1111a48 (diff)
Add Circle CIv2.3
-rw-r--r--.circleci/config.yml128
-rw-r--r--.clang-tidy2
2 files changed, 129 insertions, 1 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..acdd170
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,128 @@
+version: 2
+
+jobs:
+ compile:
+ docker:
+ - image: ubuntu:20.04
+ working_directory: ~/bcal
+ environment:
+ CI_FORCE_TEST: 1
+ steps:
+ - run:
+ command: |
+ apt update -qq
+ DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get -y install tzdata
+ apt install -y --no-install-recommends git make libreadline-dev
+ apt install -y --no-install-recommends gcc-7 gcc-8 gcc-9 gcc-10
+ apt install -y --no-install-recommends clang-6.0 clang-7 clang-8 clang-9 clang-10 clang-11 clang-tidy-11
+ - checkout
+ - run:
+ command: |
+ export CFLAGS=-Werror
+ make clean
+ echo
+ echo "########## gcc-7 ##########"
+ CC=gcc-7 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## gcc-8 ##########"
+ CC=gcc-8 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## gcc-9 ##########"
+ CC=gcc-9 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## gcc-10 ##########"
+ CC=gcc-10 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-6 ##########"
+ CC=clang-6.0 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-7 ##########"
+ CC=clang-7 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-8 ##########"
+ CC=clang-8 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-9 ##########"
+ CC=clang-9 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-10 ##########"
+ CC=clang-10 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-11 ##########"
+ CC=clang-11 make strip
+ ls -l bcal
+ make clean
+ echo
+ echo "########## clang-tidy-11 ##########"
+ clang-tidy-11 **/*.h **/*.c -- -Iinc
+
+ package-and-publish:
+ machine: true
+ working_directory: ~/bcal
+ steps:
+ - checkout
+ - run:
+ name: "auto-generate packages"
+ command: |
+ # Create dist directory if it doesn't exist
+ mkdir ./dist
+ # Clean up
+ rm -rf ./dist/*
+ # Pack source
+ git archive -o ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz --format tar.gz --prefix=${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}/ ${CIRCLE_TAG}
+ # Use latest installed python3 from pyenv
+ export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
+ #pip install packagecore
+ #packagecore -c misc/packagecore/packagecore.yaml -o ./dist/ ${CIRCLE_TAG#v}
+ # Move source pack to dist
+ mv ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz ./dist/
+
+ - run:
+ name: "publish to GitHub"
+ command: |
+ go get github.com/tcnksm/ghr
+ ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
+
+workflows:
+ version: 2
+
+ test:
+ jobs: &all-tests
+ - compile
+
+ nightly:
+ triggers:
+ - schedule:
+ cron: "0 0 * * 6"
+ filters:
+ branches:
+ only:
+ - master
+ jobs: *all-tests
+
+ publish-github-release:
+ jobs:
+ - package-and-publish:
+ filters:
+ tags:
+ only: /^v.*/
+ branches:
+ ignore: /.*/
diff --git a/.clang-tidy b/.clang-tidy
index 25efae2..bc78128 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,5 +1,5 @@
---
-Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements,-readability-function-cognitive-complexity,-readability-isolate-declaration,-bugprone-easily-swappable-parameters'
+Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements,-readability-function-cognitive-complexity,-readability-isolate-declaration,-bugprone-easily-swappable-parameters'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*(?<!lookup3.c)$'
FormatStyle: 'file'