Skip to content

Commit 623beb0

Browse files
committed
feat: add Mingw docker images and test them
1 parent 7ccf39e commit 623beb0

19 files changed

+157
-19
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ jobs:
143143
- "arch.dockerfile"
144144
- "fedora.dockerfile"
145145
- "ubuntu.dockerfile"
146+
- "arch-mingw.dockerfile"
147+
- "fedora-mingw.dockerfile"
148+
- "ubuntu-mingw.dockerfile"
146149
steps:
147150
- uses: actions/checkout@v3
148151
with:

dev/docker/__tests__/arch.mingw.dockerfile renamed to dev/docker/__tests__/arch-mingw.dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN pacman -Syuu --noconfirm && \
2121
--gcovr true \
2222
--doxygen true \
2323
--ccache true \
24-
--powerchell true && \
24+
--powershell true && \
2525
# arch cleanup
2626
pacman -Scc --noconfirm && \
2727
rm -rf /var/cache/pacman/pkg/* && \
@@ -30,10 +30,9 @@ RUN pacman -Syuu --noconfirm && \
3030
ENTRYPOINT ["/bin/bash"]
3131

3232
#### Cross Building (example)
33-
FROM setup-cpp-arch-mingw AS builder
33+
FROM setup-cpp-arch-mingw AS builder-mingw
3434

3535
COPY ./dev/cpp_vcpkg_project /home/app
3636
WORKDIR /home/app
3737
RUN bash -c 'source ~/.cpprc \
3838
&& task build_cross_mingw'
39-

dev/docker/__tests__/arch.dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,11 @@ FROM archlinux:base as runner
4444
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
4545
WORKDIR /home/app/
4646
ENTRYPOINT ["./my_exe"]
47+
48+
#### Cross Building (example)
49+
FROM setup-cpp-arch-mingw AS builder-mingw
50+
51+
COPY ./dev/cpp_vcpkg_project /home/app
52+
WORKDIR /home/app
53+
RUN bash -c 'source ~/.cpprc \
54+
&& task build_cross_mingw'

dev/docker/__tests__/fedora.mingw.dockerfile renamed to dev/docker/__tests__/fedora-mingw.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ RUN dnf -y install nodejs npm && \
1919
--gcovr true \
2020
--doxygen true \
2121
--ccache true \
22-
--powerchell true && \
22+
--powershell true && \
2323
# cleanup
2424
dnf clean all && \
2525
rm -rf /tmp/*
2626

2727
ENTRYPOINT ["/bin/bash"]
2828

29-
#### Building (example)
30-
FROM setup-cpp-fedora AS builder
29+
#### Cross Building (example)
30+
FROM setup-cpp-fedora-mingw AS builder-mingw
3131

3232
COPY ./dev/cpp_vcpkg_project /home/app
3333
WORKDIR /home/app

dev/docker/__tests__/fedora.dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,11 @@ FROM fedora:38 as runner
4141
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
4242
WORKDIR /home/app/
4343
ENTRYPOINT ["./my_exe"]
44+
45+
#### Cross Building (example)
46+
FROM setup-cpp-fedora-mingw AS builder-mingw
47+
48+
COPY ./dev/cpp_vcpkg_project /home/app
49+
WORKDIR /home/app
50+
RUN bash -c 'source ~/.cpprc \
51+
&& task build_cross_mingw'

dev/scripts/generate-docker-tests.mjs renamed to dev/docker/__tests__/generate-docker-tests.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { readFile, writeFile } from "fs/promises"
22

33
async function main() {
4-
const dockerFiles = ["ubuntu", "arch", "fedora"]
4+
const dockerFiles = ["ubuntu", "arch", "fedora", "ubuntu-mingw", "arch-mingw", "fedora-mingw"]
55
await Promise.all(
66
dockerFiles.map(async (dockerFile) => {
77
const dockerFileContent = await readFile(`./dev/docker/setup-cpp-${dockerFile}.dockerfile`, "utf-8")

dev/docker/__tests__/ubuntu.mingw.dockerfile renamed to dev/docker/__tests__/ubuntu-mingw.dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apt-get update -qq && \
2121
--gcovr true \
2222
--doxygen true \
2323
--ccache true \
24-
--powerchell true && \
24+
--powershell true && \
2525
# cleanup
2626
nala autoremove -y && \
2727
nala autopurge -y && \
@@ -33,10 +33,9 @@ RUN apt-get update -qq && \
3333
ENTRYPOINT ["/bin/bash"]
3434

3535
#### Cross Building (example)
36-
FROM setup-cpp-ubuntu-mingw AS builder
36+
FROM setup-cpp-ubuntu-mingw AS builder-mingw
3737

3838
COPY ./dev/cpp_vcpkg_project /home/app
3939
WORKDIR /home/app
4040
RUN bash -c 'source ~/.cpprc \
4141
&& task build_cross_mingw'
42-

0 commit comments

Comments
 (0)