New PythonQt and Qt5.15 CI #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GHA CI | |
on: | |
push: | |
branches: | |
pull_request: | |
branches: | |
workflow_dispatch: | |
jobs: | |
windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- qt-version: '5.12' | |
mingw-version: 7.3 | |
mingw-short-version: 73 | |
python-version: 3.8 | |
- qt-version: '5.15' | |
mingw-version: 8.1 | |
mingw-short-version: 81 | |
python-version: '3.12' | |
defaults: | |
run: | |
shell: pwsh #to prevent unexpected Git Bash with wrong MSys DLLs | |
steps: | |
- name: Cancel Previous Workflow Runs | |
uses: n1hility/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure git | |
shell: bash | |
run: | | |
git config --global core.symlinks true | |
git config --global core.autocrlf true | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
fetch-depth: 1 | |
- name: 'Disable Windows Just-in-Time Debugger/Error reporting' | |
shell: pwsh | |
run: | | |
# reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Debugger /d - /t REG_SZ /f | |
# reg add "HKLM\SOFTWARE\Microsoft\.NETFramework" /v DbgManagedDebugger /d - /t REG_SZ /f | |
# reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /d 1 /t REG_DWORD /f | |
# reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v ForceQueue /d 1 /t REG_DWORD /f | |
# reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent" /v DefaultConsent /d 1 /t REG_DWORD /f | |
# reg add "HKLM\System\CurrentControlSet\Control\Windows" /v ErrorMode /d 2 /t REG_DWORD /f | |
# | |
# | |
# reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Debugger /d - /t REG_SZ /f | |
# reg add "HKCU\SOFTWARE\Microsoft\.NETFramework" /v DbgManagedDebugger /d - /t REG_SZ /f | |
# reg add "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /d 1 /t REG_DWORD /f | |
# reg add "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v ForceQueue /d 1 /t REG_DWORD /f | |
# reg add "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent" /v DefaultConsent /d 1 /t REG_DWORD /f | |
# | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
release: true | |
update: false | |
msystem: MINGW32 | |
path-type: inherit #strict #inherit #minimal | |
install: >- | |
base | |
rsync | |
git | |
- name: Purge MinGW conflicting packages | |
run: 'pacman --remove --noconfirm --cascade --recursive --unneeded gcc python3 || :' | |
shell: msys2 {0} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{matrix.qt-version}} | |
arch: win32_mingw${{matrix.mingw-short-version}} | |
modules: 'qtscript' | |
archives: 'qtbase qtsvg qtserialport qtmultimedia qtwinextras qtimageformats i686' | |
tools: 'tools_mingw,qt.tools.win32_mingw${{matrix.mingw-short-version}}0' | |
extra: '--external 7z' | |
# After Qt install action, that spoils pythonLocation variable | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x86' | |
- name: Update PATH | |
shell: msys2 {0} | |
run: | | |
set -xue | |
cygpath -w /usr/bin >> $GITHUB_PATH | |
cygpath -w /mingw32/bin >> $GITHUB_PATH | |
cygpath -w "${IQTA_TOOLS}/mingw${{matrix.mingw-short-version}}0_32/bin" >> $GITHUB_PATH | |
cygpath -w "${pythonLocation}" >> $GITHUB_PATH | |
cygpath -w "${Qt5_Dir}/bin" >> $GITHUB_PATH | |
- name: Check PATH | |
shell: msys2 {0} | |
run: | | |
echo "Check for DLL-Hell" | |
where '$PATH:cygwin1.dll' '$PATH:libatomic-1.dll' '$PATH:libgcc_s_dw2-1.dll' '$PATH:libstdc++-6.dll' '$PATH:libwinpthread-1.dll' || : | |
echo '----' | |
echo "$GITHUB_PATH" | |
cat "$GITHUB_PATH" | |
echo '----' | |
echo PATH="$PATH" | |
- name: Check available tools | |
shell: msys2 {0} | |
run: | | |
set -xueo pipefail | |
uname -a | |
which rsync && rsync --version | |
which python3 && python3 --version | |
which g++ && g++ --version | |
ls "$IQTA_TOOLS/" "$Qt5_Dir/" | |
which qmake && qmake --version | |
- name: QMake | |
shell: msys2 {0} | |
run: 'qmake trikRuntime.pro -spec win32-g++ CONFIG+=tests CONFIG+=release PYTHON_PATH="${pythonLocation}"' | |
- name: QMake all | |
shell: msys2 {0} | |
timeout-minutes: 5 | |
run: mingw32-make -j $(nproc) qmake_all | |
- name: Make all | |
shell: msys2 {0} | |
timeout-minutes: 10 | |
run: mingw32-make -j $(nproc) all | |
- name: Tests | |
id: tests | |
shell: msys2 {0} | |
timeout-minutes: 3 | |
continue-on-error: true | |
run: | | |
echo "$PATH" | |
echo ------ | |
export TRIK_PYTHONPATH=$(cygpath -w "$pythonLocation/Lib") | |
mingw32-make check -k | |
- name: Prepare for RDP connection | |
if: false | |
shell: pwsh | |
env: | |
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} | |
run: | | |
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0 | |
Enable-NetFirewallRule -DisplayGroup "Remote Desktop" | |
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1 | |
Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd!" -Force) | |
Invoke-WebRequest https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip -OutFile ngrok.zip | |
Expand-Archive ngrok.zip | |
.\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN | |
choco install far dependencies | |
.\ngrok\ngrok.exe tcp 3389 | |
- name: Check errors | |
if: ${{ steps.tests.outcome == 'failure' }} | |
run: | | |
echo Errors occurred in the step Tests | |
exit 1 |