ci: test the built images

This commit is contained in:
Amin Yahyaabadi 2024-03-24 00:23:24 -07:00
parent d6950a396f
commit 85853d5f3a
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
4 changed files with 19 additions and 11 deletions

View File

@ -55,7 +55,7 @@ jobs:
- name: Build - name: Build
run: | run: |
pnpm build pnpm build
pnpm build.docker_tests pnpm build.docker-ci
- name: Lint - name: Lint
run: | run: |
@ -229,12 +229,12 @@ jobs:
pnpm: pnpm:
- 8 - 8
container: container:
- { file: "./dev/docker/ci/ubuntu-llvm.dockerfile", image: "setup-cpp-ubuntu-llvm", tag: "22.04-17" } - { file: "ubuntu-llvm.dockerfile", image: "setup-cpp-ubuntu-llvm", tag: "22.04-17" }
- { file: "./dev/docker/ci/fedora-llvm.dockerfile", image: "setup-cpp-fedora-llvm", tag: "40-17" } - { file: "fedora-llvm.dockerfile", image: "setup-cpp-fedora-llvm", tag: "40-17" }
- { file: "./dev/docker/ci/arch-llvm.dockerfile", image: "setup-cpp-arch-llvm", tag: "base-17" } - { file: "arch-llvm.dockerfile", image: "setup-cpp-arch-llvm", tag: "base-17" }
- { file: "./dev/docker/ci/ubuntu-mingw.dockerfile", image: "setup-cpp-ubuntu-mingw", tag: "22.04-13" } - { file: "ubuntu-mingw.dockerfile", image: "setup-cpp-ubuntu-mingw", tag: "22.04-13" }
# - { file: "./dev/docker/ci/fedora-mingw.dockerfile", image: "setup-cpp-fedora-mingw", tag: "40-13" } # - { file: "fedora-mingw.dockerfile", image: "setup-cpp-fedora-mingw", tag: "40-13" }
# - { file: "./dev/docker/ci/arch-mingw.dockerfile", image: "setup-cpp-arch-mingw", tag: "base-13" } # - { file: "arch-mingw.dockerfile", image: "setup-cpp-arch-mingw", tag: "base-13" }
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -256,10 +256,18 @@ jobs:
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ${{ matrix.container.file }} file: ./dev/docker/ci/${{ matrix.container.file }}
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.container.image }}:${{ matrix.container.tag }} tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.container.image }}:${{ matrix.container.tag }}
- name: Test
uses: docker/build-push-action@v5
with:
context: .
file: ./dev/docker/examples/${{ matrix.container.file }}
push: false
tags: ${{ vars.DOCKERHUB_USERNAME }}/test-${{ matrix.container.image }}:${{ matrix.container.tag }}
Release: Release:
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
needs: [Build, BuildExecutable, Test, Docker] needs: [Build, BuildExecutable, Test, Docker]

View File

@ -1,5 +1,5 @@
#### Building (example) #### Building (example)
FROM setup-cpp-arch AS builder FROM setup-cpp-arch-llvm AS builder
COPY ./dev/cpp_vcpkg_project /home/app COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app WORKDIR /home/app

View File

@ -1,5 +1,5 @@
#### Building (example) #### Building (example)
FROM setup-cpp-fedora AS builder FROM setup-cpp-fedora-llvm AS builder
COPY ./dev/cpp_vcpkg_project /home/app COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app WORKDIR /home/app

View File

@ -1,5 +1,5 @@
#### Building (example) #### Building (example)
FROM setup-cpp-ubuntu AS builder FROM setup-cpp-ubuntu-llvm AS builder
COPY ./dev/cpp_vcpkg_project /home/app COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app WORKDIR /home/app