windows 64bit #504
Workflow file for this run
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: windows 64bit | |
on: [push, pull_request] | |
env: | |
PYTHON_VER_DIRNAME: 'python311' | |
PYOTHERSIDE_VER: '1.5.9' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: '3.11.8' | |
architecture: 'x64' | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '5.14.1' | |
host: 'windows' | |
target: 'desktop' | |
arch: 'win64_msvc2017_64' | |
- name: Download dependencies | |
run: | | |
$py_ver = python -V | |
$py_ver -match "python (?<content>.*)" | |
$version = $matches['content'] | |
wget https://download.qt.io/official_releases/jom/jom.zip -OutFile jom.zip | |
wget https://github.com/thp/pyotherside/archive/$env:PYOTHERSIDE_VER.zip -OutFile pyotherside-$env:PYOTHERSIDE_VER.zip | |
wget https://www.python.org/ftp/python/$version/python-$version-embed-amd64.zip -OutFile python-$version-embed-amd64.zip | |
shell: powershell | |
- name: Install swig | |
run: choco install swig | |
- name: Install jom | |
run: | | |
7z x jom.zip | |
- name: Prepare pyotherside | |
run: | | |
$py_ver = python -V | |
$py_ver -match "python (?<content>.*)" | |
$version = $matches['content'] | |
7z x pyotherside-$env:PYOTHERSIDE_VER.zip | |
cd pyotherside-$env:PYOTHERSIDE_VER | |
(Get-Content .\src\qmldir).replace('pyothersideplugin', 'pyothersideplugin1') | Set-Content .\src\qmldir | |
Clear-Content python.pri | |
Add-Content python.pri "PYTHON_CONFIG = python3-config`nQMAKE_LIBS += -LC:\hostedtoolcache\windows\Python\$version\x64\libs -l$env:PYTHON_VER_DIRNAME`nQMAKE_CXXFLAGS += -IC:\hostedtoolcache\windows\Python\$version\x64\include`n" | |
shell: powershell | |
- name: Build and install pyotherside | |
run: | | |
set PATH=D:\a\yubikey-manager-qt-private\Qt\5.14.1\msvc2017_64\bin;D:\a\yubikey-manager-qt-private\yubikey-manager-qt-private;%PATH% | |
call C:\"Program Files\Microsoft Visual Studio"\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x64 | |
cd pyotherside-%PYOTHERSIDE_VER% | |
qmake | |
jom | |
jom install | |
shell: cmd | |
- name: Build app | |
shell: cmd | |
run: | | |
set PATH=D:\a\yubikey-manager-qt-private\yubikey-manager-qt-private\5.14.1\msvc2017_64\bin;D:\a\yubikey-manager-qt-private\yubikey-manager-qt-private;%PATH% | |
call C:\"Program Files\Microsoft Visual Studio"\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x64 | |
qmake | |
jom | |
- name: Run windeployqt | |
shell: cmd | |
run: | | |
set PATH=D:\a\yubikey-manager-qt-private\yubikey-manager-qt-private\5.14.1\msvc2017_64\bin;D:\a\yubikey-manager-qt-private\yubikey-manager-qt-private;%PATH% | |
call C:\"Program Files\Microsoft Visual Studio"\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x64 | |
windeployqt .\ykman-gui\release\ykman-gui.exe --qmldir=.\ykman-gui\qml --no-translations --angle --release | |
- name: Copy over files and create .zip archive | |
run: | | |
$py_ver = python -V | |
$py_ver -match "python (?<content>.*)" | |
$version = $matches['content'] | |
Remove-Item .\ykman-gui\pymodules\bin -Force -Recurse | |
Copy-Item .\ykman-gui\pymodules .\ykman-gui\release -recurse | |
Get-ChildItem -File -Include *.pyc -Recurse | Remove-Item -Force | |
Get-ChildItem -Include __pycache__ -Recurse | Remove-Item -Force | |
Get-ChildItem -Include *.cpp -Recurse | Remove-Item -Force | |
Get-ChildItem -Include *.obj -Recurse | Remove-Item -Force | |
Copy-Item .\ykman-cli\release\ykman.exe .\ykman-gui\release | |
cd .\ykman-gui\release | |
7z x ..\..\python-$version-embed-amd64.zip | |
shell: powershell | |
- name: Create .zip artifact | |
shell: powershell | |
run: | | |
$arr = $env:GITHUB_REF -split '/' | |
$branch = $arr[2] | |
7z a yubikey-manager-qt-$branch-win64.zip .\ykman-gui\release | |
mkdir deploy | |
cp yubikey-manager-qt-$branch-win64.zip deploy | |
- name: Run GUI | |
shell: bash | |
run: | | |
./ykman-gui/release/ykman-gui --version | |
./ykman-gui/release/ykman-gui --help | |
- name: Run CLI | |
shell: bash | |
run: | | |
./ykman-gui/release/ykman --version | |
[[ -z "$(./ykman-gui/release/ykman --version | grep -E "not found|missing")" ]] | |
- name: Upload artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: yubikey-manager-qt-win64 | |
path: deploy |