Skip to content

Fix prepare-sysroot.sh path in build-qt6.sh #1448

Fix prepare-sysroot.sh path in build-qt6.sh

Fix prepare-sysroot.sh path in build-qt6.sh #1448

Workflow file for this run

name: Windows build
on:
push:
branches: '*'
tags: '*'
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
include:
- os: windows-latest
qt-version: '6.5.2'
qt-target: 'desktop'
qt-modules: 'qtcharts qt5compat qtshadertools'
mingw-version: '11.2.0'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Setup environment
run: |
sed -i -e '/^#/d' .github/config.env
sed -i -e '/^$/d' .github/config.env
cat .github/config.env >> "${GITHUB_ENV}"
shell: bash
- name: Get version
run: |
version=$(head -n 1 .qmake.conf)
version=${version:8}
echo previous_tag=$version >> "${GITHUB_ENV}"
shell: bash
## Install Qt
# Windows
- name: Install Qt (Windows)
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
host: 'windows'
arch: 'win64_mingw'
target: ${{ matrix.qt-target }}
modules: ${{ matrix.qt-modules }}
- name: Install Qt IFW (Windows)
run: |
curl -o aqt.exe -L https://github.com/miurahr/aqtinstall/releases/download/v2.2.1/aqt.exe
./aqt.exe install-tool windows desktop tools_ifw
mv Tools ..
echo ${pwd}/../Tools/QtInstallerFramework/*/bin >> "${GITHUB_PATH}"
shell: bash
- if: contains(matrix.os, 'windows')
name: Install MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
version: ${{ matrix.mingw-version }}
## Build
- name: Build
run: |
cp .ci/windows-repo.sh ..
.ci/windows-build.sh
shell: bash
- name: Windows build
run: |
qmake INCLUDEPATH+=C:\OpenSSL\include LIBS+=-LC:\OpenSSL\lib || exit 3
mingw32-make -j4 || exit 4
mkdir release
move ${{ env.executable_name }}.exe release/
move *.dll release/
cd release
windeployqt ${{ env.executable_name }}.exe --qmldir ..\src || exit 5
for %%v in (opentyper-*.dll) do windeployqt "%%v" || exit 5
shell: cmd
- name: Finalize Windows build
run: .ci/windows-build.sh 1
shell: bash
## Upload
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-Qt-${{ matrix.qt-version }}
path: release/
- name: Move artifacts
run: mv release ../
shell: bash
## Build installer
- if: env.create_windows_installer == 1
name: Get installer configuration
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/${{ env.windows_installer_repo }}
fetch-depth: 0
- if: env.create_windows_installer == 1
name: Disable repository update
run: |
echo "update_windows_installer=0" >> "${GITHUB_ENV}"
echo "update_windows_repository=0" >> "${GITHUB_ENV}"
shell: bash
- if: env.create_windows_installer == 1
name: Build installer
run: ../windows-repo.sh
shell: bash
## Upload installer
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: installer-Qt-${{ matrix.qt-version }}
path: '*.exe'