Second stage of workflow depends on the first, runs on Windows:

* Restore the artifacts from the first stage into the right paths, includes all the files needed to continue the build
* Setup WiX, and call build.bat
* Upload the MSI Artifact along with the binary files (this is what someone would actually want to download)
This commit is contained in:
Kevin M 2023-02-06 04:09:40 -08:00
parent b11d524233
commit b6057ebd11

@ -2,8 +2,6 @@ name: Build Windows x64
on: [push, pull_request]
# TODO bin cache mxe
jobs:
linux-mxe-build:
# the first stage of the build to cross compile requires linux
@ -76,6 +74,8 @@ jobs:
ls -alF ../mxe/usr/x86_64-w64-mingw32.static/share/aclocal
./dist/win/bundle.sh
#ls -alFR ./dist/win/
- name: Get Git short SHA hash
run: echo "short_sha=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_ENV
@ -83,7 +83,58 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: spek-GH_${{ github.repository_owner }}_Win64-${{ env.short_sha }}
name: spek-GH_${{ github.repository_owner }}-Win64+tests-${{ env.short_sha }}
path: |
dist/win/Spek
dist/win/tests
dist/win/spek.wxs
# there is a dist/win/spek.zip which has the came contents
windows-wix-build:
needs: linux-mxe-build
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set WiX paths for candle and light
shell: powershell
env:
WIX_PATH: ${{ env.wix }}
run: |
# https://github.community/t/set-path-for-wix-toolset-in-windows-runner/154708/3
$env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin"
echo "$env:WIX_PATH"
# check where they're found, with all information
Get-Command candle.exe | Format-List
Get-Command light.exe | Format-List
- name: Get Git short SHA hash
shell: powershell
run: echo "short_sha=$(git rev-parse --short "${{ github.sha }}")" >> $env:GITHUB_ENV
- name: Download artifact from first job
uses: actions/download-artifact@v3
with:
name: spek-GH_${{ github.repository_owner }}-Win64+tests-${{ env.short_sha }}
# restore it into the expected path
path: dist/win
- name: Build WiX project
shell: cmd
working-directory: dist/win
run: call bundle.bat
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: spek-GH_${{ github.repository_owner }}-Win64+MSI-${{ env.short_sha }}
path: |
dist/win/spek.msi
dist/win/Spek # has the extract only, no tests