build-win64 #12
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: build-win64 | |
on: | |
workflow_dispatch: | |
env: | |
REF_TAG: v1.5.0 | |
jobs: | |
user-manual: | |
uses: ./.github/workflows/user-manual.yml | |
with: | |
runs-on: ubuntu-latest | |
build: | |
runs-on: windows-2022 | |
needs: user-manual | |
env: | |
BUILD_TYPE: Release | |
steps: | |
- run: git config --global core.autocrlf input | |
- uses: actions/checkout@v4 | |
with: | |
repository: ctlcltd/e2-sat-editor | |
# ref: ${{ env.REF_TAG }} | |
path: e2-sat-editor | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: true | |
pacboy: >- | |
cc:x cmake:x ninja:x qt6-base:x qt6-translations:x curl:x | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
shell: msys2 {0} | |
run: | | |
cmake \ | |
-G Ninja \ | |
-B build \ | |
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
-DRELEASE_MEDIUM=github \ | |
-DDOWNLOAD_CURL_CABUNDLE=ON | |
- name: Build | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
shell: msys2 {0} | |
run: cmake --build build --config ${{ env.BUILD_TYPE }} | |
- name: Download user-manual artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: user-manual | |
path: user-manual | |
run-id: ${{ needs.user-manual.outputs.run-id }} | |
- name: Deploy artifact | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
continue-on-error: true | |
shell: msys2 {0} | |
run: | | |
DESTDIR=../AppDir ninja -C build install | |
# pre actions | |
QMDIR="AppDir/Program Files (x86)/e2-sat-editor/bin/translations" | |
mkdir -p "$QMDIR" | |
cp ../dist/translations/*.qm "$QMDIR" | |
cp /mingw64/share/qt6/translations/qt_*.qm "$QMDIR" | |
cp /mingw64/share/qt6/translations/qtbase_*.qm "$QMDIR" | |
rm -R "$QMDIR"/qt_help_*.qm | |
# run deploy script | |
bash ../scripts/deployqtwin.sh "AppDir/Program Files (x86)/e2-sat-editor/bin/e2-sat-editor.exe" \ | |
--verbose \ | |
-qt-version 6.7.2 \ | |
-modules Core,Gui,Widgets,PrintSupport \ | |
-libraries libcurl-4.dll,libcrypto-3-x64.dll,libidn2-0.dll,libnghttp2-14.dll,libnghttp3-9.dll,libpsl-5.dll,libssh2-1.dll,libssl-3-x64.dll,libunistring-5.dll | |
# post actions | |
rm "AppDir/Program Files (x86)/e2-sat-editor/bin/platforms/qdirect2d.dll" | |
# package | |
mkdir -p ../artifact/{cli,user-manual} | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/Readme.txt" ../artifact/ | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/License.txt" ../artifact/ | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/"*.dll ../artifact/ | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/"{platforms,styles,translations} ../artifact/ | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/ca-certificates" ../artifact/ | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/e2-sat-editor.exe" ../artifact/ | |
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/e2se-cli.exe" ../artifact/cli/ | |
cp ../artifact/{libgcc_s_seh-1,libstdc++-6,libwinpthread-1}.dll ../artifact/cli/ | |
mv "${{github.workspace}}/user-manual" ../artifact/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/e2-sat-editor/artifact |