-
Notifications
You must be signed in to change notification settings - Fork 2.4k
149 lines (132 loc) · 4.63 KB
/
commit.yml
File metadata and controls
149 lines (132 loc) · 4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: facebook/zstd/commit
on:
push:
branches:
- dev
pull_request:
branches:
- dev
permissions: read-all
jobs:
short-tests-0:
runs-on: ubuntu-latest
services:
docker:
image: fbopensource/zstd-circleci-primary:0.0.1
options: --entrypoint /bin/bash
steps:
- uses: actions/checkout@v6.0.2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev
- name: Test
run: |
./tests/test-license.py
cc -v
CFLAGS="-O0 -Werror -pedantic" make allmost; make clean
make c99build; make clean
make c11build; make clean
make -j regressiontest; make clean
make check; make clean
make cxxtest; make clean
short-tests-1:
runs-on: ubuntu-latest
services:
docker:
image: fbopensource/zstd-circleci-primary:0.0.1
options: --entrypoint /bin/bash
steps:
- uses: actions/checkout@v6.0.2
- name: Install Dependencies
run: |
sudo apt-get update
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
- name: gnu90 build
run: make gnu90build && make clean
- name: gnu99 build
run: make gnu99build && make clean
- name: ppc64 build
run: make ppc64build V=1 && make clean
- name: ppc64CRC build
run: make ppc64buildCRC V=1 && make clean
- name: ppc build
run: make ppcbuild V=1 && make clean
- name: arm build
run: make armbuild V=1 && make clean
- name: aarch64 build
run: make aarch64build V=1 && make clean
- name: aarch64CRC build
run: make aarch64buildCRC V=1 && make clean
- name: test-legacy
run: make -C tests test-legacy V=1 && make clean
- name: test-longmatch
run: make -C tests test-longmatch V=1 && make clean
- name: libzstd-nomt build
run: make -C lib libzstd-nomt V=1 && make clean
regression-test:
name: regression-${{ matrix.config_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- config_name: "default"
os: ubuntu-latest
baseline: "results.csv"
cflags: "-O3"
- config_name: "x86-crc"
os: ubuntu-latest
baseline: "results_crc32c.csv"
cflags: "-O3 -DZSTD_HASH_USE_CRC32C"
- config_name: "x86-sse4.2-crc"
os: ubuntu-latest
baseline: "results_crc32c.csv"
cflags: "-O3 -DZSTD_HASH_USE_CRC32C -msse4.2"
- config_name: "arm-v8.2-crc"
os: ubuntu-24.04-arm
baseline: "results_crc32c.csv"
cflags: "-O3 -DZSTD_HASH_USE_CRC32C -march=armv8.2-a+crc+crypto"
services:
docker:
image: fbopensource/zstd-circleci-primary:0.0.1
options: --entrypoint /bin/bash
env:
CIRCLE_ARTIFACTS: "/tmp/circleci-artifacts"
CFLAGS: ${{ matrix.cflags }}
steps:
- uses: actions/checkout@v6.0.2
- name: restore_cache
uses: actions/cache@v5
with:
# Use matrix config_name to keep cache keys unique per architecture/config
key: regression-cache-${{ matrix.config_name }}-${{ checksum "tests/regression/data.c" }}-v0
path: tests/regression/cache
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev
- name: Regression Test
run: |
# Build zstd with the matrix-specific CFLAGS
make -C programs zstd
make -C tests/regression test
mkdir -p $CIRCLE_ARTIFACTS
# Run the regression test tool
./tests/regression/test \
--cache tests/regression/cache \
--output $CIRCLE_ARTIFACTS/results.csv \
--zstd programs/zstd
echo "Comparing against baseline: ${{ matrix.baseline }}"
# Check if the baseline exists (to avoid failing on the first run of a new config)
if [ -f "tests/regression/${{ matrix.baseline }}" ]; then
diff tests/regression/${{ matrix.baseline }} $CIRCLE_ARTIFACTS/results.csv
else
echo "Warning: Baseline tests/regression/${{ matrix.baseline }} not found."
echo "If this is a new configuration, please commit the generated results.csv as ${{ matrix.baseline }}."
fi
- uses: actions/upload-artifact@v7.0.0
with:
# Artifact name includes config for easy identification
name: results-${{ matrix.config_name }}
path: "$CIRCLE_ARTIFACTS/results.csv"