VirtualBox

source: vbox/trunk/src/libs/libslirp-4.9.0/.gitlab-ci.yml

Last change on this file was 109078, checked in by vboxsync, 2 weeks ago

libs/libslirp-4.9.0: Make it build on Linux, bugref:10268

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1image: fedora:latest
2
3variables:
4 DEPS: meson ninja-build
5 gcc libasan liblsan libubsan pkg-config glib2-devel
6 mingw64-gcc mingw64-pkg-config mingw64-glib2
7 clang-analyzer git-core
8
9before_script:
10 - dnf install -y $DEPS
11 - git fetch --tags https://gitlab.freedesktop.org/slirp/libslirp.git
12 - git describe
13
14build:
15 script:
16 - meson --werror build || (cat build/meson-logs/meson-log.txt && exit 1)
17 - ninja -C build
18 - (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
19 - ninja -C build scan-build
20
21build-asan:
22 script:
23 - CFLAGS=-fsanitize=address meson --werror build || (cat build/meson-logs/meson-log.txt && exit 1)
24 - ninja -C build
25 - (cd build && ASAN_OPTIONS=detect_leaks=0 meson test) || (cat build/meson-logs/testlog.txt && exit 1)
26
27build-lsan:
28 script:
29 - CFLAGS=-fsanitize=leak meson --werror build || (cat build/meson-logs/meson-log.txt && exit 1)
30 - ninja -C build
31 - (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
32
33build-usan:
34 script:
35 - CFLAGS=-fsanitize=undefined meson --werror build || (cat build/meson-logs/meson-log.txt && exit 1)
36 - ninja -C build
37 - (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
38
39fuzz:
40 parallel:
41 matrix:
42 - TARGET: [arp, ip-header, udp, udp-h, tftp, dhcp, icmp, tcp, tcp-h, ndp, ip6-header, udp6, udp6-h, tftp6, icmp6, tcp6, tcp6-h]
43 script:
44 - CC=clang CXX=clang++ meson build -Dllvm-fuzz=true || (cat build/meson-logs/meson-log.txt && exit 1)
45 - ninja -C build
46 - build/fuzzing/fuzz-$TARGET -seed=1234 -runs=1000000 fuzzing/IN_$TARGET
47 artifacts:
48 when: on_failure
49 paths:
50 - crash-*
51 - leak-*
52 - oom-*
53 - timeout-*
54
55build-mingw64:
56 script:
57 - (mkdir buildw && cd buildw && mingw64-meson --werror) || (cat buildw/meson-logs/meson-log.txt && exit 1)
58 - ninja -C buildw
59
60Coverity:
61 only:
62 refs:
63 - master
64 - coverity
65 script:
66 - dnf update -y
67 - dnf install -y curl clang
68 - curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64
69 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN
70 - tar xfz /tmp/cov-analysis-linux64.tgz
71 - CC=clang meson build
72 - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build
73 - tar cfz cov-int.tar.gz cov-int
74 - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
75 --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
76 --form [email protected] --form version="`git describe --tags`"
77 --form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID "
78
79integration-slirp4netns:
80 variables:
81 SLIRP4NETNS_VERSION: "v1.1.12"
82 # Consumed by `make benchmark`
83 BENCHMARK_IPERF3_DURATION: "10"
84 script:
85 # Install libslirp
86 - meson build
87 - ninja -C build install
88 # Register the path of libslirp.so.0
89 - echo /usr/local/lib64 >/etc/ld.so.conf.d/libslirp.conf
90 - ldconfig
91 # Install the dependencies of slirp4netns and its test suite
92 # TODO: install udhcpc for `slirp4netns/tests/test-slirp4netns-dhcp.sh` (currently skipped, due to lack of udhcpc)
93 - dnf install -y autoconf automake findutils iperf3 iproute iputils jq libcap-devel libseccomp-devel nmap-ncat util-linux
94 # Check whether the runner environment is configured correctly
95 - unshare -rn true || (echo Make sure you have relaxed seccomp and appamor && exit 1)
96 - unshare -rn ip tap add tap0 mode tap || (echo Make sure you have /dev/net/tun && exit 1)
97 # Install slirp4netns
98 - git clone https://github.com/rootless-containers/slirp4netns -b "${SLIRP4NETNS_VERSION}"
99 - cd slirp4netns
100 - ./autogen.sh
101 - ./configure
102 - make
103 - make install
104 - slirp4netns --version
105 # Run slirp4netns integration test
106 - make distcheck || (cat $(find . -name 'test-suite.log' ) && exit 1)
107 # Run benchmark test to ensure that libslirp can actually handle packets, with several MTU configurations
108 - make benchmark MTU=1500
109 - make benchmark MTU=512
110 - make benchmark MTU=65520
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette