mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
112 lines
3.7 KiB
YAML
112 lines
3.7 KiB
YAML
name: 🪟 MingW64 Windows 64bit Build
|
|
|
|
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:
|
|
|
|
jobs:
|
|
mingw64-build:
|
|
name: MinGW64 Windows Build
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: fedora:rawhide
|
|
options: --security-opt seccomp=unconfined
|
|
volumes:
|
|
- ${{ github.workspace }}:/w
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
# 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@v3
|
|
with:
|
|
node-version: '17'
|
|
|
|
- name: Make yarn available
|
|
run: corepack enable
|
|
|
|
- name: Create ccache dir
|
|
run: mkdir -p /w/.ccache/QGIS
|
|
|
|
- name: Prepare build cache for pull request
|
|
uses: pat-s/always-upload-cache@v3.0.11
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
path: /w/.ccache/QGIS
|
|
key: mingw64-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }}
|
|
# The head_ref or source branch of the pull request in a workflow run.
|
|
# The base_ref or target branch of the pull request in a workflow run.
|
|
restore-keys: |
|
|
mingw64-ccache-${{ github.actor }}-${{ github.head_ref }}-
|
|
mingw64-ccache-${{ github.base_ref }}-
|
|
mingw64-ccache-refs/heads/master-
|
|
|
|
- name: Prepare build cache for branch/tag
|
|
# use a fork of actions/cache@v2 to upload cache even when the build or test failed
|
|
uses: pat-s/always-upload-cache@v3.0.11
|
|
if: github.event_name != 'pull_request'
|
|
with:
|
|
path: /w/.ccache/QGIS
|
|
# The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/<branch_name>, and for tags it is refs/tags/<tag_name>
|
|
key: mingw64-ccache-${{ github.ref }}-${{ github.sha }}
|
|
restore-keys: |
|
|
mingw64-ccache-${{ github.ref }}-
|
|
mingw64-ccache-refs/heads/master-
|
|
|
|
- name: Build QGIS Application
|
|
run: |
|
|
CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4
|
|
|
|
- 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: Upload QGIS for Windows 64bit
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: QGIS for Windows 64bit
|
|
path: qgis-portable-win64.zip
|
|
|
|
- name: Upload QGIS for Windows 64bit Debug Symbols
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: QGIS for Windows 64bit Debug Symbols
|
|
path: qgis-portable-win64-debugsym.zip
|