2019-04-13 04:50:31 +00:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
gcc:
|
|
|
|
docker:
|
|
|
|
- image: ubuntu:18.04
|
|
|
|
working_directory: ~/nnn
|
|
|
|
environment:
|
|
|
|
CI_FORCE_TEST: 1
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
apt update -qq
|
2019-04-13 05:56:19 +00:00
|
|
|
apt install -y --no-install-recommends software-properties-common
|
|
|
|
apt-add-repository -y ppa:jonathonf/gcc-9.0
|
2019-04-13 05:13:38 +00:00
|
|
|
apt update -qq
|
2019-04-13 05:56:19 +00:00
|
|
|
apt install -y --no-install-recommends git gcc gcc-8 gcc-9 make pkg-config libncursesw5-dev libreadline-dev
|
2019-04-13 05:13:38 +00:00
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
export CFLAGS=-Werror
|
|
|
|
make clean
|
2019-04-13 05:56:19 +00:00
|
|
|
CC=gcc make strip
|
2019-04-13 05:13:38 +00:00
|
|
|
ls -l nnn
|
|
|
|
make clean
|
2019-04-13 05:56:19 +00:00
|
|
|
CC=gcc-8 make strip
|
|
|
|
ls -l nnn
|
2019-04-13 05:18:45 +00:00
|
|
|
make clean
|
2019-04-13 05:56:19 +00:00
|
|
|
CC=gcc-9 make strip
|
2019-04-13 05:18:45 +00:00
|
|
|
ls -l nnn
|
|
|
|
make clean
|
|
|
|
|
2019-04-13 04:50:31 +00:00
|
|
|
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: /.*/
|