sistema_progs

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

config.yml (3827B)


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