Home | History | Annotate | Line # | Download | only in .circleci
      1  1.1  christos version: 2
      2  1.1  christos 
      3  1.1  christos jobs:
      4  1.1  christos   # the first half of the jobs are in this test
      5  1.1  christos   short-tests-0:
      6  1.1  christos     # TODO: Create a small custom docker image with all the dependencies we need
      7  1.1  christos     #       preinstalled to reduce installation time.
      8  1.1  christos     docker:
      9  1.1  christos       - image: fbopensource/zstd-circleci-primary:0.0.1
     10  1.1  christos     steps:
     11  1.1  christos       - checkout
     12  1.1  christos       - run:
     13  1.1  christos           name: Test
     14  1.1  christos           command: |
     15  1.1  christos             ./tests/test-license.py
     16  1.1  christos             cc -v
     17  1.1  christos             CFLAGS="-O0 -Werror -pedantic" make allmost; make clean
     18  1.1  christos             make c99build; make clean
     19  1.1  christos             make c11build; make clean
     20  1.1  christos             make -j regressiontest; make clean
     21  1.1  christos             make shortest; make clean
     22  1.1  christos             make cxxtest; make clean
     23  1.1  christos   # the second half of the jobs are in this test
     24  1.1  christos   short-tests-1:
     25  1.1  christos     docker:
     26  1.1  christos       - image: fbopensource/zstd-circleci-primary:0.0.1
     27  1.1  christos     steps:
     28  1.1  christos       - checkout
     29  1.1  christos       - run:
     30  1.1  christos           name: Test
     31  1.1  christos           command: |
     32  1.1  christos             make gnu90build; make clean
     33  1.1  christos             make gnu99build; make clean
     34  1.1  christos             make ppc64build V=1; make clean
     35  1.1  christos             make ppcbuild   V=1; make clean
     36  1.1  christos             make armbuild   V=1; make clean
     37  1.1  christos             make aarch64build V=1; make clean
     38  1.1  christos             make -C tests test-legacy test-longmatch; make clean
     39  1.1  christos             make -C lib libzstd-nomt; make clean
     40  1.1  christos   # This step should only be run in a cron job
     41  1.1  christos   regression-test:
     42  1.1  christos     docker:
     43  1.1  christos       - image: fbopensource/zstd-circleci-primary:0.0.1
     44  1.1  christos     environment:
     45  1.1  christos       CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
     46  1.1  christos     steps:
     47  1.1  christos       - checkout
     48  1.1  christos       # Restore the cached resources.
     49  1.1  christos       - restore_cache:
     50  1.1  christos           # We try our best to bust the cache when the data changes by hashing
     51  1.1  christos           # data.c. If that doesn't work, simply update the version number here
     52  1.1  christos           # and below. If we fail to bust the cache, the regression testing will
     53  1.1  christos           # still work, since it has its own stamp, but will need to redownload
     54  1.1  christos           # everything.
     55  1.1  christos           keys:
     56  1.1  christos             - regression-cache-{{ checksum "tests/regression/data.c" }}-v0
     57  1.1  christos       - run:
     58  1.1  christos           name: Regression Test
     59  1.1  christos           command: |
     60  1.1  christos             make -C programs zstd
     61  1.1  christos             make -C tests/regression test
     62  1.1  christos             mkdir -p $CIRCLE_ARTIFACTS
     63  1.1  christos             ./tests/regression/test                     \
     64  1.1  christos                 --cache  tests/regression/cache         \
     65  1.1  christos                 --output $CIRCLE_ARTIFACTS/results.csv  \
     66  1.1  christos                 --zstd   programs/zstd
     67  1.1  christos             echo "NOTE: The new results.csv is uploaded as an artifact to this job"
     68  1.1  christos             echo "      If this fails, go to the Artifacts pane in CircleCI, "
     69  1.1  christos             echo "      download /tmp/circleci-artifacts/results.csv, and if they "
     70  1.1  christos             echo "      are still good, copy it into the repo and commit it."
     71  1.1  christos             echo "> diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv"
     72  1.1  christos             diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv
     73  1.1  christos       # Only save the cache on success (default), since if the failure happened
     74  1.1  christos       # before we stamp the data cache, we will have a bad cache for this key.
     75  1.1  christos       - save_cache:
     76  1.1  christos           key: regression-cache-{{ checksum "tests/regression/data.c" }}-v0
     77  1.1  christos           paths:
     78  1.1  christos             - tests/regression/cache
     79  1.1  christos       - store_artifacts:
     80  1.1  christos           path: /tmp/circleci-artifacts
     81  1.1  christos 
     82  1.1  christos 
     83  1.1  christos workflows:
     84  1.1  christos   version: 2
     85  1.1  christos   commit:
     86  1.1  christos     jobs:
     87  1.1  christos       # Run the tests in parallel
     88  1.1  christos       - short-tests-0
     89  1.1  christos       - short-tests-1
     90  1.1  christos       - regression-test
     91  1.1  christos 
     92  1.1  christos   nightly:
     93  1.1  christos     triggers:
     94  1.1  christos       - schedule:
     95  1.1  christos           cron: "0 0 * * *"
     96  1.1  christos           filters:
     97  1.1  christos             branches:
     98  1.1  christos               only:
     99  1.1  christos                 - release
    100  1.1  christos                 - dev
    101  1.1  christos                 - master
    102  1.1  christos     jobs:
    103  1.1  christos       # Run daily regression tests
    104  1.1  christos       - regression-test
    105  1.1  christos 
    106  1.1  christos 
    107  1.1  christos 
    108  1.1  christos   # Longer tests
    109  1.1  christos     #- make -C tests test-zstd-nolegacy && make clean
    110  1.1  christos     #- pyenv global 3.4.4; make -C tests versionsTest && make clean
    111  1.1  christos     #- make zlibwrapper         && make clean
    112  1.1  christos     #- gcc -v; make -C tests test32 MOREFLAGS="-I/usr/include/x86_64-linux-gnu" && make clean
    113  1.1  christos     #- make uasan               && make clean
    114  1.1  christos     #- make asan32              && make clean
    115  1.1  christos     #- make -C tests test32 CC=clang MOREFLAGS="-g -fsanitize=address -I/usr/include/x86_64-linux-gnu"
    116  1.1  christos   # Valgrind tests
    117  1.1  christos     #- CFLAGS="-O1 -g" make -C zlibWrapper valgrindTest && make clean
    118  1.1  christos     #- make -C tests valgrindTest && make clean
    119  1.1  christos   # ARM, AArch64, PowerPC, PowerPC64 tests
    120  1.1  christos     #- make ppctest             && make clean
    121  1.1  christos     #- make ppc64test           && make clean
    122  1.1  christos     #- make armtest             && make clean
    123  1.1  christos     #- make aarch64test         && make clean
    124