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 RISCV64: ${{ matrix.config.cross == 'riscv64' }}
30 RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
53 checks: asan+doc+tests
84 - name: Checkout sources
85 uses: actions/checkout@v2
86 - name: Generate cache keys
89 echo -n '::set-output name=ccache::'
90 echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
91 echo -n '::set-output name=libabigail::'
92 echo 'libabigail-${{ matrix.config.os }}'
93 echo -n '::set-output name=abi::'
94 echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
95 - name: Retrieve ccache cache
96 uses: actions/cache@v2
99 key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
101 ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
102 - name: Retrieve libabigail cache
104 uses: actions/cache@v2
105 if: env.ABI_CHECKS == 'true'
108 key: ${{ steps.get_ref_keys.outputs.libabigail }}
109 - name: Retrieve ABI reference cache
110 uses: actions/cache@v2
111 if: env.ABI_CHECKS == 'true'
114 key: ${{ steps.get_ref_keys.outputs.abi }}
115 - name: Update APT cache
116 run: sudo apt update || true
117 - name: Install packages
118 run: sudo apt install -y ccache libnuma-dev python3-setuptools
119 python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
120 libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
122 - name: Install libabigail build dependencies if no cache is available
123 if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
124 run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
126 - name: Install i386 cross compiling packages
127 if: env.BUILD_32BIT == 'true'
128 run: sudo apt install -y gcc-multilib g++-multilib
129 - name: Install aarch64 cross compiling packages
130 if: env.AARCH64 == 'true'
131 run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
132 pkg-config-aarch64-linux-gnu
133 - name: Install mingw cross compiling packages
134 if: env.MINGW == 'true'
135 run: sudo apt install -y mingw-w64 mingw-w64-tools
136 - name: Install ppc64le cross compiling packages
137 if: env.PPC64LE == 'true'
138 run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
139 pkg-config-powerpc-linux-gnu
140 - name: Install riscv64 cross compiling packages
141 if: env.RISCV64 == 'true'
142 run: sudo apt install -y gcc-riscv64-linux-gnu libc6-dev-riscv64-cross
143 pkg-config-riscv64-linux-gnu
144 - name: Install test tools packages
145 if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RISCV64 != 'true' || env.RUN_TESTS == 'true'
146 run: sudo apt install -y gdb
147 - name: Install doc generation packages
148 if: env.BUILD_DOCS == 'true'
149 run: sudo apt install -y doxygen graphviz python3-sphinx
150 python3-sphinx-rtd-theme
154 # Workaround on $HOME permissions as EAL checks them for plugin loading
156 - name: Build and test
157 run: .ci/linux-build.sh
158 - name: Upload logs on failure
160 uses: actions/upload-artifact@v2
162 name: meson-logs-${{ join(matrix.config.*, '-') }}
166 build/meson-logs/meson-log.txt
167 build/meson-logs/testlog.txt
169 prepare-container-images:
170 name: ${{ join(matrix.config.*, '-') }}
171 runs-on: ubuntu-latest
180 - name: Generate various keys
183 echo -n '::set-output name=image::'
184 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
185 - name: Retrieve image cache
187 uses: actions/cache@v2
190 key: ${{ steps.get_keys.outputs.image }}
191 - name: Pull and prepare a fresh image
192 if: steps.image_cache.outputs.cache-hit != 'true'
194 docker pull registry.fedoraproject.org/${{ matrix.config.image }}
195 docker run -d -i --rm --name dpdk \
196 registry.fedoraproject.org/${{ matrix.config.image }} \
199 if: steps.image_cache.outputs.cache-hit != 'true'
200 run: docker exec -i dpdk dnf update -y
201 - name: Install packages
202 if: steps.image_cache.outputs.cache-hit != 'true'
203 run: docker exec -i dpdk dnf install -y ccache numactl-devel
204 python3-setuptools python3-wheel python3-pip python3-pyelftools
205 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
206 openssl-devel rdma-core-devel zlib-devel
207 - name: Save image in cache
208 if: steps.image_cache.outputs.cache-hit != 'true'
210 docker commit dpdk dpdk-local
212 docker save -o ~/.image/${{ matrix.config.image }}.tar dpdk-local
214 if: steps.image_cache.outputs.cache-hit != 'true'
215 run: docker kill dpdk
217 rpm-container-builds:
218 needs: prepare-container-images
219 name: ${{ join(matrix.config.*, '-') }}
220 runs-on: ubuntu-latest
240 - name: Checkout sources
241 uses: actions/checkout@v2
242 - name: Generate various keys
245 echo -n '::set-output name=ccache::'
246 echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W)
247 echo -n '::set-output name=image::'
248 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
249 echo -n '::set-output name=logs::'
250 echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':'
251 - name: Retrieve image cache
253 uses: actions/cache@v2
256 key: ${{ steps.get_keys.outputs.image }}
257 - name: Fail if no image (not supposed to happen)
258 if: steps.image_cache.outputs.cache-hit != 'true'
260 echo 'Image ${{ matrix.config.image }} is not cached.'
262 - name: Retrieve ccache cache
263 uses: actions/cache@v2
266 key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }}
268 ${{ steps.get_keys.outputs.ccache }}-refs/heads/main
269 - name: Prepare working directory
273 echo CC=ccache ${{ matrix.config.compiler }} >> ~/env
274 echo DEF_LIB=${{ matrix.config.library }} >> ~/env
275 - name: Load the cached image
277 docker load -i ~/.image/${{ matrix.config.image }}.tar
278 docker run -d -i --rm --name dpdk \
279 --mount type=bind,src=$HOME/.ccache,dst=/root/.ccache \
280 --mount type=bind,src=$(pwd),dst=/root/dpdk \
286 run: docker exec -i dpdk dnf update -y || true
287 - name: Install packages
288 run: docker exec -i dpdk dnf install -y ccache numactl-devel
289 python3-setuptools python3-wheel python3-pip python3-pyelftools
290 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
291 openssl-devel rdma-core-devel zlib-devel ${{ matrix.config.compiler }}
293 run: docker exec -i dpdk .ci/linux-setup.sh
295 run: docker exec -i dpdk .ci/linux-build.sh
297 run: docker kill dpdk
298 - name: Upload logs on failure
300 uses: actions/upload-artifact@v2
302 name: ${{ steps.get_keys.outputs.logs }}
305 build/meson-logs/meson-log.txt