Skip to content

Commit

Permalink
build on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Nov 18, 2020
1 parent 063cc2d commit dccda99
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build-environment-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on: [pull_request, push]

jobs:
build-mac:
name: macOS
runs-on: macos-10.15
env:
DEPENDENCY_CACHE: /Users/runner/dependencies
steps:
- name: checkout Git repository
uses: actions/checkout@v2
- name: dependency cache
uses: actions/cache@v2
env:
cache-name: dependencies
with:
path: ${{ env.DEPENDENCY_CACHE }}
key: ${{ env.cache-name }}-${{ runner.os}}-${{ hashFiles('download_dependencies.sh') }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}
- name: ccache
uses: actions/cache@v2
env:
cache-name: ccache
with:
path: /Users/runner/Library/Caches/ccache
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.head_ref }}-${{ github.run_number }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-${{ github.head_ref }}
${{ env.cache-name }}-${{ runner.os }}
- name: build
env:
# 10.12 is the minimum macOS version for Qt 5.12
MACOSX_DEPLOYMENT_TARGET: 10.12
BRANCH_NAME: 2.3
ARCHITECTURE: x86_64
run: |
# Quit on errors.
# See also:
# - http://mywiki.wooledge.org/BashFAQ/105
# - https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -e -o pipefail
# Local echo.
set -x
export MACOSX_SDK=$(xcrun --show-sdk-version)
SHA=`git rev-parse --short HEAD`
ENVIRONMENT_NAME=${BRANCH_NAME}-${SHA}-sdk${MACOSX_SDK}-macosminimum${MACOSX_DEPLOYMENT_TARGET}-${ARCHITECTURE}
mkdir -p environment/${ENVIRONMENT_NAME}
scripts/macosx/download_dependencies.sh ${DEPENDENCY_CACHE}
scripts/macosx/build_environment.sh --dependency-cache ${DEPENDENCY_CACHE} --name ${ENVIRONMENT_NAME} --macosx-stdlib libc++ --enable-x86-64 2>&1 | tee environment/${ENVIRONMENT_NAME}/build_environment.log
tar -C environment -czf ${ENVIRONMENT_NAME}.tar.gz ${ENVIRONMENT_NAME}
- name: upload macOS build environment artifact
uses: actions/upload-artifact@v2
with:
name: macOS-build-environment
path: ./*.tar.gz

0 comments on commit dccda99

Please sign in to comment.