mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-04 08:01:28 +00:00
d92777a3ff
Do some housekeeping and cleanup on the build scripts for Windows: - remove Windows 32bit builds as support for this has been removed from the mxe container; - fix some warnings in the smtk2ssrf installer configuration; - sanitise the output colour of the smtk2ssrf build script; - add a docker based build script for the Windows installers; - remove outdated and deprecated documentation and scripts. Signed-off-by: Michael Keller <mikeller@042.ch>
68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
name: Windows
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- scripts/docker/**
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths-ignore:
|
|
- scripts/docker/**
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
buildWindows:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: docker://subsurface/mxe-build:3.1.0
|
|
|
|
steps:
|
|
- name: checkout sources
|
|
uses: actions/checkout@v1
|
|
|
|
- name: atomically create or retrieve the build number and assemble release notes
|
|
id: version_number
|
|
if: github.event_name == 'push'
|
|
run: |
|
|
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
|
version=$(cat release-version)
|
|
echo "version=$version" >> $GITHUB_OUTPUT
|
|
|
|
- name: store dummy version and build number for pull request
|
|
if: github.event_name == 'pull_request'
|
|
run: |
|
|
echo "100" > latest-subsurface-buildnumber
|
|
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
|
|
|
|
- name: get other dependencies
|
|
env:
|
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
run: |
|
|
echo "Running script to install additional dependancies into container"
|
|
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
|
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
|
cd /win
|
|
ln -s /__w/subsurface/subsurface .
|
|
bash -x subsurface/packaging/windows/container-prep.sh 2>&1 | tee pre-build.log
|
|
|
|
- name: run build
|
|
run: |
|
|
export OUTPUT_DIR="$GITHUB_WORKSPACE"
|
|
cd /win
|
|
bash -x subsurface/packaging/windows/in-container-build.sh 2>&1 | tee build.log
|
|
grep "Built target installer" build.log
|
|
|
|
# only publish a 'release' on push events (those include merging a PR)
|
|
- name: upload binaries
|
|
if: github.event_name == 'push'
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: v${{ steps.version_number.outputs.version }}
|
|
repository: ${{ github.repository_owner }}/nightly-builds
|
|
token: ${{ secrets.NIGHTLY_BUILDS }}
|
|
prerelease: false
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
./subsurface*.exe*
|
|
./smtk2ssrf*.exe
|