]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Added ubuntu mingw cross-compile CI instances to cmake GHA.
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 13 Sep 2020 04:08:00 +0000 (21:08 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 14 Sep 2020 10:25:24 +0000 (12:25 +0200)
.github/workflows/cmake.yml
cmake/toolchain-mingw-i686.cmake
cmake/toolchain-mingw-x86_64.cmake

index 220db70c29d318aa52edc9ee124062eb01828226..0a53a35654bc8cf62ef6ed4530f41d6114de3cef 100644 (file)
@@ -34,6 +34,8 @@ jobs:
           Ubuntu GCC S390X,
           Ubuntu GCC S390X DFLTCC,
           Ubuntu GCC S390X DFLTCC Compat,
+          Ubuntu MinGW i686,
+          Ubuntu MinGW x86_64,
           Ubuntu Clang,
           Ubuntu Clang Inflate Strict,
           Ubuntu Clang Inflate Allow Invalid Dist,
@@ -237,6 +239,20 @@ jobs:
             ldflags: -static
             codecov: ubuntu_gcc_s390x
 
+          - name: Ubuntu MinGW i686
+            os: ubuntu-latest
+            compiler: i686-w64-mingw32-gcc
+            cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-i686.cmake
+            packages: wine32 gcc-mingw-w64
+            codecov: ubuntu_gcc_mingw_i686
+
+          - name: Ubuntu MinGW x86_64
+            os: ubuntu-latest
+            compiler: x86_64-w64-mingw32-gcc
+            cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-x86_64.cmake
+            packages: wine-stable gcc-mingw-w64
+            codecov: ubuntu_gcc_mingw_x86_64
+
           - name: Ubuntu Clang
             os: ubuntu-latest
             compiler: clang
@@ -342,6 +358,7 @@ jobs:
     - name: Install packages (Ubuntu)
       if: runner.os == 'Linux' && matrix.packages
       run: |
+        sudo dpkg --add-architecture i386 # Required for wine32
         sudo apt-get update
         sudo apt-get install -y ${{ matrix.packages }}
 
index 5a93edff19b5b01e8dd262dc2d13f841549e1522..588ec0ef9c7480198370669d94153c77ab2df8c4 100644 (file)
@@ -1,13 +1,16 @@
-SET(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_NAME Windows)
 
-SET(CMAKE_C_COMPILER_TARGET i686)
+set(CMAKE_C_COMPILER_TARGET i686)
 set(CMAKE_CXX_COMPILER_TARGET i686)
 
-SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
-SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
-SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
+set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
 
-SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
+set(CMAKE_CROSSCOMPILING TRUE)
+set(CMAKE_CROSSCOMPILING_EMULATOR wine)
+
+set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
index 494d59fc6a33d93fefe15bac5a1e39bf1cf139e7..c778b7222756c57078d57cb897c718680ba0628b 100644 (file)
@@ -1,13 +1,16 @@
-SET(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_NAME Windows)
 
-SET(CMAKE_C_COMPILER_TARGET x86_64)
+set(CMAKE_C_COMPILER_TARGET x86_64)
 set(CMAKE_CXX_COMPILER_TARGET x86_64)
 
-SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
-SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
-SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
+set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
+set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
+set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
 
-SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
+set(CMAKE_CROSSCOMPILING TRUE)
+set(CMAKE_CROSSCOMPILING_EMULATOR wine)
+
+set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)