10 shell: bash --noprofile --norc -exo pipefail {0}
14 name: ${{ join(matrix.config.*, '-') }}
15 runs-on: ${{ matrix.config.os }}
17 AARCH64: ${{ matrix.config.cross == 'aarch64' }}
18 ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
19 ASAN: ${{ contains(matrix.config.checks, 'asan') }}
20 BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
21 BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
22 CC: ccache ${{ matrix.config.compiler }}
23 DEF_LIB: ${{ matrix.config.library }}
24 LIBABIGAIL_VERSION: libabigail-1.8
25 MINGW: ${{ matrix.config.cross == 'mingw' }}
26 MINI: ${{ matrix.config.mini != '' }}
27 PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
29 RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
52 checks: asan+doc+tests
79 - name: Checkout sources
80 uses: actions/checkout@v2
81 - name: Generate cache keys
84 echo -n '::set-output name=ccache::'
85 echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
86 echo -n '::set-output name=libabigail::'
87 echo 'libabigail-${{ matrix.config.os }}'
88 echo -n '::set-output name=abi::'
89 echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
90 - name: Retrieve ccache cache
91 uses: actions/cache@v2
94 key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
96 ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
97 - name: Retrieve libabigail cache
99 uses: actions/cache@v2
100 if: env.ABI_CHECKS == 'true'
103 key: ${{ steps.get_ref_keys.outputs.libabigail }}
104 - name: Retrieve ABI reference cache
105 uses: actions/cache@v2
106 if: env.ABI_CHECKS == 'true'
109 key: ${{ steps.get_ref_keys.outputs.abi }}
110 - name: Update APT cache
111 run: sudo apt update || true
112 - name: Install packages
113 run: sudo apt install -y ccache libnuma-dev python3-setuptools
114 python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
115 libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
117 - name: Install libabigail build dependencies if no cache is available
118 if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
119 run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
121 - name: Install i386 cross compiling packages
122 if: env.BUILD_32BIT == 'true'
123 run: sudo apt install -y gcc-multilib g++-multilib
124 - name: Install aarch64 cross compiling packages
125 if: env.AARCH64 == 'true'
126 run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
127 pkg-config-aarch64-linux-gnu
128 - name: Install mingw cross compiling packages
129 if: env.MINGW == 'true'
130 run: sudo apt install -y mingw-w64 mingw-w64-tools
131 - name: Install ppc64le cross compiling packages
132 if: env.PPC64LE == 'true'
133 run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
134 pkg-config-powerpc-linux-gnu
135 - name: Install test tools packages
136 if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RUN_TESTS == 'true'
137 run: sudo apt install -y gdb
138 - name: Install doc generation packages
139 if: env.BUILD_DOCS == 'true'
140 run: sudo apt install -y doxygen graphviz python3-sphinx
141 python3-sphinx-rtd-theme
145 # Workaround on $HOME permissions as EAL checks them for plugin loading
147 - name: Build and test
148 run: .ci/linux-build.sh
149 - name: Upload logs on failure
151 uses: actions/upload-artifact@v2
153 name: meson-logs-${{ join(matrix.config.*, '-') }}
157 build/meson-logs/meson-log.txt
158 build/meson-logs/testlog.txt
160 prepare-container-images:
161 name: ${{ join(matrix.config.*, '-') }}
162 runs-on: ubuntu-latest
171 - name: Generate various keys
174 echo -n '::set-output name=image::'
175 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
176 - name: Retrieve image cache
178 uses: actions/cache@v2
181 key: ${{ steps.get_keys.outputs.image }}
182 - name: Pull and prepare a fresh image
183 if: steps.image_cache.outputs.cache-hit != 'true'
185 docker pull registry.fedoraproject.org/${{ matrix.config.image }}
186 docker run -d -i --rm --name dpdk \
187 registry.fedoraproject.org/${{ matrix.config.image }} \
190 if: steps.image_cache.outputs.cache-hit != 'true'
191 run: docker exec -i dpdk dnf update -y
192 - name: Install packages
193 if: steps.image_cache.outputs.cache-hit != 'true'
194 run: docker exec -i dpdk dnf install -y ccache numactl-devel
195 python3-setuptools python3-wheel python3-pip python3-pyelftools
196 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
197 openssl-devel rdma-core-devel zlib-devel
198 - name: Save image in cache
199 if: steps.image_cache.outputs.cache-hit != 'true'
201 docker commit dpdk dpdk-local
203 docker save -o ~/.image/${{ matrix.config.image }}.tar dpdk-local
205 if: steps.image_cache.outputs.cache-hit != 'true'
206 run: docker kill dpdk
208 rpm-container-builds:
209 needs: prepare-container-images
210 name: ${{ join(matrix.config.*, '-') }}
211 runs-on: ubuntu-latest
231 - name: Checkout sources
232 uses: actions/checkout@v2
233 - name: Generate various keys
236 echo -n '::set-output name=ccache::'
237 echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W)
238 echo -n '::set-output name=image::'
239 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
240 echo -n '::set-output name=logs::'
241 echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':'
242 - name: Retrieve image cache
244 uses: actions/cache@v2
247 key: ${{ steps.get_keys.outputs.image }}
248 - name: Fail if no image (not supposed to happen)
249 if: steps.image_cache.outputs.cache-hit != 'true'
251 echo 'Image ${{ matrix.config.image }} is not cached.'
253 - name: Retrieve ccache cache
254 uses: actions/cache@v2
257 key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }}
259 ${{ steps.get_keys.outputs.ccache }}-refs/heads/main
260 - name: Prepare working directory
264 echo CC=ccache ${{ matrix.config.compiler }} >> ~/env
265 echo DEF_LIB=${{ matrix.config.library }} >> ~/env
266 - name: Load the cached image
268 docker load -i ~/.image/${{ matrix.config.image }}.tar
269 docker run -d -i --rm --name dpdk \
270 --mount type=bind,src=$HOME/.ccache,dst=/root/.ccache \
271 --mount type=bind,src=$(pwd),dst=/root/dpdk \
277 run: docker exec -i dpdk dnf update -y || true
278 - name: Install packages
279 run: docker exec -i dpdk dnf install -y ccache numactl-devel
280 python3-setuptools python3-wheel python3-pip python3-pyelftools
281 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
282 openssl-devel rdma-core-devel zlib-devel ${{ matrix.config.compiler }}
284 run: docker exec -i dpdk .ci/linux-setup.sh
286 run: docker exec -i dpdk .ci/linux-build.sh
288 run: docker kill dpdk
289 - name: Upload logs on failure
291 uses: actions/upload-artifact@v2
293 name: ${{ steps.get_keys.outputs.logs }}
296 build/meson-logs/meson-log.txt