Skip to content

build-win64

build-win64 #4

Workflow file for this run

name: build-win64
on:
workflow_dispatch:
env:
REF_TAG: v1.1.1
jobs:
user-manual:
uses: ./.github/workflows/user-manual.yml
with:
runs-on: ubuntu-latest
build:
runs-on: windows-2022
needs: user-manual
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
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: Patch e2se_defs.h
working-directory: ${{github.workspace}}/e2-sat-editor/src
shell: pwsh
run: |
head -n 22 e2se_defs.h > e2se_defs.h.new
echo "#define E2SE_PORTABLE" >> e2se_defs.h.new
tail -n +24 e2se_defs.h >> e2se_defs.h.new
mv e2se_defs.h e2se_defs.h.bak
mv e2se_defs.h.new e2se_defs.h
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
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 }}
- 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
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 \
-modules Core,Gui,Widgets,PrintSupport \
-libraries libcurl-4.dll,libcrypto-3-x64.dll,libidn2-0.dll,libnghttp2-14.dll,libpsl-5.dll,libssh2.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}
cp ../dist/common/Readme.txt.in ../artifact/Readme.txt
cp COPYING ../artifact/License.txt
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/"*.dll ../artifact/
mv "AppDir/Program Files (x86)/e2-sat-editor/bin/"{platforms,styles} ../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/
mv "${{github.workspace}}/user-manual" ../artifact/
# - name: Test
# working-directory: ${{github.workspace}}/e2-sat-editor/artifact
# continue-on-error: true
# timeout-minutes: 1
# run: |
# DEBUG=1 QT_QPA_PLATFORM=minimal e2-sat-editor.exe
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact