|
66 | 66 | type=semver,pattern={{major}}.{{minor}} |
67 | 67 | type=semver,pattern={{major}} |
68 | 68 | type=sha |
| 69 | + type=raw,value=devel,suffix=-amd64 |
69 | 70 | - |
70 | 71 | name: Set up Docker Buildx |
71 | 72 | uses: docker/setup-buildx-action@v3 |
@@ -107,8 +108,6 @@ jobs: |
107 | 108 | cat /etc/debian_version |
108 | 109 | uname -a |
109 | 110 | make test-app |
110 | | - # make test-zlib |
111 | | - # make test-openssl |
112 | 111 | - |
113 | 112 | # Temp fix |
114 | 113 | # https://github.com/docker/build-push-action/issues/252 |
@@ -167,6 +166,7 @@ jobs: |
167 | 166 | type=semver,pattern={{major}}.{{minor}} |
168 | 167 | type=semver,pattern={{major}} |
169 | 168 | type=sha |
| 169 | + type=raw,value=devel,suffix=-arm64 |
170 | 170 | - |
171 | 171 | name: Set up Docker Buildx |
172 | 172 | uses: docker/setup-buildx-action@v3 |
@@ -208,8 +208,212 @@ jobs: |
208 | 208 | cat /etc/debian_version |
209 | 209 | uname -a |
210 | 210 | make test-app |
211 | | - # make test-zlib |
212 | | - # make test-openssl |
| 211 | + - |
| 212 | + # Temp fix |
| 213 | + # https://github.com/docker/build-push-action/issues/252 |
| 214 | + # https://github.com/moby/buildkit/issues/1896 |
| 215 | + name: Move cache |
| 216 | + run: | |
| 217 | + rm -rf /tmp/.buildx-cache |
| 218 | + mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
| 219 | +
|
| 220 | + docker-amd64-libs: |
| 221 | + needs: |
| 222 | + - docker-amd64 |
| 223 | + name: Docker test libs (amd64) |
| 224 | + runs-on: ubuntu-22.04 |
| 225 | + services: |
| 226 | + registry: |
| 227 | + image: registry:2 |
| 228 | + ports: |
| 229 | + - 5000:5000 |
| 230 | + steps: |
| 231 | + - |
| 232 | + name: Checkout |
| 233 | + uses: actions/checkout@v4 |
| 234 | + with: |
| 235 | + fetch-depth: 1 |
| 236 | + # https://github.com/actions/runner-images/issues/2840 |
| 237 | + - name: Free disk space |
| 238 | + run: | |
| 239 | + sudo rm -rf /opt/ghc |
| 240 | + sudo rm -rf /usr/share/dotnet |
| 241 | + sudo rm -rf /usr/local/lib/android |
| 242 | + sudo rm -rf "/usr/local/share/boost" |
| 243 | + - |
| 244 | + name: Cache Docker layers |
| 245 | + uses: actions/cache@v4 |
| 246 | + with: |
| 247 | + path: /tmp/.buildx-cache |
| 248 | + key: rust-linux-darwin-builder-amd64-libs-buildx-${{ github.sha }} |
| 249 | + restore-keys: | |
| 250 | + rust-linux-darwin-builder-amd64-libs-buildx- |
| 251 | + - |
| 252 | + name: Set up QEMU |
| 253 | + uses: docker/setup-qemu-action@v3 |
| 254 | + - |
| 255 | + name: Docker meta |
| 256 | + id: meta |
| 257 | + uses: docker/metadata-action@v5 |
| 258 | + with: |
| 259 | + images: ${{ env.DOCKER_IMAGE }} |
| 260 | + flavor: | |
| 261 | + latest=false |
| 262 | + suffix=-amd64-libs |
| 263 | + tags: | |
| 264 | + type=schedule |
| 265 | + type=ref,event=branch |
| 266 | + type=ref,event=pr |
| 267 | + type=semver,pattern={{version}} |
| 268 | + type=semver,pattern={{major}}.{{minor}} |
| 269 | + type=semver,pattern={{major}} |
| 270 | + type=sha |
| 271 | + - |
| 272 | + name: Set up Docker Buildx |
| 273 | + uses: docker/setup-buildx-action@v3 |
| 274 | + with: |
| 275 | + driver-opts: network=host |
| 276 | + - |
| 277 | + name: Build and export to Docker client |
| 278 | + uses: docker/build-push-action@v6 |
| 279 | + with: |
| 280 | + context: . |
| 281 | + platforms: linux/amd64 |
| 282 | + file: docker/amd64/libs/Dockerfile |
| 283 | + load: true |
| 284 | + tags: ${{ steps.meta.outputs.tags }} |
| 285 | + labels: ${{ steps.meta.outputs.labels }} |
| 286 | + build-args: | |
| 287 | + VERSION=0.0.0 |
| 288 | + BASE_IMAGE=${{ env.DOCKER_IMAGE }}:devel-amd64 |
| 289 | + push: ${{ github.event_name != 'pull_request' }} |
| 290 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 291 | + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max |
| 292 | + - |
| 293 | + name: Inspect image |
| 294 | + run: | |
| 295 | + docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} |
| 296 | + - |
| 297 | + name: Check manifest |
| 298 | + if: github.event_name != 'pull_request' |
| 299 | + run: | |
| 300 | + docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} |
| 301 | + - |
| 302 | + name: Run tests |
| 303 | + uses: addnab/docker-run-action@v3 |
| 304 | + with: |
| 305 | + image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}" |
| 306 | + shell: bash |
| 307 | + options: -v ${{ github.workspace }}:/root/src |
| 308 | + run: | |
| 309 | + set -eux |
| 310 | + cat /etc/debian_version |
| 311 | + uname -a |
| 312 | + make test-app |
| 313 | + make test-zlib |
| 314 | + make test-openssl |
| 315 | + - |
| 316 | + # Temp fix |
| 317 | + # https://github.com/docker/build-push-action/issues/252 |
| 318 | + # https://github.com/moby/buildkit/issues/1896 |
| 319 | + name: Move cache |
| 320 | + run: | |
| 321 | + rm -rf /tmp/.buildx-cache |
| 322 | + mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
| 323 | +
|
| 324 | + docker-arm64-libs: |
| 325 | + name: Docker test libs (arm64) |
| 326 | + runs-on: ubuntu-22.04-arm |
| 327 | + services: |
| 328 | + registry: |
| 329 | + image: registry:2 |
| 330 | + ports: |
| 331 | + - 5000:5000 |
| 332 | + steps: |
| 333 | + - |
| 334 | + name: Checkout |
| 335 | + uses: actions/checkout@v4 |
| 336 | + with: |
| 337 | + fetch-depth: 1 |
| 338 | + # https://github.com/actions/runner-images/issues/2840 |
| 339 | + - name: Free disk space |
| 340 | + run: | |
| 341 | + sudo rm -rf /opt/ghc |
| 342 | + sudo rm -rf /usr/share/dotnet |
| 343 | + sudo rm -rf /usr/local/lib/android |
| 344 | + sudo rm -rf "/usr/local/share/boost" |
| 345 | + - |
| 346 | + name: Cache Docker layers |
| 347 | + uses: actions/cache@v4 |
| 348 | + with: |
| 349 | + path: /tmp/.buildx-cache |
| 350 | + key: rust-linux-darwin-builder-arm64-libs-buildx-${{ github.sha }} |
| 351 | + restore-keys: | |
| 352 | + rust-linux-darwin-builder-arm64-libs-buildx- |
| 353 | + - |
| 354 | + name: Set up QEMU |
| 355 | + uses: docker/setup-qemu-action@v3 |
| 356 | + - |
| 357 | + name: Docker meta |
| 358 | + id: meta |
| 359 | + uses: docker/metadata-action@v5 |
| 360 | + with: |
| 361 | + images: ${{ env.DOCKER_IMAGE }} |
| 362 | + flavor: | |
| 363 | + latest=false |
| 364 | + suffix=-arm64-libs |
| 365 | + tags: | |
| 366 | + type=schedule |
| 367 | + type=ref,event=branch |
| 368 | + type=ref,event=pr |
| 369 | + type=semver,pattern={{version}} |
| 370 | + type=semver,pattern={{major}}.{{minor}} |
| 371 | + type=semver,pattern={{major}} |
| 372 | + type=sha |
| 373 | + - |
| 374 | + name: Set up Docker Buildx |
| 375 | + uses: docker/setup-buildx-action@v3 |
| 376 | + with: |
| 377 | + driver-opts: network=host |
| 378 | + - |
| 379 | + name: Build and export to Docker client |
| 380 | + uses: docker/build-push-action@v6 |
| 381 | + with: |
| 382 | + context: . |
| 383 | + platforms: linux/arm64 |
| 384 | + file: docker/arm64/base/Dockerfile |
| 385 | + load: true |
| 386 | + tags: ${{ steps.meta.outputs.tags }} |
| 387 | + labels: ${{ steps.meta.outputs.labels }} |
| 388 | + build-args: | |
| 389 | + VERSION=0.0.0 |
| 390 | + BASE_IMAGE=${{ env.DOCKER_IMAGE }}:devel-arm64 |
| 391 | + push: ${{ github.event_name != 'pull_request' }} |
| 392 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 393 | + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max |
| 394 | + - |
| 395 | + name: Inspect image |
| 396 | + run: | |
| 397 | + docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} |
| 398 | + - |
| 399 | + name: Check manifest |
| 400 | + if: github.event_name != 'pull_request' |
| 401 | + run: | |
| 402 | + docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} |
| 403 | + - |
| 404 | + name: Run tests |
| 405 | + uses: addnab/docker-run-action@v3 |
| 406 | + with: |
| 407 | + image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}" |
| 408 | + shell: bash |
| 409 | + options: -v ${{ github.workspace }}:/root/src |
| 410 | + run: | |
| 411 | + set -eux |
| 412 | + cat /etc/debian_version |
| 413 | + uname -a |
| 414 | + make test-app |
| 415 | + make test-zlib |
| 416 | + make test-openssl |
213 | 417 | - |
214 | 418 | # Temp fix |
215 | 419 | # https://github.com/docker/build-push-action/issues/252 |
|
0 commit comments