diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-04-13 10:20:31 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-04-13 10:39:38 +0530 |
commit | 5675e73dd3aedbfc757c15a45eb8caa1aeb9acb5 (patch) | |
tree | 6f907f48f0557b73929d79f72af0180678f14609 /.circleci/config.yml | |
parent | c2a0a2ddce8a8c111150db258aec33aabb18c679 (diff) | |
download | nnn-5675e73dd3aedbfc757c15a45eb8caa1aeb9acb5.tar.gz |
Add CircleCI default build
Diffstat (limited to '.circleci/config.yml')
-rw-r--r-- | .circleci/config.yml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..6b8e372 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,66 @@ +version: 2 + +jobs: + gcc: + docker: + - image: ubuntu:18.04 + working_directory: ~/nnn + environment: + CC: gcc + CI_FORCE_TEST: 1 + steps: + - run: + command: | + apt update -qq + apt install -y --no-install-recommends git gcc make pkg-config libncursesw5-dev libreadline-dev + - checkout + - run: + command: | + export CFLAGS=-Werror + make clean + make strip + ls -l nnn + make clean + + package-and-publish: + machine: true + working_directory: ~/nnn + steps: + - run: + name: "package with packagecore" + command: | + # Use latest installed python3 from pyenv + export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)" + pip install packagecore + packagecore -o ./dist/ ${CIRCLE_TAG#v} + - 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 + - gcc + + nightly: + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - master + jobs: *all-tests + + publish-github-release: + jobs: + - package-and-publish: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ |