summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2022-03-01 20:46:42 +0100
committerCristian Adam <cristian.adam@qt.io>2022-03-03 09:28:31 +0000
commit1b22558857f4ee2bc23824339d91aaa8e50b7add (patch)
tree65d27b93c04c5a285656069e11a836b75f026dc6 /.github
parentce400a44822c0a39ecfd9cb3c31c06c201712810 (diff)
downloadqt-creator-1b22558857f4ee2bc23824339d91aaa8e50b7add.tar.gz
GitHub Actions: (re) Enable MinGW build
Both LLVM/Clang 14.0 and Qt 6.2.3 dependencies have been compiled with MinGW 11.2.0 Change-Id: I14dc8b62d243f21dc31ba72605d5aa4b16085279 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_cmake.yml79
1 files changed, 50 insertions, 29 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 7fa788d0d7..f388524f11 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -31,12 +31,14 @@ jobs:
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
is_msvc: true
}
-# - {
-# name: "Windows Latest MinGW", artifact: "Windows-MinGW",
-# os: windows-latest,
-# cc: "gcc", cxx: "g++",
-# is_msvc: false
-# }
+ - {
+ name: "Windows Latest MinGW", artifact: "Windows-MinGW",
+ os: windows-latest,
+ toolchain: "https://github.com/cristianadam/mingw-builds/releases/download/v11.2.0-rev1/x86_64-11.2.0-release-posix-seh-rt_v9-rev1.7z",
+ toolchain_path: "mingw64/bin",
+ cc: "gcc", cxx: "g++",
+ is_msvc: false
+ }
- {
name: "Ubuntu Latest GCC", artifact: "Linux",
os: ubuntu-latest,
@@ -111,6 +113,33 @@ jobs:
)
endif()
+ - name: Install system libs
+ shell: cmake -P {0}
+ run: |
+ if ("${{ runner.os }}" STREQUAL "Linux")
+ execute_process(
+ COMMAND sudo apt update
+ )
+ execute_process(
+ COMMAND sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev
+ RESULT_VARIABLE result
+ )
+ if (NOT result EQUAL 0)
+ message(FATAL_ERROR "Failed to install dependencies")
+ endif()
+ endif()
+
+ if (NOT "x${{ matrix.config.toolchain }}" STREQUAL "x")
+ foreach(retry RANGE 10)
+ file(DOWNLOAD "${{ matrix.config.toolchain }}" ./toolchain.7z SHOW_PROGRESS)
+ file(SIZE ./toolchain.7z fileSize)
+ if (fileSize GREATER 0)
+ break()
+ endif()
+ endforeach()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./toolchain.7z)
+ endif()
+
- name: Download Qt
id: qt
shell: cmake -P {0}
@@ -121,8 +150,8 @@ jobs:
if ("${{ runner.os }}" STREQUAL "Windows")
set(url_os "windows_x86")
if ("x${{ matrix.config.environment_script }}" STREQUAL "x")
- set(qt_package_arch_suffix "win64_mingw81")
- set(qt_dir_prefix "${qt_version}/mingw81_64")
+ set(qt_package_arch_suffix "win64_mingw")
+ set(qt_dir_prefix "${qt_version}/mingw_64")
set(qt_package_suffix "-Windows-Windows_10_21H2-Mingw-Windows-Windows_10_21H2-X86_64")
elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat")
set(qt_package_arch_suffix "win64_msvc2019_64")
@@ -218,7 +247,7 @@ jobs:
if ("x${{ matrix.config.environment_script }}" STREQUAL "x")
# deploy MinGW
foreach(file libwinpthread-1.dll libstdc++-6.dll libgcc_s_seh-1.dll)
- file(INSTALL "C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/${file}"
+ file(INSTALL "$ENV{GITHUB_WORKSPACE}/${{ matrix.config.toolchain_path }}/${file}"
DESTINATION "qt6/${qt_dir_prefix}/bin"
USE_SOURCE_PERMISSIONS)
endforeach()
@@ -434,22 +463,6 @@ jobs:
endforeach()
endforeach()
- - name: Install system libs
- shell: cmake -P {0}
- run: |
- if ("${{ runner.os }}" STREQUAL "Linux")
- execute_process(
- COMMAND sudo apt update
- )
- execute_process(
- COMMAND sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev
- RESULT_VARIABLE result
- )
- if (NOT result EQUAL 0)
- message(FATAL_ERROR "Failed to install dependencies")
- endif()
- endif()
-
- name: Build
shell: cmake -P {0}
run: |
@@ -516,6 +529,14 @@ jobs:
unset(NO_DMG)
endif()
+ if (NOT "x${{ matrix.config.toolchain_path }}" STREQUAL "x")
+ set(path_separator ":")
+ if ("${{ runner.os }}" STREQUAL "Windows")
+ set(path_separator ";")
+ endif()
+ set(ENV{PATH} "$ENV{GITHUB_WORKSPACE}/${{ matrix.config.toolchain_path }}${path_separator}$ENV{PATH}")
+ endif()
+
execute_process(
COMMAND python
-u
@@ -673,10 +694,10 @@ jobs:
name: "Windows Latest MSVC", artifact: "Windows-MSVC",
os: ubuntu-latest
}
-# - {
-# name: "Windows Latest MinGW", artifact: "Windows-MinGW",
-# os: ubuntu-latest
-# }
+ - {
+ name: "Windows Latest MinGW", artifact: "Windows-MinGW",
+ os: ubuntu-latest
+ }
- {
name: "Ubuntu Latest GCC", artifact: "Linux",
os: ubuntu-latest