sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

config.yml (4118B)


      1 version: 2
      2 
      3 jobs:
      4   compile:
      5     docker:
      6       - image: ubuntu:20.04
      7         working_directory: ~/nnn
      8         environment:
      9           CI_FORCE_TEST: 1
     10     steps:
     11       - run:
     12           command: |
     13             apt update -qq
     14             DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get -y install tzdata
     15             apt install -y --no-install-recommends software-properties-common wget gpg-agent shellcheck
     16             apt install -y --no-install-recommends git make pkg-config libncurses-dev libreadline-dev
     17             apt install -y --no-install-recommends gcc-7 gcc-8 gcc-9 gcc-10
     18             apt install -y --no-install-recommends clang-6.0 clang-7 clang-8 clang-9 clang-10 clang-11 clang-tidy-11
     19       - checkout
     20       - run:
     21           command: |
     22             export CFLAGS=-Werror
     23             make clean
     24             echo
     25             echo "########## gcc-7 ##########"
     26             CC=gcc-7 make strip
     27             ls -l nnn
     28             make clean
     29             echo
     30             echo "########## gcc-8 ##########"
     31             CC=gcc-8 make strip
     32             ls -l nnn
     33             make clean
     34             echo
     35             echo "########## gcc-9 ##########"
     36             CC=gcc-9 make strip
     37             ls -l nnn
     38             make clean
     39             echo
     40             echo "########## gcc-10 ##########"
     41             CC=gcc-10 make strip
     42             ls -l nnn
     43             make clean
     44             echo
     45             echo "########## clang-6 ##########"
     46             CC=clang-6.0 make strip
     47             ls -l nnn
     48             make clean
     49             echo
     50             echo "########## clang-7 ##########"
     51             CC=clang-7 make strip
     52             ls -l nnn
     53             make clean
     54             echo
     55             echo "########## clang-8 ##########"
     56             CC=clang-8 make strip
     57             ls -l nnn
     58             make clean
     59             echo
     60             echo "########## clang-9 ##########"
     61             CC=clang-9 make strip
     62             ls -l nnn
     63             make clean
     64             echo
     65             echo "########## clang-10 ##########"
     66             CC=clang-10 make strip
     67             ls -l nnn
     68             make clean
     69             echo
     70             echo "########## clang-11 ##########"
     71             CC=clang-11 make strip
     72             ls -l nnn
     73             make clean
     74             echo
     75             echo "########## clang-tidy-11 ##########"
     76             clang-tidy-11 src/* -- -I/usr/include -I/usr/include/ncursesw
     77             echo "########## shellcheck ##########"
     78             find plugins/ -type f -not -name "*.md" -exec shellcheck -e SC1090,SC2230 {} +
     79 
     80   package-and-publish:
     81     machine: true
     82     working_directory: ~/nnn
     83     steps:
     84       - checkout
     85       - run:
     86           name: "auto-generate packages"
     87           command: |
     88             # Create dist directory if it doesn't exist
     89             mkdir ./dist
     90             # Clean up
     91             rm -rf ./dist/*
     92             # Pack source
     93             git archive -o ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz --format tar.gz --prefix=${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}/ ${CIRCLE_TAG}
     94             # Use latest installed python3 from pyenv
     95             export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
     96             #pip install packagecore
     97             #packagecore -c misc/packagecore/packagecore.yaml -o ./dist/ ${CIRCLE_TAG#v}
     98             # Move source pack to dist
     99             mv ../${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}.tar.gz ./dist/
    100 
    101       - run:
    102           name: "publish to GitHub"
    103           command: |
    104             go get github.com/tcnksm/ghr
    105             ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
    106 
    107 workflows:
    108   version: 2
    109 
    110   test:
    111     jobs: &all-tests
    112       - compile
    113 
    114   nightly:
    115     triggers:
    116       - schedule:
    117           cron: "0 0 * * 6"
    118           filters:
    119             branches:
    120               only:
    121                 - master
    122     jobs: *all-tests
    123 
    124   publish-github-release:
    125     jobs:
    126       - package-and-publish:
    127           filters:
    128             tags:
    129               only: /^v.*/
    130             branches:
    131               ignore: /.*/