2021-02-18 09:44:10 +01:00
name : MingW64 Windows 64bit Build
2021-02-12 08:52:05 +01:00
2021-02-19 09:00:34 +01:00
on :
push :
branches :
- master
- release-**
paths :
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'ms-windows/**'
- 'CMakeLists.txt'
- '.github/workflows/mingw64.yml'
pull_request :
paths :
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'ms-windows/**'
- 'CMakeLists.txt'
- '.github/workflows/mingw64.yml'
2021-02-12 08:52:05 +01:00
jobs :
2021-02-19 15:53:07 +01:00
mingw64-build :
2021-02-18 09:44:10 +01:00
env :
CCACHE_DIR : ${{ github.workspace }}/.ccache
2021-02-12 08:52:05 +01:00
name : MinGW64 Windows Build
runs-on : ubuntu-latest
steps :
2021-02-18 09:44:10 +01:00
- uses : actions/checkout@v2
2021-02-12 08:52:05 +01:00
- name : Build Docker Container with Build Environment
2021-02-22 15:44:59 +01:00
id : docker-build
uses : whoan/docker-build-with-cache-action@v5
with :
username : ${{ github.actor }}
password : ${{ secrets.GITHUB_TOKEN }}
registry : docker.pkg.github.com
image_name : qgis3-mingw-buildenv
dockerfile : ms-windows/mingw/qgis3-build-deps-mingw.dockerfile
push_git_tag : true
push_image_and_stages : on : push
2021-02-12 08:52:05 +01:00
2021-02-18 09:44:10 +01:00
- name : Prepare build cache for pull request
2021-02-19 09:00:34 +01:00
uses : pat-s/always-upload-cache@v2.1.3
if : github.event_name == 'pull_request'
with :
path : ${{ github.workspace }}/.ccache
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-
2021-02-18 09:44:10 +01:00
- 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@v2.1.3
if : github.event_name != 'pull_request'
with :
path : ${{ github.workspace }}/.ccache
# 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-
2021-02-12 08:52:05 +01:00
- name : Build QGIS Application
2021-02-18 09:44:10 +01:00
run : |
2021-02-22 13:47:06 +01:00
mkdir -p ${GITHUB_WORKSPACE}/.ccache
2021-02-18 09:44:10 +01:00
docker run \
--env CCACHE_DIR=/QGIS/.ccache \
-w /QGIS \
-v ${GITHUB_WORKSPACE}:/QGIS \
2021-02-22 15:44:59 +01:00
${DOCKER_IMAGE} \
2021-02-18 09:44:10 +01:00
ms-windows/mingw/build.sh x86_64 nodebug 4
2021-02-22 15:44:59 +01:00
env :
DOCKER_IMAGE : ${{ steps.docker-build.outputs.FULL_IMAGE_NAME }}
2021-02-18 09:44:10 +01:00
2021-02-12 08:52:05 +01:00
- name : Create Portable zip
run : |
2021-02-18 09:44:10 +01:00
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"
2021-02-12 08:52:05 +01:00
done
2021-02-18 09:44:10 +01:00
sudo mv $DISTROOT QGIS-Portable
2021-02-12 08:52:05 +01:00
zip -r qgis-portable-win64.zip QGIS-Portable
2021-02-18 09:44:10 +01:00
(cd $DEBUGROOT && zip -r - *) > qgis-portable-win64-debugsym.zip
2021-02-12 08:52:05 +01:00
2021-02-18 09:44:10 +01:00
- name : Upload QGIS for Windows 64bit
uses : actions/upload-artifact@v2.2.2
2021-02-12 08:52:05 +01:00
with :
name : QGIS for Windows 64bit
2021-02-18 09:44:10 +01:00
path : qgis-portable-win64.zip
- name : Upload QGIS for Windows 64bit Debug Symbols
uses : actions/upload-artifact@v2.2.2
with :
name : QGIS for Windows 64bit Debug Symbols
2021-02-19 15:53:07 +01:00
path : qgis-portable-win64-debugsym.zip