• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: facebook/zstd/commit
2on:
3  push:
4    branches:
5    - dev
6  pull_request:
7    branches:
8    - dev
9
10permissions: read-all
11
12jobs:
13  short-tests-0:
14    runs-on: ubuntu-latest
15    services:
16      docker:
17        image: fbopensource/zstd-circleci-primary:0.0.1
18        options: --entrypoint /bin/bash
19    steps:
20    - uses: actions/checkout@v4
21    - name: Install Dependencies
22      run: |
23        sudo apt-get update
24        sudo apt-get install libcurl4-gnutls-dev
25    - name: Test
26      run: |
27        ./tests/test-license.py
28        cc -v
29        CFLAGS="-O0 -Werror -pedantic" make allmost; make clean
30        make c99build; make clean
31        make c11build; make clean
32        make -j regressiontest; make clean
33        make check; make clean
34        make cxxtest; make clean
35
36  short-tests-1:
37    runs-on: ubuntu-latest
38    services:
39      docker:
40        image: fbopensource/zstd-circleci-primary:0.0.1
41        options: --entrypoint /bin/bash
42    steps:
43    - uses: actions/checkout@v4
44    - name: Install Dependencies
45      run: |
46        sudo apt-get update
47        sudo apt-get install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu libc6-dev-ppc64-powerpc-cross libcurl4-gnutls-dev lib64gcc-13-dev-powerpc-cross
48    - name: gnu90 build
49      run: make gnu90build && make clean
50    - name: gnu99 build
51      run: make gnu99build && make clean
52    - name: ppc64 build
53      run: make ppc64build V=1 && make clean
54    - name: ppc build
55      run: make ppcbuild V=1 && make clean
56    - name: arm build
57      run: make armbuild V=1 && make clean
58    - name: aarch64 build
59      run: make aarch64build V=1 && make clean
60    - name: test-legacy
61      run: make -C tests test-legacy V=1 && make clean
62    - name: test-longmatch
63      run: make -C tests test-longmatch V=1 && make clean
64    - name: libzstd-nomt build
65      run: make -C lib libzstd-nomt V=1 && make clean
66
67  regression-test:
68    runs-on: ubuntu-latest
69    services:
70      docker:
71        image: fbopensource/zstd-circleci-primary:0.0.1
72        options: --entrypoint /bin/bash
73    env:
74      CIRCLE_ARTIFACTS: "/tmp/circleci-artifacts"
75    steps:
76    - uses: actions/checkout@v4
77    - name: restore_cache
78      uses: actions/cache@v4
79      with:
80        key: regression-cache-{{ checksum "tests/regression/data.c" }}-v0
81        path: tests/regression/cache
82        restore-keys: regression-cache-{{ checksum "tests/regression/data.c" }}-v0
83    - name: Install Dependencies
84      run: |
85        sudo apt-get update
86        sudo apt-get install libcurl4-gnutls-dev
87    - name: Regression Test
88      run: |
89        make -C programs zstd
90        make -C tests/regression test
91        mkdir -p $CIRCLE_ARTIFACTS
92        ./tests/regression/test                     \
93            --cache  tests/regression/cache         \
94            --output $CIRCLE_ARTIFACTS/results.csv  \
95            --zstd   programs/zstd
96        echo "NOTE: The new results.csv is uploaded as an artifact to this job"
97        echo "      If this fails, go to the Artifacts pane in CircleCI, "
98        echo "      download /tmp/circleci-artifacts/results.csv, and if they "
99        echo "      are still good, copy it into the repo and commit it."
100        echo "> diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv"
101        diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv
102    - uses: actions/upload-artifact@v4
103      with:
104        path: "/tmp/circleci-artifacts"
105