Skip to content

Commit bdc0f22

Browse files
Roytakmichalvasko
authored andcommitted
ci UPDATE add solaris,freebsd,32bit & BE workflows
1 parent 17cb542 commit bdc0f22

1 file changed

Lines changed: 123 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 123 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
options: "-DENABLE_TESTS=ON",
2626
packager: "sudo apt-get",
2727
# no expect because stdout seems to be redirected
28-
packages: "libcmocka-dev libxxhash-dev shunit2",
28+
packages: "libcmocka-dev libxxhash-dev",
2929
snaps: "",
3030
build-cmd: "make"
3131
}
@@ -36,7 +36,7 @@ jobs:
3636
cc: "clang",
3737
options: "-DENABLE_TESTS=ON",
3838
packager: "sudo apt-get",
39-
packages: "libcmocka-dev libxxhash-dev shunit2",
39+
packages: "libcmocka-dev libxxhash-dev",
4040
snaps: "",
4141
build-cmd: "make"
4242
}
@@ -47,7 +47,7 @@ jobs:
4747
cc: "gcc",
4848
options: "",
4949
packager: "sudo apt-get",
50-
packages: "libcmocka-dev libxxhash-dev valgrind shunit2",
50+
packages: "libcmocka-dev libxxhash-dev valgrind",
5151
snaps: "",
5252
build-cmd: "make"
5353
}
@@ -59,7 +59,7 @@ jobs:
5959
options: "",
6060
packager: "sudo apt-get",
6161
# no valgrind because it does not support DWARF5 yet generated by clang 14
62-
packages: "libcmocka-dev libxxhash-dev shunit2",
62+
packages: "libcmocka-dev libxxhash-dev",
6363
snaps: "",
6464
build-cmd: "make"
6565
}
@@ -70,7 +70,7 @@ jobs:
7070
cc: "clang",
7171
options: "-DENABLE_TESTS=ON -DPATH_EXPECT=",
7272
packager: "brew",
73-
packages: "cmocka xxhash shunit2 tcl-tk",
73+
packages: "cmocka xxhash tcl-tk",
7474
snaps: "",
7575
build-cmd: "make"
7676
}
@@ -241,3 +241,121 @@ jobs:
241241
- name: Install
242242
working-directory: '${{ github.workspace }}/../build'
243243
run: cmake --install . --strip
244+
245+
build-solaris:
246+
name: Release, Solaris, gcc
247+
runs-on: ubuntu-latest
248+
steps:
249+
- uses: actions/checkout@main
250+
251+
- name: Build and test
252+
uses: vmactions/solaris-vm@main
253+
with:
254+
release: '11.4-gcc'
255+
usesh: true
256+
257+
prepare: |
258+
echo "Installing dependencies..."
259+
export PATH=/opt/csw/bin:$PATH
260+
261+
pkgutil -y -i git cmake libpcre2_dev
262+
263+
# build cmocka from source
264+
git clone --depth 1 https://github.com/clibs/cmocka.git
265+
cd cmocka
266+
mkdir build-cmocka
267+
cd build-cmocka
268+
cmake -DCMAKE_BUILD_TYPE=Release ..
269+
gmake
270+
gmake install
271+
cd ../..
272+
273+
run: |
274+
set -e
275+
echo "Starting build..."
276+
mkdir build
277+
cd build
278+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON ..
279+
gmake
280+
ctest --output-on-failure
281+
282+
build-freebsd:
283+
name: Release, FreeBSD, clang
284+
runs-on: ubuntu-latest
285+
steps:
286+
- uses: actions/checkout@main
287+
288+
- name: Release, FreeBSD, clang
289+
uses: vmactions/freebsd-vm@main
290+
with:
291+
usesh: true
292+
293+
prepare: |
294+
echo "Installing dependencies..."
295+
pkg update -f
296+
pkg install -y cmake cmocka xxhash bash git pcre2
297+
298+
run: |
299+
set -e
300+
echo "Starting build..."
301+
mkdir build
302+
cd build
303+
304+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON ..
305+
make
306+
ctest --output-on-failure
307+
308+
build-linux-32bit:
309+
name: Release, Linux 32-bit, gcc
310+
runs-on: ubuntu-latest
311+
steps:
312+
- uses: actions/checkout@main
313+
314+
- name: Build in 32-bit container
315+
run: |
316+
docker run --rm \
317+
-v ${{ github.workspace }}:${{ github.workspace }} \
318+
-w ${{ github.workspace }} \
319+
i386/ubuntu \
320+
/bin/bash -c " \
321+
apt-get update -q && \
322+
apt-get install -y -q git cmake gcc libcmocka-dev libxxhash-dev libpcre2-dev && \
323+
mkdir build && cd build && \
324+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON .. && \
325+
make && \
326+
ctest --output-on-failure \
327+
"
328+
329+
build-big-endian:
330+
name: Release, Big-endian, s390x
331+
runs-on: ubuntu-latest
332+
steps:
333+
- uses: actions/checkout@main
334+
335+
- name: Build and test
336+
# use QEMU user-static emulation to run non-x86 Linux
337+
uses: uraimo/run-on-arch-action@master
338+
with:
339+
arch: s390x
340+
distro: ubuntu22.04
341+
342+
# speeds up build by caching Docker images in GitHub Packages
343+
githubToken: ${{ github.token }}
344+
345+
# map the build directory to the container
346+
dockerRunArgs: |
347+
--volume "${PWD}:/workspace"
348+
349+
# install dependencies inside the emulated container
350+
install: |
351+
apt-get update -q -y
352+
apt-get install -q -y git cmake gcc libcmocka-dev libxxhash-dev libpcre2-dev
353+
354+
# run the build
355+
run: |
356+
set -e
357+
mkdir build
358+
cd build
359+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON ..
360+
make
361+
ctest --output-on-failure

0 commit comments

Comments
 (0)