Skip to content

Commit

Permalink
Merge pull request #33064 from elpaso/elpaso-gh-workflow-2
Browse files Browse the repository at this point in the history
MXE build workflow
  • Loading branch information
elpaso committed Nov 29, 2019
2 parents 2734185 + 44c390c commit 23fb486
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/mxe.yml
@@ -0,0 +1,21 @@
name: Windows cross build with MXE

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Cross build with MXE
run: cd $GITHUB_WORKSPACE && ms-windows/mxe/build.sh
- name: Rename artifact
run: cd $GITHUB_WORKSPACE && mv qgis-mxe-release-*.zip qgis-mxe-release.zip
- name: Upload build
uses: actions/upload-artifact@v1
with:
name: Store artifact
path: qgis-mxe-release.zip

22 changes: 13 additions & 9 deletions ms-windows/mxe/build-mxe.sh
Expand Up @@ -24,6 +24,7 @@ set -e
# The artifact will be saved as a zip package in the directory
# from which this script is launched.


COMMAND=$1

# Location of current script
Expand All @@ -37,16 +38,26 @@ PYDEPLOY=${DIR}/deploy.py
MXE=${MXE:-/mxe/}

# Directory for build
BUILD_DIR=$(pwd)/build-mxe
BUILD_DIR=${PWD}/build-mxe
# Directory where the artifact will be saved
RELEASE_DIR=$(pwd)/qgis-mxe-release
RELEASE_DIR=${PWD}/qgis-mxe-release

# End configuration

# Original target (does not support posix threads)
# TARGET=${TARGET}
TARGET=i686-w64-mingw32.shared.posix

# Set base path for all tools
export PATH=${PATH}:/mxe/usr/bin

# Fix CCACHE directory
export CCACHE_DIR=${PWD}/.ccache

if [ ! -e ${CCACHE_DIR} ]; then
mkdir -p ${CCACHE_DIR}
fi

if [[ "$COMMAND" != *"package"* ]]; then
[ -d ${BUILD_DIR} ] && rm -rf ${BUILD_DIR}
[ -d ${RELEASE_DIR} ] && rm -rf ${RELEASE_DIR}
Expand All @@ -55,13 +66,6 @@ if [[ "$COMMAND" != *"package"* ]]; then
[ -d ${RELEASE_DIR} ] || mkdir ${RELEASE_DIR}
fi

# Patch for 5.11
echo '#include "qwebframe.h"' > ${MXE}/usr/${TARGET}/qt5/include/QtWebKitWidgets/QWebFrame
echo '#include "qwebview.h"' > ${MXE}/usr/${TARGET}/qt5/include/QtWebKitWidgets/QWebView
echo '#include "qwebpage.h"' > ${MXE}/usr/${TARGET}/qt5/include/QtWebKitWidgets/QWebPage
echo '#include "qwebelement.h"' > ${MXE}/usr/${TARGET}/qt5/include/QtWebKitWidgets/QWebElement
cp ${MXE}/usr/${TARGET}/include/windows.h ${MXE}/usr/${TARGET}/include/Windows.h
cp ${MXE}/usr/${TARGET}/include/shlobj.h ${MXE}/usr/${TARGET}/include/ShlObj.h
pushd .

cd ${BUILD_DIR}
Expand Down
2 changes: 1 addition & 1 deletion ms-windows/mxe/build.sh
Expand Up @@ -7,5 +7,5 @@ docker run \
-v $(pwd):$(pwd) \
-w $(pwd) --rm \
--user $(id -u):$(id -g) \
-it elpaso/mxe-qt5-builder \
elpaso/mxe-qt5-builder \
${DIR}/build-mxe.sh
3 changes: 2 additions & 1 deletion ms-windows/mxe/mxe.Dockerfile
@@ -1,7 +1,8 @@
FROM buildpack-deps:stretch

RUN chown root:root /tmp && chmod ugo+rwXt /tmp
RUN apt-get update
RUN apt-get install -y --no-install-recommends autopoint bison flex gperf libtool ruby scons unzip p7zip-full intltool libtool libtool-bin nsis zip
RUN apt-get install -y --no-install-recommends autopoint bison flex gperf libtool ruby scons unzip p7zip-full intltool libtool libtool-bin nsis lzip zip

WORKDIR /mxe

Expand Down

0 comments on commit 23fb486

Please sign in to comment.