| 1 | # This configuration was automatically generated from a CircleCI 1.0 config. |
| 2 | # It should include any build commands you had along with commands that CircleCI |
| 3 | # inferred from your project structure. We strongly recommend you read all the |
| 4 | # comments in this file to understand the structure of CircleCI 2.0, as the idiom |
| 5 | # for configuration has changed substantially in 2.0 to allow arbitrary jobs rather |
| 6 | # than the prescribed lifecycle of 1.0. In general, we recommend using this generated |
| 7 | # configuration as a reference rather than using it in production, though in most |
| 8 | # cases it should duplicate the execution of your original 1.0 config. |
| 9 | version: 2 |
| 10 | jobs: |
| 11 | build: |
| 12 | working_directory: ~/lz4/lz4 |
| 13 | # Parallelism is broken in this file : it just plays the same tests twice. |
| 14 | # The script will have to be modified to support parallelism properly |
| 15 | # In the meantime, set it to 1. |
| 16 | parallelism: 1 |
| 17 | shell: /bin/bash --login |
| 18 | # CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did. |
| 19 | # If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables . |
| 20 | environment: |
| 21 | CIRCLE_ARTIFACTS: /tmp/circleci-artifacts |
| 22 | CIRCLE_TEST_REPORTS: /tmp/circleci-test-results |
| 23 | # In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages. |
| 24 | # In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images. |
| 25 | # The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job. |
| 26 | # We have selected a pre-built image that mirrors the build environment we use on |
| 27 | # the 1.0 platform, but we recommend you choose an image more tailored to the needs |
| 28 | # of each job. For more information on choosing an image (or alternatively using a |
| 29 | # VM instead of a container) see https://circleci.com/docs/2.0/executor-types/ |
| 30 | # To see the list of pre-built images that CircleCI provides for most common languages see |
| 31 | # https://circleci.com/docs/2.0/circleci-images/ |
| 32 | docker: |
| 33 | - image: fbopensource/lz4-circleci-primary:0.0.4 |
| 34 | steps: |
| 35 | # Machine Setup |
| 36 | # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each |
| 37 | # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. |
| 38 | - checkout |
| 39 | # Prepare for artifact and test results collection equivalent to how it was done on 1.0. |
| 40 | # In many cases you can simplify this from what is generated here. |
| 41 | # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/' |
| 42 | - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS |
| 43 | # Test |
| 44 | # This would typically be a build job when using workflows, possibly combined with build |
| 45 | # This is based on your 1.0 configuration file or project settings |
| 46 | - run: CC=clang CFLAGS="-Werror -O0" make all && make clean |
| 47 | - run: c++ -v; make cxxtest && make clean |
| 48 | - run: cc -v; c++ -v; make ctocxxtest && make clean |
| 49 | - run: gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -Werror" make check && make clean |
| 50 | - run: gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean |
| 51 | - run: gcc-6 -v; CC=gcc-6 CFLAGS="-O2 -Werror" make check && make clean |
| 52 | - run: make cmakebuild && make clean |
| 53 | - run: make -C tests test-lz4 |
| 54 | - run: make -C tests test-lz4c |
| 55 | - run: make -C tests test-frametest |
| 56 | - run: make -C tests test-fuzzer && make clean |
| 57 | - run: make -C lib all && make clean |
| 58 | - run: pyenv global 3.4.4; CPPFLAGS=-I/usr/include/x86_64-linux-gnu make versionsTest && make clean |
| 59 | - run: make test-install && make clean |
| 60 | - run: gcc -v; CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean |
| 61 | - run: clang -v; make staticAnalyze && make clean |
| 62 | - run: make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static V=1 && make clean |
| 63 | - run: CFLAGS=-m64 LDFLAGS=-m64 make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static V=1 && make clean |
| 64 | - run: make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static V=1 && make clean |
| 65 | - run: make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static V=1 && make clean |
| 66 | # Teardown |
| 67 | # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each |
| 68 | # Save test results |
| 69 | - store_test_results: |
| 70 | path: /tmp/circleci-test-results |
| 71 | # Save artifacts |
| 72 | - store_artifacts: |
| 73 | path: /tmp/circleci-artifacts |
| 74 | - store_artifacts: |
| 75 | path: /tmp/circleci-test-results |