From ae58022c4b95484a76b1802c08cfa9084b230643 Mon Sep 17 00:00:00 2001 From: abeimler Date: Fri, 30 Dec 2022 00:12:00 +0100 Subject: [PATCH] fix: fedora docker builds --- dev/container-tests/arch.mingw.yml | 7 ++----- dev/container-tests/fedora.mingw.yml | 7 ++----- dev/docker/arch_node.mingw.dockerfile | 12 +----------- dev/docker/fedora_node.mingw.dockerfile | 12 +----------- dev/docker/ubuntu_node.mingw.dockerfile | 8 -------- 5 files changed, 6 insertions(+), 40 deletions(-) diff --git a/dev/container-tests/arch.mingw.yml b/dev/container-tests/arch.mingw.yml index 502707c2..ec6c2db8 100644 --- a/dev/container-tests/arch.mingw.yml +++ b/dev/container-tests/arch.mingw.yml @@ -2,11 +2,11 @@ schemaVersion: 2.0.0 commandTests: - name: mingw c compiler - command: $CC + command: x86_64-w64-mingw32-gcc args: ["--version"] expectedOutput: [".*x86_64-w64-mingw32-gcc.*"] - name: mingw c++ compiler - command: $CXX + command: x86_64-w64-mingw32-g++ args: ["--version"] expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"] - name: powershell @@ -18,9 +18,6 @@ fileExistenceTests: - name: "vcpkg" path: "/root/vcpkg" shouldExist: true - - name: "cmake toolchain" - path: "/home/cmake/toolchains/x86_64-w64-mingw32.toolchain.cmake" - shouldExist: true - name: "cross root" path: "/usr/x86_64-w64-mingw32" shouldExist: true diff --git a/dev/container-tests/fedora.mingw.yml b/dev/container-tests/fedora.mingw.yml index 0db3e37f..9c87ad1b 100644 --- a/dev/container-tests/fedora.mingw.yml +++ b/dev/container-tests/fedora.mingw.yml @@ -2,11 +2,11 @@ schemaVersion: 2.0.0 commandTests: - name: mingw c compiler - command: $CC + command: x86_64-w64-mingw32-gcc args: ["--version"] expectedOutput: [".*x86_64-w64-mingw32-gcc.*"] - name: mingw c++ compiler - command: $CXX + command: x86_64-w64-mingw32-cpp args: ["--version"] expectedOutput: [".*x86_64-w64-mingw32-cpp.*"] - name: powershell @@ -18,9 +18,6 @@ fileExistenceTests: - name: "vcpkg" path: "/root/vcpkg" shouldExist: true - - name: "cmake toolchain" - path: "/home/cmake/toolchains/x86_64-w64-mingw32.toolchain.cmake" - shouldExist: true - name: "cross root" path: "/usr/x86_64-w64-mingw32" shouldExist: true diff --git a/dev/docker/arch_node.mingw.dockerfile b/dev/docker/arch_node.mingw.dockerfile index 0570a69f..bfaf0480 100644 --- a/dev/docker/arch_node.mingw.dockerfile +++ b/dev/docker/arch_node.mingw.dockerfile @@ -42,20 +42,10 @@ RUN rm -rf /tmp/* CMD source ~/.cpprc ENTRYPOINT [ "/bin/bash" ] -## setup vcpkg env. (triplets) -## https://github.com/microsoft/vcpkg/blob/master/docs/users/mingw.md -ENV VCPKG_DEFAULT_HOST_TRIPLET "x64-linux" -ENV VCPKG_DEFAULT_TRIPLET "x64-mingw-dynamic" -ENV CC "x86_64-w64-mingw32-gcc" -ENV CXX "x86_64-w64-mingw32-g++" - -# TODO: better setup for cmake toolchains ? -COPY ./dev/cmake/x86_64-w64-mingw32.toolchain.cmake /home/cmake/toolchains/x86_64-w64-mingw32.toolchain.cmake - #### Building FROM base AS builder COPY ./dev/cpp_vcpkg_project /home/app WORKDIR /home/app RUN bash -c 'source ~/.cpprc \ - && task cross_build_mingw' + && task build_cross_mingw' diff --git a/dev/docker/fedora_node.mingw.dockerfile b/dev/docker/fedora_node.mingw.dockerfile index ae3a3328..a80b325a 100644 --- a/dev/docker/fedora_node.mingw.dockerfile +++ b/dev/docker/fedora_node.mingw.dockerfile @@ -20,19 +20,9 @@ RUN rm -rf /tmp/* CMD source ~/.cpprc ENTRYPOINT [ "/bin/bash" ] -## setup vcpkg env. (triplets) -## https://github.com/microsoft/vcpkg/blob/master/docs/users/mingw.md -ENV VCPKG_DEFAULT_HOST_TRIPLET "x64-linux" -ENV VCPKG_DEFAULT_TRIPLET "x64-mingw-dynamic" -ENV CC "x86_64-w64-mingw32-gcc" -ENV CXX "x86_64-w64-mingw32-cpp" - -# TODO: better setup for cmake toolchains ? -COPY ./dev/cmake/x86_64-w64-mingw32.toolchain.cmake /home/cmake/toolchains/x86_64-w64-mingw32.toolchain.cmake - #### Building FROM base AS builder COPY ./dev/cpp_vcpkg_project /home/app WORKDIR /home/app RUN bash -c 'source ~/.cpprc \ - && task cross_build_mingw' + && task build_cross_mingw' diff --git a/dev/docker/ubuntu_node.mingw.dockerfile b/dev/docker/ubuntu_node.mingw.dockerfile index bc10b11a..1c3f58d5 100644 --- a/dev/docker/ubuntu_node.mingw.dockerfile +++ b/dev/docker/ubuntu_node.mingw.dockerfile @@ -17,14 +17,6 @@ RUN rm -rf /tmp/* CMD source ~/.cpprc ENTRYPOINT [ "/bin/bash" ] -## setup vcpkg env. (triplets) -## https://github.com/microsoft/vcpkg/blob/master/docs/users/mingw.md -#ENV VCPKG_DEFAULT_HOST_TRIPLET "x64-linux" -#ENV VCPKG_DEFAULT_TRIPLET "x64-mingw-dynamic" -#ENV CC "x86_64-w64-mingw32-gcc" -#ENV CXX "x86_64-w64-mingw32-g++" -## use project_options cross-compiling to setup triplets ... - #### Building FROM base AS builder COPY ./dev/cpp_vcpkg_project /home/app