mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
GitHub Actions: build Windows binaries
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ef3d67be08
commit
f099b22820
2 changed files with 94 additions and 0 deletions
30
.github/workflows/windows-in-container-build.sh
vendored
Normal file
30
.github/workflows/windows-in-container-build.sh
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# this gets executed inside the container when building a Windows
|
||||||
|
# installer on Travis
|
||||||
|
#
|
||||||
|
# working directory is assumed to be the directory including all the
|
||||||
|
# source directories (subsurface, googlemaps, grantlee, etc)
|
||||||
|
# in order to be compatible with the assumed layout in the MXE script, we
|
||||||
|
# need to create the secondary build directory
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
mkdir -p win32
|
||||||
|
cd win32
|
||||||
|
|
||||||
|
# build Subsurface and then smtk2ssrf
|
||||||
|
export MXEBUILDTYPE=i686-w64-mingw32.shared
|
||||||
|
bash -ex ../subsurface/packaging/windows/mxe-based-build.sh installer
|
||||||
|
|
||||||
|
# the strange two step move is in order to get predictable names to use
|
||||||
|
# in the publish step of the GitHub Action
|
||||||
|
mv subsurface/subsurface.exe* ${GITHUB_WORKSPACE}/
|
||||||
|
mv subsurface/subsurface-*.exe ${GITHUB_WORKSPACE}/subsurface-installer.exe
|
||||||
|
|
||||||
|
bash -ex ../subsurface/packaging/windows/smtk2ssrf-mxe-build.sh -a -i
|
||||||
|
|
||||||
|
# the strange two step move is in order to get predictable names to use
|
||||||
|
# in the publish step of the GitHub Action
|
||||||
|
mv smtk-import/smtk2ssrf.exe ${GITHUB_WORKSPACE}/
|
||||||
|
mv smtk-import/smtk2ssrf*.exe ${GITHUB_WORKSPACE}/smtk2ssrf-installer.exe
|
64
.github/workflows/windows.yml
vendored
Normal file
64
.github/workflows/windows.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
name: Windows
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buildInContainer:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker://dirkhh/mxe-build-container:0.9
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout sources
|
||||||
|
run: |
|
||||||
|
cd /win
|
||||||
|
git clone git://github.com/${GITHUB_REPOSITORY}
|
||||||
|
cd subsurface
|
||||||
|
git checkout ${GITHUB_SHA}
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
- name: get other dependencies
|
||||||
|
run: |
|
||||||
|
cd /win
|
||||||
|
apt-get install -y ca-certificates libtool
|
||||||
|
bash subsurface/scripts/get-dep-lib.sh single . libzip
|
||||||
|
bash subsurface/scripts/get-dep-lib.sh single . hidapi
|
||||||
|
bash subsurface/scripts/get-dep-lib.sh single . googlemaps
|
||||||
|
bash subsurface/scripts/get-dep-lib.sh single . grantlee
|
||||||
|
bash subsurface/scripts/get-dep-lib.sh single . mdbtools
|
||||||
|
|
||||||
|
- name: run build
|
||||||
|
run: |
|
||||||
|
cd /win
|
||||||
|
bash -x subsurface/.github/workflows/windows-in-container-build.sh 2>&1 | tee build.log
|
||||||
|
grep "Built target installer" build.log
|
||||||
|
|
||||||
|
- name: publish Subsurface installer
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: subsurface-${{github.sha}}-installer.exe
|
||||||
|
path: ./subsurface-installer.exe # /${GITHUB_WORKSPACE}/ in the container is '.' here
|
||||||
|
|
||||||
|
- name: publish Subsurface binary
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: subsurface-${{github.sha}}.exe
|
||||||
|
path: ./subsurface.exe # /${GITHUB_WORKSPACE}/ in the container is '.' here
|
||||||
|
|
||||||
|
- name: publish Subsurface debug binary
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: subsurface-${{github.sha}}.exe.debug
|
||||||
|
path: ./subsurface.exe.debug # /${GITHUB_WORKSPACE}/ in the container is '.' here
|
||||||
|
|
||||||
|
- name: publish smtk2ssrf installer
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: smtk2ssrf-${{github.sha}}-installer.exe
|
||||||
|
path: ./smtk2ssrf-installer.exe # /${GITHUB_WORKSPACE}/ in the container is '.' here
|
||||||
|
|
||||||
|
- name: publish Subsurface installer
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: smtk2ssrf-${{github.sha}}.exe
|
||||||
|
path: ./subsurface.exe # /${GITHUB_WORKSPACE}/ in the container is '.' here
|
Loading…
Add table
Add a link
Reference in a new issue