subsurface/.github/workflows/mac.yml

77 lines
2.6 KiB
YAML
Raw Normal View History

name: Mac
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
buildMac:
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 libmtp
- 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
env:
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
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)
git config --global user.email "ci@subsurface-divelog.org"
git config --global user.name "Subsurface CI"
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
# 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