aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/windows.yml
blob: 490008a8b03db78b007dcae1c705e8a2b8022503 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Windows
on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  buildInContainer:
    runs-on: ubuntu-latest
    container:
      image: docker://dirkhh/mxe-build-container:0.9

    steps:
    - name: checkout sources
      uses: actions/checkout@v1

    - name: get other dependencies
      run: |
        echo "creating the link from /win/subsurface"
        cd /win
        ln -s /__w/subsurface/subsurface .
        ls -l
        ls -l subsurface/scripts
        echo "installing missing container components"
        apt-get install -y ca-certificates libtool
        echo "downloading sources for fresh build"
        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/scripts/windows-in-container-build.sh 2>&1 | tee build.log
        grep "Built target installer" build.log

    - name: create CI release
      if: github.event_name == 'pull_request'
      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

    - name: copy to transfer.sh
      if: github.event_name == 'push'
      run: |
        apt-get update
        apt-get install -y curl
        curl --upload-file subsurface-installer.exe "https://transfer.sh/subsurface-installer.exe
        curl --upload-file subsurface.exe "https://transfer.sh/subsurface.exe
        curl --upload-file subsurface.exe.debug "https://transfer.sh/subsurface.exe.debug
        curl --upload-file smtk2ssrf-installer.exe "https://transfer.sh/smtk2ssrf-installer.exe
        curl --upload-file smtk2ssrf.exe "https://transfer.sh/smtk2ssrf.exe