summaryrefslogtreecommitdiffstats
path: root/.github/workflows/mac.yml
blob: 2a330c6d0d85bc76597dbedb575f5055add0092e (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
66
67
68
69
70
71
name: Mac
on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  desktopBuild:
    runs-on: macOS-latest
    steps:
    - name: checkout sources
      uses: actions/checkout@v1
    - name: setup Homebrew
      run: brew install autoconf automake libtool xz hidapi libusb libxml2 libxslt libzip openssl pkg-config libgit2 libssh2 libjpg libpng
    - name: set our Qt build
      run: |
        mkdir -p Qt/5.13.0
        curl --output Qt-5.13.0-mac.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.13.0-mac.tar.xz
        tar -xJ -C Qt/5.13.0 -f Qt-5.13.0-mac.tar.xz
    - name: build Subsurface-mobile
      run: |
        cd ${GITHUB_WORKSPACE}/..
        export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
        export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
        export PATH=$QT_ROOT/bin:$PATH
        export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
        DIR=$(pwd)

        # first build Subsurface-mobile to ensure this didn't get broken
        bash -e -x ./subsurface/scripts/build.sh -mobile

    - name: test mobile build
      run: |
        echo "------------------------------------"
        echo "run tests for mobile build"
        export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
        export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
        cd ${GITHUB_WORKSPACE}/build-mobile/tests
        ./TestGitStorage -v2
        make check

    - name: build Subsurface
      run: |
        cd ${GITHUB_WORKSPACE}/..
        export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
        export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
        export PATH=$QT_ROOT/bin:$PATH
        export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
        DIR=$(pwd)

        # now Subsurface with WebKit
        bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release

        cd ${GITHUB_WORKSPACE}/build

        # build export-html to make sure that didn't get broken
        make export-html

    - name: test desktop build
      run: |
        echo "------------------------------------"
        echo "run tests for desktop build"
        export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
        export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
        cd ${GITHUB_WORKSPACE}/build/tests
        ./TestGitStorage -v2
        make check