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') }}
73 - name: Checkout sources
74 uses: actions/checkout@v2
75 - name: Generate cache keys
78 echo -n '::set-output name=ccache::'
79 echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
80 echo -n '::set-output name=libabigail::'
81 echo 'libabigail-${{ matrix.config.os }}'
82 echo -n '::set-output name=abi::'
83 echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
84 - name: Retrieve ccache cache
85 uses: actions/cache@v2
88 key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
90 ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
91 - name: Retrieve libabigail cache
93 uses: actions/cache@v2
94 if: env.ABI_CHECKS == 'true'
97 key: ${{ steps.get_ref_keys.outputs.libabigail }}
98 - name: Retrieve ABI reference cache
99 uses: actions/cache@v2
100 if: env.ABI_CHECKS == 'true'
103 key: ${{ steps.get_ref_keys.outputs.abi }}
104 - name: Update APT cache
105 run: sudo apt update || true
106 - name: Install packages
107 run: sudo apt install -y ccache libnuma-dev python3-setuptools
108 python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev
109 libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
111 - name: Install libabigail build dependencies if no cache is available
112 if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
113 run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
115 - name: Install i386 cross compiling packages
116 if: env.BUILD_32BIT == 'true'
117 run: sudo apt install -y gcc-multilib g++-multilib
118 - name: Install aarch64 cross compiling packages
119 if: env.AARCH64 == 'true'
120 run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
121 pkg-config-aarch64-linux-gnu
122 - name: Install ppc64le cross compiling packages
123 if: env.PPC64LE == 'true'
124 run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
125 pkg-config-powerpc-linux-gnu
126 - name: Install test tools packages
127 if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RUN_TESTS == 'true'
128 run: sudo apt install -y gdb
129 - name: Install doc generation packages
130 if: env.BUILD_DOCS == 'true'
131 run: sudo apt install -y doxygen graphviz python3-sphinx
132 python3-sphinx-rtd-theme
136 # Workaround on $HOME permissions as EAL checks them for plugin loading
138 - name: Build and test
139 run: .ci/linux-build.sh
140 - name: Upload logs on failure
142 uses: actions/upload-artifact@v2
144 name: meson-logs-${{ join(matrix.config.*, '-') }}
148 build/meson-logs/meson-log.txt
149 build/meson-logs/testlog.txt
151 prepare-container-images:
152 name: ${{ join(matrix.config.*, '-') }}
153 runs-on: ubuntu-latest
162 - name: Generate various keys
165 echo -n '::set-output name=image::'
166 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
167 - name: Retrieve image cache
169 uses: actions/cache@v2
172 key: ${{ steps.get_keys.outputs.image }}
173 - name: Pull and prepare a fresh image
174 if: steps.image_cache.outputs.cache-hit != 'true'
176 docker pull registry.fedoraproject.org/${{ matrix.config.image }}
177 docker run -d -i --rm --name dpdk \
178 registry.fedoraproject.org/${{ matrix.config.image }} \
181 if: steps.image_cache.outputs.cache-hit != 'true'
182 run: docker exec -i dpdk dnf update -y
183 - name: Install packages
184 if: steps.image_cache.outputs.cache-hit != 'true'
185 run: docker exec -i dpdk dnf install -y ccache numactl-devel
186 python3-setuptools python3-wheel python3-pip python3-pyelftools
187 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
188 openssl-devel rdma-core-devel zlib-devel
189 - name: Save image in cache
190 if: steps.image_cache.outputs.cache-hit != 'true'
192 docker commit dpdk dpdk-local
194 docker save -o ~/.image/${{ matrix.config.image }}.tar dpdk-local
196 if: steps.image_cache.outputs.cache-hit != 'true'
197 run: docker kill dpdk
199 rpm-container-builds:
200 needs: prepare-container-images
201 name: ${{ join(matrix.config.*, '-') }}
202 runs-on: ubuntu-latest
222 - name: Checkout sources
223 uses: actions/checkout@v2
224 - name: Generate various keys
227 echo -n '::set-output name=ccache::'
228 echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W)
229 echo -n '::set-output name=image::'
230 echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
231 echo -n '::set-output name=logs::'
232 echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':'
233 - name: Retrieve image cache
235 uses: actions/cache@v2
238 key: ${{ steps.get_keys.outputs.image }}
239 - name: Fail if no image (not supposed to happen)
240 if: steps.image_cache.outputs.cache-hit != 'true'
242 echo 'Image ${{ matrix.config.image }} is not cached.'
244 - name: Retrieve ccache cache
245 uses: actions/cache@v2
248 key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }}
250 ${{ steps.get_keys.outputs.ccache }}-refs/heads/main
251 - name: Prepare working directory
255 echo CC=ccache ${{ matrix.config.compiler }} >> ~/env
256 echo DEF_LIB=${{ matrix.config.library }} >> ~/env
257 - name: Load the cached image
259 docker load -i ~/.image/${{ matrix.config.image }}.tar
260 docker run -d -i --rm --name dpdk \
261 --mount type=bind,src=$HOME/.ccache,dst=/root/.ccache \
262 --mount type=bind,src=$(pwd),dst=/root/dpdk \
268 run: docker exec -i dpdk dnf update -y || true
269 - name: Install packages
270 run: docker exec -i dpdk dnf install -y ccache numactl-devel
271 python3-setuptools python3-wheel python3-pip python3-pyelftools
272 ninja-build libatomic libbpf-devel libfdt-devel libpcap-devel
273 openssl-devel rdma-core-devel zlib-devel ${{ matrix.config.compiler }}
275 run: docker exec -i dpdk .ci/linux-setup.sh
277 run: docker exec -i dpdk .ci/linux-build.sh
279 run: docker kill dpdk
280 - name: Upload logs on failure
282 uses: actions/upload-artifact@v2
284 name: ${{ steps.get_keys.outputs.logs }}
287 build/meson-logs/meson-log.txt