nnn/.circleci/config.yml

123 lines
3.8 KiB
YAML
Raw Normal View History

2019-04-13 04:50:31 +00:00
version: 2
jobs:
2019-04-13 07:49:31 +00:00
compile:
2019-04-13 04:50:31 +00:00
docker:
2023-08-07 00:41:55 +00:00
- image: ubuntu:22.04
2019-04-13 04:50:31 +00:00
working_directory: ~/nnn
environment:
CI_FORCE_TEST: 1
2023-08-27 13:28:15 +00:00
parallelism: 4
2019-04-13 04:50:31 +00:00
steps:
- run:
command: |
apt update -qq
2020-11-22 13:40:11 +00:00
DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get -y install tzdata
2019-11-22 06:29:14 +00:00
apt install -y --no-install-recommends software-properties-common wget gpg-agent shellcheck
2020-11-22 13:40:11 +00:00
apt install -y --no-install-recommends git make pkg-config libncurses-dev libreadline-dev
2023-08-07 00:41:55 +00:00
apt install -y --no-install-recommends gcc-9 gcc-10 gcc-11 gcc-12
apt install -y --no-install-recommends clang-11 clang-12 clang-13 clang-14 clang-15 clang-tidy-15
2019-04-13 05:13:38 +00:00
- checkout
- run:
command: |
export CFLAGS=-Werror
make clean
2019-04-13 06:22:19 +00:00
echo
2020-12-17 03:15:41 +00:00
echo "########## gcc-9 ##########"
CC=gcc-9 make strip
2019-04-13 05:18:45 +00:00
ls -l nnn
make clean
2019-04-13 06:22:19 +00:00
echo
2020-12-17 03:15:41 +00:00
echo "########## gcc-10 ##########"
CC=gcc-10 make strip
2019-04-13 06:22:19 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## gcc-11 ##########"
CC=gcc-11 make strip
2020-11-22 13:40:11 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## gcc-12 ##########"
CC=gcc-12 make strip
2020-11-22 13:40:11 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## clang-11 ##########"
CC=clang-11 make strip
2019-04-13 06:22:19 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## clang-12 ##########"
CC=clang-12 make strip
2020-03-16 01:52:33 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## clang-13 ##########"
CC=clang-13 make strip
2020-12-17 03:15:41 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## clang-14 ##########"
CC=clang-14 make strip
2021-04-16 19:52:49 +00:00
ls -l nnn
make clean
echo
2023-08-07 00:41:55 +00:00
echo "########## clang-tidy-15 ##########"
clang-tidy-15 src/* -- -I/usr/include -I/usr/include/ncursesw
2020-11-06 02:32:13 +00:00
echo "########## shellcheck ##########"
find plugins/ -type f ! \( -name "*.md" -o -name "*-mac" \) -exec shellcheck {} +
2019-04-13 05:18:45 +00:00
2019-04-13 04:50:31 +00:00
package-and-publish:
machine: true
working_directory: ~/nnn
steps:
2019-04-13 08:12:11 +00:00
- checkout
2019-04-13 04:50:31 +00:00
- run:
name: "auto-generate packages"
2019-04-13 04:50:31 +00:00
command: |
2021-06-03 16:42:36 +00:00
# Create dist directory if it doesn't exist
mkdir ./dist
2019-05-27 14:49:07 +00:00
# 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}
2019-04-13 04:50:31 +00:00
# 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}
2019-05-27 14:49:07 +00:00
# Move source pack to dist
2021-06-03 16:42:36 +00:00
mv ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz ./dist/
2019-05-27 14:49:07 +00:00
2019-04-13 04:50:31 +00:00
- run:
name: "publish to GitHub"
command: |
2022-07-26 13:47:58 +00:00
go install github.com/tcnksm/ghr@latest
2019-04-13 04:50:31 +00:00
ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
workflows:
version: 2
2023-08-27 12:38:27 +00:00
CircleCI:
2019-04-13 04:50:31 +00:00
jobs: &all-tests
2019-04-13 07:49:31 +00:00
- compile
2019-04-13 04:50:31 +00:00
nightly:
triggers:
- schedule:
2019-04-28 05:08:34 +00:00
cron: "0 0 * * 6"
2019-04-13 04:50:31 +00:00
filters:
branches:
only:
- master
jobs: *all-tests
publish-github-release:
jobs:
- package-and-publish:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/