Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Restore MSYS2/MinGW-w64 and move it to Qt6 #59377

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/mingw-w64-msys2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: MSYS2/MinGW-w64

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches:
- master
- release-**
- queued_ltr_backports
paths:
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'ms-windows/**'
- 'CMakeLists.txt'
- '.github/workflows/mingw-w64-msys2.yml'
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
mingw-w64-msys2-build:
name: build (MSYS2/UCRT64)
runs-on: windows-latest
#strategy:
# fail-fast: false
# matrix:
# QT_VERSION: [qt6, qt6]
# MSYSTEM: [UCRT64, CLANG64]
env:
CCACHE_DIR: build/ccache
defaults:
run:
shell: msys2 {0}
steps:

- uses: actions/checkout@v4

- name: Install core & build dependencies
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: base-devel
pacboy: >-
draco exiv2 gdal geos gsl hdf5 libspatialite libxml2 libzip netcdf nlohmann-json
opencl-icd opencl-clhpp pdal postgresql proj protobuf qca-qt6 qscintilla-qt6
qtkeychain-qt6 qwt-qt6 spatialindex sqlite3 zlib zstd
qt6-3d qt6-base qt6-declarative qt6-multimedia qt6-positioning qt6-serialport qt6-svg qt6-tools
python python-gdal python-owslib python-pyqt6 python-qscintilla-qt6 pyqt-builder sip
cc cmake ninja ccache
update: true
release: false

- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: build
key: build-ccache-mingw64-msys2-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-mingw64-msys2-master

- name: Configure QGIS
run: |
cmake \
-G"Ninja" \
-DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \
-DPREFER_INTERNAL_LIBS=OFF \
-DWITH_INTERNAL_POLY2TRI=ON \
-DWITH_INTERNAL_MESHOPTIMIZER=ON \
-DWITH_INTERNAL_NLOHMANN_JSON=OFF \
-DBUILD_WITH_QT6=ON \
-DWITH_3D=ON \
-DWITH_BINDINGS=ON \
-DWITH_CUSTOM_WIDGETS=ON \
-DWITH_DRACO=ON \
-DWITH_EPT=ON \
-DWITH_PDAL=ON \
-DWITH_POSTGRESQL=ON \
-DWITH_QTWEBKIT=OFF \
-DWITH_QUICK=ON \
-DWITH_QWTPOLAR=ON \
-DWITH_GRASS=OFF \
-DUSE_CCACHE=ON \
-S . \
-B build

- name: Build QGIS
run: |
cmake --build build
ccache -s

- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: build
key: build-ccache-mingw64-msys2-${{ github.ref_name }}-${{ github.run_id }}
260 changes: 130 additions & 130 deletions .github/workflows/mingw64.yml
Original file line number Diff line number Diff line change
@@ -1,130 +1,130 @@
name: 🪟 MingW64 Windows 64bit Build

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches:
- master
- release-**
- queued_ltr_backports
paths:
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'ms-windows/**'
- 'CMakeLists.txt'
- '.github/workflows/mingw64.yml'
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
mingw64-build:
name: MinGW64 Windows Build
runs-on: ubuntu-latest
container:
image: fedora:39
options: --security-opt seccomp=unconfined
volumes:
- ${{ github.workspace }}:/w
steps:

- uses: actions/checkout@v4

# To be removed
# Workaround a bug where the initial /etc/dnf/dnf.conf file contains
# just the "tsflags=nodocs" line
- name: Replace broken dnf.conf
run: printf '[main]\ngpgcheck=True\ninstallonly_limit=3\nclean_requirements_on_remove=True\nbest=False\nskip_if_unavailable=True\ntsflags=nodocs' > /etc/dnf/dnf.conf

- name: Update system
run: dnf -y update

- name: Install core dependencies
run: dnf -y install zip

- name: Install build dependencies
run: ./ms-windows/mingw/mingwdeps.sh

# Node.js and Yarn for server landingpage webapp
- uses: actions/setup-node@v4
with:
node-version: '17'

- name: Make yarn available
run: corepack enable

- name: Create ccache dir
run: mkdir -p /w/.ccache/QGIS

- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /w/.ccache/QGIS
key: build-ccache-mingw64-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-mingw64-master

- name: Build QGIS Application
run: CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4

- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: /w/.ccache/QGIS
key: build-ccache-mingw64-${{ github.ref_name }}-${{ github.run_id }}

- name: Create Portable zip
run: |
DISTROOT=build_mingw64/dist/usr/x86_64-w64-mingw32/sys-root/mingw
DEBUGROOT=dist_debug
for file in $(find $DISTROOT -name '*.debug' \( -type l -or -type f \)); do
DEST=${file/$DISTROOT/$DEBUGROOT}
mkdir -p "$(dirname $DEST)"
sudo mv "$file" "$DEST"
done
sudo mv $DISTROOT QGIS-Portable
zip -r qgis-portable-win64.zip QGIS-Portable
(cd $DEBUGROOT && zip -r - *) > qgis-portable-win64-debugsym.zip

- name: Save PR number to zips
run: |
echo ${{ github.event.number }} | tee pr_number
zip -u qgis-portable-win64.zip pr_number
zip -u qgis-portable-win64-debugsym.zip pr_number
echo ${{ github.event.pull_request.head.sha }} | tee git_commit
zip -u qgis-portable-win64.zip git_commit
zip -u qgis-portable-win64-debugsym.zip git_commit

- name: Upload QGIS for Windows 64bit
uses: actions/upload-artifact@v4
id: artifact-win64
with:
name: QGIS for Windows 64bit
path: qgis-portable-win64.zip

- name: Upload QGIS for Windows 64bit Debug Symbols
uses: actions/upload-artifact@v4
id: artifact-win64-debug
with:
name: QGIS for Windows 64bit Debug Symbols
path: qgis-portable-win64-debugsym.zip

- name: Schedule download comment
uses: ./.github/actions/post_sticky_comment
if: github.event_name == 'pull_request'
with:
marker: mingw64
body: |
### 🪟 Windows builds
Download [Windows builds of this PR for testing](${{ steps.artifact-win64.outputs.artifact-url }}).
Debug symbols for this build are available [here](${{ steps.artifact-win64-debug.outputs.artifact-url }}).
*(Built from commit ${{ github.event.pull_request.head.sha }})*
pr: ${{ github.event.number }}
name: 🪟 MingW64 Windows 64bit Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
- release-**
- queued_ltr_backports
paths:
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'ms-windows/**'
- 'CMakeLists.txt'
- '.github/workflows/mingw64.yml'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
mingw64-build:
name: MinGW64 Windows Build
runs-on: ubuntu-latest
container:
image: fedora:39
options: --security-opt seccomp=unconfined
volumes:
- ${{ github.workspace }}:/w
steps:
- uses: actions/checkout@v4
# To be removed
# Workaround a bug where the initial /etc/dnf/dnf.conf file contains
# just the "tsflags=nodocs" line
- name: Replace broken dnf.conf
run: printf '[main]\ngpgcheck=True\ninstallonly_limit=3\nclean_requirements_on_remove=True\nbest=False\nskip_if_unavailable=True\ntsflags=nodocs' > /etc/dnf/dnf.conf
- name: Update system
run: dnf -y update
- name: Install core dependencies
run: dnf -y install zip
- name: Install build dependencies
run: ./ms-windows/mingw/mingwdeps.sh
# Node.js and Yarn for server landingpage webapp
- uses: actions/setup-node@v4
with:
node-version: '17'
- name: Make yarn available
run: corepack enable
- name: Create ccache dir
run: mkdir -p /w/.ccache/QGIS
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /w/.ccache/QGIS
key: build-ccache-mingw64-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-mingw64-master
- name: Build QGIS Application
run: CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4
- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: /w/.ccache/QGIS
key: build-ccache-mingw64-${{ github.ref_name }}-${{ github.run_id }}
- name: Create Portable zip
run: |
DISTROOT=build_mingw64/dist/usr/x86_64-w64-mingw32/sys-root/mingw
DEBUGROOT=dist_debug
for file in $(find $DISTROOT -name '*.debug' \( -type l -or -type f \)); do
DEST=${file/$DISTROOT/$DEBUGROOT}
mkdir -p "$(dirname $DEST)"
sudo mv "$file" "$DEST"
done
sudo mv $DISTROOT QGIS-Portable
zip -r qgis-portable-win64.zip QGIS-Portable
(cd $DEBUGROOT && zip -r - *) > qgis-portable-win64-debugsym.zip
- name: Save PR number to zips
run: |
echo ${{ github.event.number }} | tee pr_number
zip -u qgis-portable-win64.zip pr_number
zip -u qgis-portable-win64-debugsym.zip pr_number
echo ${{ github.event.pull_request.head.sha }} | tee git_commit
zip -u qgis-portable-win64.zip git_commit
zip -u qgis-portable-win64-debugsym.zip git_commit
- name: Upload QGIS for Windows 64bit
uses: actions/upload-artifact@v4
id: artifact-win64
with:
name: QGIS for Windows 64bit
path: qgis-portable-win64.zip
- name: Upload QGIS for Windows 64bit Debug Symbols
uses: actions/upload-artifact@v4
id: artifact-win64-debug
with:
name: QGIS for Windows 64bit Debug Symbols
path: qgis-portable-win64-debugsym.zip
- name: Schedule download comment
uses: ./.github/actions/post_sticky_comment
if: github.event_name == 'pull_request'
with:
marker: mingw64
body: |
### 🪟 Windows builds
Download [Windows builds of this PR for testing](${{ steps.artifact-win64.outputs.artifact-url }}).
Debug symbols for this build are available [here](${{ steps.artifact-win64-debug.outputs.artifact-url }}).
*(Built from commit ${{ github.event.pull_request.head.sha }})*
pr: ${{ github.event.number }}