|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- version: 2
-
- jobs:
- compile:
- docker:
- - image: ubuntu:18.04
- working_directory: ~/nnn
- environment:
- CI_FORCE_TEST: 1
- steps:
- - run:
- command: |
- apt update -qq
- apt install -y --no-install-recommends software-properties-common wget gpg-agent shellcheck
- apt-add-repository -y ppa:jonathonf/gcc-9.1
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
- apt-add-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main"
- apt update -qq
- apt install -y --no-install-recommends git gcc gcc-8 gcc-9 clang clang-8 clang-tidy-8 make pkg-config libncursesw5-dev libreadline-dev
- - checkout
- - run:
- command: |
- export CFLAGS=-Werror
- make clean
- echo
- echo "########## gcc ##########"
- CC=gcc make strip
- ls -l nnn
- make clean
- echo
- echo "########## gcc-8 ##########"
- CC=gcc-8 make strip
- ls -l nnn
- make clean
- echo
- echo "########## gcc-9 ##########"
- CC=gcc-9 make strip
- ls -l nnn
- make clean
- echo
- echo "########## clang ##########"
- CC=clang make strip
- ls -l nnn
- make clean
- echo
- echo "########## clang-8 ##########"
- CC=clang-8 make strip
- ls -l nnn
- make clean
- echo
- echo "########## clang-tidy-8 ##########"
- clang-tidy-8 src/* -- -I/usr/include -I/usr/include/ncursesw
- echo "########## checllcheck ##########"
- find plugins/ -type f -not -name "*.md" -exec shellcheck -e SC1090 {} +
-
- package-and-publish:
- machine: true
- working_directory: ~/nnn
- steps:
- - checkout
- - run:
- name: "package with packagecore"
- command: |
- # Clean up
- rm -rf ./.git
- rm -rf ./dist/*
- # Pack source
- cd ..
- tar -czf ${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz ${CIRCLE_PROJECT_REPONAME}
- cd ${CIRCLE_PROJECT_REPONAME}
- # 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: /.*/
|