Skip to content

Commit

Permalink
Fix mingw CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Oct 3, 2021
1 parent 35ee59b commit 7316a6b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 39 deletions.
45 changes: 19 additions & 26 deletions .github/workflows/mingw64.yml
Expand Up @@ -19,32 +19,34 @@ on:

jobs:
mingw64-build:
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
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@v2

- name: Build Docker Container with Build Environment
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
pull_image_and_stages: ${{ github.event_name != 'workflow_dispatch' }}
- 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

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

- name: Prepare build cache for pull request
uses: pat-s/always-upload-cache@v2.1.5
if: github.event_name == 'pull_request'
with:
path: ${{ github.workspace }}/.ccache
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.
Expand All @@ -58,7 +60,7 @@ jobs:
uses: pat-s/always-upload-cache@v2.1.5
if: github.event_name != 'pull_request'
with:
path: ${{ github.workspace }}/.ccache
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: |
Expand All @@ -67,16 +69,7 @@ jobs:
- name: Build QGIS Application
run: |
mkdir -p ${GITHUB_WORKSPACE}/.ccache
docker run \
--security-opt seccomp=unconfined \
--env CCACHE_DIR=/QGIS/.ccache \
-w /QGIS \
-v ${GITHUB_WORKSPACE}:/QGIS \
${DOCKER_IMAGE} \
ms-windows/mingw/build.sh x86_64 nodebug 4
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.FULL_IMAGE_NAME }}
CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4
- name: Create Portable zip
run: |
Expand Down
4 changes: 2 additions & 2 deletions ms-windows/mingw/build.sh
Expand Up @@ -243,8 +243,8 @@ linkDep lib/qt5/plugins/crypto/libqca-gnupg.dll bin/crypto
linkDep lib/qt5/plugins/crypto/libqca-ossl.dll bin/crypto

mkdir -p "$installprefix/share/qt5/translations/"
cp -a "$MINGWROOT/share/qt5/translations/qt_"*.qm "$installprefix/share/qt5/translations"
cp -a "$MINGWROOT/share/qt5/translations/qtbase_"*.qm "$installprefix/share/qt5/translations"
#cp -a "$MINGWROOT/share/qt5/translations/qt_"*.qm "$installprefix/share/qt5/translations"
#cp -a "$MINGWROOT/share/qt5/translations/qtbase_"*.qm "$installprefix/share/qt5/translations"

# Data files
mkdir -p "$installprefix/share/"
Expand Down
12 changes: 1 addition & 11 deletions ...s/mingw/qgis3-build-deps-mingw.dockerfile → ms-windows/mingw/mingwdeps.sh 100644 → 100755
@@ -1,12 +1,5 @@
# MinGW build environment for QGIS / KADAS Albireo
#!/bin/sh

FROM fedora:rawhide

MAINTAINER Sandro Mani <manisandro@gmail.com>

RUN \
echo all > /etc/rpm/macros.image-language-conf && \
rm -f /etc/yum.repos.d/*modular* && \
dnf install -y --nogpgcheck \
mingw64-dlfcn \
mingw64-exiv2 \
Expand Down Expand Up @@ -89,6 +82,3 @@ dnf install -y --nogpgcheck \
wget \
xorg-x11-server-Xvfb \
zip

WORKDIR /workspace
VOLUME ["/workspace"]

0 comments on commit 7316a6b

Please sign in to comment.