2019-10-16 18:31:29 +00:00
|
|
|
name: Windows
|
2019-10-26 01:04:01 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2019-10-16 18:31:29 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
buildInContainer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: docker://dirkhh/mxe-build-container:0.9
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: checkout sources
|
2019-10-17 23:12:42 +00:00
|
|
|
uses: actions/checkout@v1
|
2019-10-16 18:31:29 +00:00
|
|
|
|
|
|
|
- name: get other dependencies
|
|
|
|
run: |
|
2019-10-17 23:12:42 +00:00
|
|
|
echo "creating the link from /win/subsurface"
|
2019-10-16 18:31:29 +00:00
|
|
|
cd /win
|
2019-10-17 23:12:42 +00:00
|
|
|
ln -s /__w/subsurface/subsurface .
|
|
|
|
ls -l
|
|
|
|
ls -l subsurface/scripts
|
|
|
|
echo "installing missing container components"
|
2019-10-16 18:31:29 +00:00
|
|
|
apt-get install -y ca-certificates libtool
|
2019-10-17 23:12:42 +00:00
|
|
|
echo "downloading sources for fresh build"
|
2019-10-16 18:31:29 +00:00
|
|
|
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
|
2019-10-18 16:25:14 +00:00
|
|
|
bash -x subsurface/.github/workflows/scripts/windows-in-container-build.sh 2>&1 | tee build.log
|
2019-10-16 18:31:29 +00:00
|
|
|
grep "Built target installer" build.log
|
|
|
|
|
2019-10-17 23:12:42 +00:00
|
|
|
- name: create CI release
|
2019-10-26 02:07:03 +00:00
|
|
|
if: github.event_name == 'push'
|
2019-10-17 23:12:42 +00:00
|
|
|
uses: ./.github/actions/release
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
GITHUB_REPO: ${{ github.repository }}
|
|
|
|
REF: ${{ github.ref }}
|
|
|
|
COMMIT: ${{ github.sha }}
|
|
|
|
BIN1: ./subsurface-installer.exe
|
|
|
|
BIN2: ./subsurface.exe
|
|
|
|
BIN3: ./subsurface.exe.debug
|
|
|
|
BIN4: ./smtk2ssrf-installer.exe
|
|
|
|
BIN5: ./smtk2ssrf.exe
|
2019-10-16 18:31:29 +00:00
|
|
|
|
2019-10-27 02:28:30 +00:00
|
|
|
- name: prepare PR artifacts
|
2019-10-26 02:07:03 +00:00
|
|
|
if: github.event_name == 'pull_request'
|
2019-10-25 20:53:48 +00:00
|
|
|
run: |
|
2019-10-27 02:28:30 +00:00
|
|
|
mkdir -p Windows-artifacts
|
|
|
|
mv ./subsurface-installer.exe ./subsurface.exe ./subsurface.exe.debug ./smtk2ssrf-installer.exe ./smtk2ssrf.exe Windows-artifacts
|
|
|
|
|
|
|
|
- name: PR artifacts
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: Windows-artifacts
|
|
|
|
path: Windows-artifacts
|