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 BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
20 BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
21 CC: ccache ${{ matrix.config.compiler }}
22 DEF_LIB: ${{ matrix.config.library }}
23 LIBABIGAIL_VERSION: libabigail-1.8
24 MINI: ${{ matrix.config.mini != '' }}
25 PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
27 RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
55 # Note: common/cnxk is disabled for Ubuntu 18.04
56 # https://bugs.dpdk.org/show_bug.cgi?id=697
75 - name: Checkout sources
76 uses: actions/checkout@v2
77 - name: Generate cache keys
80 echo -n '::set-output name=ccache::'
81 echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
82 echo -n '::set-output name=libabigail::'
83 echo 'libabigail-${{ matrix.config.os }}'
84 echo -n '::set-output name=abi::'
85 echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
86 - name: Retrieve ccache cache
87 uses: actions/cache@v2
90 key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
92 ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
93 - name: Retrieve libabigail cache
95 uses: actions/cache@v2
96 if: env.ABI_CHECKS == 'true'
99 key: ${{ steps.get_ref_keys.outputs.libabigail }}
100 - name: Retrieve ABI reference cache
101 uses: actions/cache@v2
102 if: env.ABI_CHECKS == 'true'
105 key: ${{ steps.get_ref_keys.outputs.abi }}
106 - name: Update APT cache
107 run: sudo apt update || true
108 - name: Install packages
109 run: sudo apt install -y ccache libnuma-dev python3-setuptools
110 python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
111 libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
113 - name: Install libabigail build dependencies if no cache is available
114 if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
115 run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
117 - name: Install i386 cross compiling packages
118 if: env.BUILD_32BIT == 'true'
119 run: sudo apt install -y gcc-multilib g++-multilib
120 - name: Install aarch64 cross compiling packages
121 if: env.AARCH64 == 'true'
122 run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
123 pkg-config-aarch64-linux-gnu
124 - name: Install ppc64le cross compiling packages
125 if: env.PPC64LE == 'true'
126 run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
127 pkg-config-powerpc-linux-gnu
128 - name: Install test tools packages
129 if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RUN_TESTS == 'true'
130 run: sudo apt install -y gdb
131 - name: Install doc generation packages
132 if: env.BUILD_DOCS == 'true'
133 run: sudo apt install -y doxygen graphviz python3-sphinx
134 python3-sphinx-rtd-theme
138 # Workaround on $HOME permissions as EAL checks them for plugin loading
140 - name: Build and test
141 run: .ci/linux-build.sh
142 - name: Upload logs on failure
144 uses: actions/upload-artifact@v2
146 name: meson-logs-${{ join(matrix.config.*, '-') }}
150 build/meson-logs/meson-log.txt
151 build/meson-logs/testlog.txt
153 prepare-container-images:
154 name: ${{ join(matrix.config.*, '-') }}
155 runs-on: ubuntu-latest
164 - name: Generate various keys
167 echo -n '::set-output name=image::'
168 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
169 - name: Retrieve image cache
171 uses: actions/cache@v2
174 key: ${{ steps.get_keys.outputs.image }}
175 - name: Pull and prepare a fresh image
176 if: steps.image_cache.outputs.cache-hit != 'true'
178 docker pull registry.fedoraproject.org/${{ matrix.config.image }}
179 docker run -d -i --rm --name dpdk \
180 registry.fedoraproject.org/${{ matrix.config.image }} \
183 if: steps.image_cache.outputs.cache-hit != 'true'
184 run: docker exec -i dpdk dnf update -y
185 - name: Install packages
186 if: steps.image_cache.outputs.cache-hit != 'true'
187 run: docker exec -i dpdk dnf install -y ccache numactl-devel
188 python3-setuptools python3-wheel python3-pip python3-pyelftools
189 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
190 openssl-devel rdma-core-devel zlib-devel
191 - name: Save image in cache
192 if: steps.image_cache.outputs.cache-hit != 'true'
194 docker commit dpdk dpdk-local
196 docker save -o ~/.image/${{ matrix.config.image }}.tar dpdk-local
198 if: steps.image_cache.outputs.cache-hit != 'true'
199 run: docker kill dpdk
201 rpm-container-builds:
202 needs: prepare-container-images
203 name: ${{ join(matrix.config.*, '-') }}
204 runs-on: ubuntu-latest
224 - name: Checkout sources
225 uses: actions/checkout@v2
226 - name: Generate various keys
229 echo -n '::set-output name=ccache::'
230 echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W)
231 echo -n '::set-output name=image::'
232 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
233 echo -n '::set-output name=logs::'
234 echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':'
235 - name: Retrieve image cache
237 uses: actions/cache@v2
240 key: ${{ steps.get_keys.outputs.image }}
241 - name: Fail if no image (not supposed to happen)
242 if: steps.image_cache.outputs.cache-hit != 'true'
244 echo 'Image ${{ matrix.config.image }} is not cached.'
246 - name: Retrieve ccache cache
247 uses: actions/cache@v2
250 key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }}
252 ${{ steps.get_keys.outputs.ccache }}-refs/heads/main
253 - name: Prepare working directory
257 echo CC=ccache ${{ matrix.config.compiler }} >> ~/env
258 echo DEF_LIB=${{ matrix.config.library }} >> ~/env
259 - name: Load the cached image
261 docker load -i ~/.image/${{ matrix.config.image }}.tar
262 docker run -d -i --rm --name dpdk \
263 --mount type=bind,src=$HOME/.ccache,dst=/root/.ccache \
264 --mount type=bind,src=$(pwd),dst=/root/dpdk \
270 run: docker exec -i dpdk dnf update -y || true
271 - name: Install packages
272 run: docker exec -i dpdk dnf install -y ccache numactl-devel
273 python3-setuptools python3-wheel python3-pip python3-pyelftools
274 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
275 openssl-devel rdma-core-devel zlib-devel ${{ matrix.config.compiler }}
277 run: docker exec -i dpdk .ci/linux-setup.sh
279 run: docker exec -i dpdk .ci/linux-build.sh
281 run: docker kill dpdk
282 - name: Upload logs on failure
284 uses: actions/upload-artifact@v2
286 name: ${{ steps.get_keys.outputs.logs }}
289 build/meson-logs/meson-log.txt