Skip to content

Commit

Permalink
ci: test the built images
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Mar 24, 2024
1 parent d6950a3 commit 54e5e80
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ jobs:
pnpm:
- 8
container:
- { file: "./dev/docker/ci/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: "./dev/docker/ci/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: "./dev/docker/ci/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: "ubuntu-llvm.dockerfile", image: "setup-cpp-ubuntu-llvm", tag: "22.04-17" }
- { file: "fedora-llvm.dockerfile", image: "setup-cpp-fedora-llvm", tag: "40-17" }
- { file: "arch-llvm.dockerfile", image: "setup-cpp-arch-llvm", tag: "base-17" }
- { file: "ubuntu-mingw.dockerfile", image: "setup-cpp-ubuntu-mingw", tag: "22.04-13" }
# - { file: "fedora-mingw.dockerfile", image: "setup-cpp-fedora-mingw", tag: "40-13" }
# - { file: "arch-mingw.dockerfile", image: "setup-cpp-arch-mingw", tag: "base-13" }
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -256,10 +256,18 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.container.file }}
file: ./dev/docker/ci/${{ matrix.container.file }}
push: ${{ github.event_name != 'pull_request' }}
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:
if: startsWith(github.ref, 'refs/tags/')
needs: [Build, BuildExecutable, Test, Docker]
Expand Down
2 changes: 1 addition & 1 deletion dev/docker/examples/arch.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Building (example)
FROM setup-cpp-arch AS builder
FROM setup-cpp-arch-llvm AS builder

COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
Expand Down
2 changes: 1 addition & 1 deletion dev/docker/examples/fedora.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Building (example)
FROM setup-cpp-fedora AS builder
FROM setup-cpp-fedora-llvm AS builder

COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
Expand Down
2 changes: 1 addition & 1 deletion dev/docker/examples/ubuntu.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Building (example)
FROM setup-cpp-ubuntu AS builder
FROM setup-cpp-ubuntu-llvm AS builder

COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
Expand Down

0 comments on commit 54e5e80

Please sign in to comment.