fix: fedora docker builds

This commit is contained in:
abeimler 2022-12-30 00:12:00 +01:00
parent 43fd6604a1
commit ae58022c4b
5 changed files with 6 additions and 40 deletions

View File

@ -2,11 +2,11 @@ schemaVersion: 2.0.0
commandTests: commandTests:
- name: mingw c compiler - name: mingw c compiler
command: $CC command: x86_64-w64-mingw32-gcc
args: ["--version"] args: ["--version"]
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"] expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
- name: mingw c++ compiler - name: mingw c++ compiler
command: $CXX command: x86_64-w64-mingw32-g++
args: ["--version"] args: ["--version"]
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"] expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"]
- name: powershell - name: powershell
@ -18,9 +18,6 @@ fileExistenceTests:
- name: "vcpkg" - name: "vcpkg"
path: "/root/vcpkg" path: "/root/vcpkg"
shouldExist: true shouldExist: true
- name: "cmake toolchain"
path: "/home/cmake/toolchains/x86_64-w64-mingw32.toolchain.cmake"
shouldExist: true
- name: "cross root" - name: "cross root"
path: "/usr/x86_64-w64-mingw32" path: "/usr/x86_64-w64-mingw32"
shouldExist: true shouldExist: true

View File

@ -2,11 +2,11 @@ schemaVersion: 2.0.0
commandTests: commandTests:
- name: mingw c compiler - name: mingw c compiler
command: $CC command: x86_64-w64-mingw32-gcc
args: ["--version"] args: ["--version"]
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"] expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
- name: mingw c++ compiler - name: mingw c++ compiler
command: $CXX command: x86_64-w64-mingw32-cpp
args: ["--version"] args: ["--version"]
expectedOutput: [".*x86_64-w64-mingw32-cpp.*"] expectedOutput: [".*x86_64-w64-mingw32-cpp.*"]
- name: powershell - name: powershell
@ -18,9 +18,6 @@ fileExistenceTests:
- name: "vcpkg" - name: "vcpkg"
path: "/root/vcpkg" path: "/root/vcpkg"
shouldExist: true shouldExist: true
- name: "cmake toolchain"
path: "/home/cmake/toolchains/x86_64-w64-mingw32.toolchain.cmake"
shouldExist: true
- name: "cross root" - name: "cross root"
path: "/usr/x86_64-w64-mingw32" path: "/usr/x86_64-w64-mingw32"
shouldExist: true shouldExist: true

View File

@ -42,20 +42,10 @@ RUN rm -rf /tmp/*
CMD source ~/.cpprc CMD source ~/.cpprc
ENTRYPOINT [ "/bin/bash" ] 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 #### Building
FROM base AS builder FROM base AS builder
COPY ./dev/cpp_vcpkg_project /home/app COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app WORKDIR /home/app
RUN bash -c 'source ~/.cpprc \ RUN bash -c 'source ~/.cpprc \
&& task cross_build_mingw' && task build_cross_mingw'

View File

@ -20,19 +20,9 @@ RUN rm -rf /tmp/*
CMD source ~/.cpprc CMD source ~/.cpprc
ENTRYPOINT [ "/bin/bash" ] 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 #### Building
FROM base AS builder FROM base AS builder
COPY ./dev/cpp_vcpkg_project /home/app COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app WORKDIR /home/app
RUN bash -c 'source ~/.cpprc \ RUN bash -c 'source ~/.cpprc \
&& task cross_build_mingw' && task build_cross_mingw'

View File

@ -17,14 +17,6 @@ RUN rm -rf /tmp/*
CMD source ~/.cpprc CMD source ~/.cpprc
ENTRYPOINT [ "/bin/bash" ] 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 #### Building
FROM base AS builder FROM base AS builder
COPY ./dev/cpp_vcpkg_project /home/app COPY ./dev/cpp_vcpkg_project /home/app