Skip to content

Commit 930d085

Browse files
committed
ci: build with zstd
Also fix "dubious ownership" in containers for Git operations.
1 parent 0eb8209 commit 930d085

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
if: runner.os == 'Linux'
7373
uses: awalsh128/cache-apt-pkgs-action@v1
7474
with:
75-
packages: libmpfr-dev
75+
packages: libmpfr-dev libzstd-dev
7676
version: 1.0
7777

7878
- name: Install dependencies (Windows)
@@ -100,7 +100,7 @@ jobs:
100100
101101
- name: Configure
102102
run: |
103-
opts='--disable-dependency-tracking --disable-scalar --disable-threaded --disable-native --enable-static-link --with-gmp --with-zlib'
103+
opts='--disable-dependency-tracking --disable-scalar --disable-threaded --disable-native --enable-static-link --with-gmp --with-zlib --with-zstd'
104104
case ${{ matrix.bin }} in
105105
form) opts="$opts --enable-scalar";;
106106
tform) opts="$opts --enable-threaded";;
@@ -114,6 +114,7 @@ jobs:
114114
mkdir static-lib
115115
ln -s /usr/local/opt/gmp/lib/libgmp.a static-lib/libgmp.a
116116
ln -s /usr/local/opt/mpfr/lib/libmpfr.a static-lib/libmpfr.a
117+
ln -s /usr/local/opt/zstd/lib/libzstd.a static-lib/libzstd.a
117118
export LIBRARY_PATH="$(pwd)/static-lib:${LIBRARY_PATH:-}"
118119
opts="$opts --disable-static-link"
119120
fi

.github/workflows/test.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
with:
3232
fetch-depth: 0 # ensures a reachable tag
3333

34-
- name: Install MPFR
34+
- name: Install dependencies
3535
uses: awalsh128/cache-apt-pkgs-action@v1
3636
with:
37-
packages: libmpfr-dev
37+
packages: libmpfr-dev libzstd-dev
3838
version: 1.0
3939

4040
- name: Install MPI if necessary
@@ -54,7 +54,7 @@ jobs:
5454
case ${{ matrix.bin }} in
5555
vorm|tvorm|parvorm) opts="$opts --enable-debug";;
5656
esac
57-
opts="$opts --with-gmp --with-zlib"
57+
opts="$opts --with-gmp --with-zlib --with-zstd"
5858
autoreconf -i
5959
./configure $opts
6060
@@ -138,16 +138,10 @@ jobs:
138138
with:
139139
fetch-depth: 0 # ensures a reachable tag
140140

141-
- name: Install Valgrind
142-
uses: awalsh128/cache-apt-pkgs-action@v1
143-
with:
144-
packages: valgrind
145-
version: 1.0
146-
147-
- name: Install MPFR
141+
- name: Install dependencies
148142
uses: awalsh128/cache-apt-pkgs-action@v1
149143
with:
150-
packages: libmpfr-dev
144+
packages: libmpfr-dev libzstd-dev valgrind
151145
version: 1.0
152146

153147
- name: Install MPI if necessary
@@ -167,7 +161,7 @@ jobs:
167161
case ${{ matrix.bin }} in
168162
vorm|tvorm|parvorm) opts="$opts --enable-debug";;
169163
esac
170-
opts="$opts --with-gmp --with-zlib"
164+
opts="$opts --with-gmp --with-zlib --with-zstd"
171165
autoreconf -i
172166
./configure $opts
173167
@@ -196,16 +190,10 @@ jobs:
196190
with:
197191
fetch-depth: 0 # ensures a reachable tag
198192

199-
- name: Install LCOV
200-
uses: awalsh128/cache-apt-pkgs-action@v1
201-
with:
202-
packages: lcov
203-
version: 1.0
204-
205-
- name: Install MPFR
193+
- name: Install dependencies
206194
uses: awalsh128/cache-apt-pkgs-action@v1
207195
with:
208-
packages: libmpfr-dev
196+
packages: lcov libmpfr-dev libzstd-dev
209197
version: 1.0
210198

211199
- name: Install MPI if necessary
@@ -222,7 +210,7 @@ jobs:
222210
tvorm) opts="$opts --disable-scalar --enable-threaded --disable-parform";;
223211
parvorm) opts="$opts --disable-scalar --disable-threaded --enable-parform";;
224212
esac
225-
opts="$opts --enable-debug --enable-coverage --with-gmp --with-zlib"
213+
opts="$opts --enable-debug --enable-coverage --with-gmp --with-zlib --with-zstd"
226214
autoreconf -i
227215
./configure $opts
228216
@@ -275,7 +263,12 @@ jobs:
275263
- name: Install dependencies
276264
run: |
277265
apt-get update
278-
apt-get -y install automake build-essential git libgmp-dev libmpfr-dev ruby zlib1g-dev
266+
apt-get -y install automake build-essential git libgmp-dev libmpfr-dev libzstd-dev ruby zlib1g-dev
267+
268+
# Fix dubious ownership for Git operations.
269+
# See https://github.com/actions/runner/issues/2033#issuecomment-1204205989
270+
- name: Set ownership
271+
run: chown -R $(id -u):$(id -g) $PWD
279272

280273
- name: Configure
281274
run: |
@@ -284,7 +277,7 @@ jobs:
284277
form) opts="$opts --enable-scalar --disable-threaded --disable-parform";;
285278
tform) opts="$opts --disable-scalar --enable-threaded --disable-parform";;
286279
esac
287-
opts="$opts --disable-debug --with-gmp --with-zlib"
280+
opts="$opts --disable-debug --with-gmp --with-zlib --with-zstd"
288281
autoreconf -i
289282
./configure $opts
290283

0 commit comments

Comments
 (0)