74 lines
2.5 KiB
YAML
Raw Normal View History

2020-12-08 11:13:41 -05:00
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
matrix:
include:
- name: "MoltenVK (macOS)"
platform: "macos"
scheme: "MoltenVK Package (macOS only)"
demos-scheme: "Cube-macOS"
- name: "MoltenVK (iOS)"
platform: "ios"
scheme: "MoltenVK Package (iOS only)"
demos-scheme: ""
- name: "MoltenVK (tvOS)"
platform: "tvos"
scheme: "MoltenVK Package (tvOS only)"
demos-scheme: ""
fail-fast: false
name: '${{ matrix.name }}'
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Select Xcode version
# See: https://github.com/actions/virtual-environments/tree/main/images/macos
run: sudo xcode-select -switch /Applications/Xcode_12.2.app/Contents/Developer
2020-12-08 11:36:29 -05:00
- name: Create Build Logs Dir
run: |
mkdir -p "${HOME}/build_logs"
2020-12-08 11:13:41 -05:00
- name: Fetch Dependencies
run: |
./fetchDependencies -v --no-parallel-build --${{ matrix.platform }}
- name: Build MoltenVK
run: |
2020-12-08 11:36:29 -05:00
set -o pipefail && xcodebuild build -project MoltenVKPackaging.xcodeproj -scheme "${{ matrix.scheme }}" | tee "${HOME}/build_logs/xcodebuild.log" | xcpretty -c
- name: Output Build Logs on Failure
if: failure()
run: cat "${HOME}/build_logs/xcodebuild.log"
2020-12-08 11:13:41 -05:00
- name: Build Demos
if: success() && !(matrix.demos-scheme == '')
run: |
xcodebuild build -workspace Demos/Demos.xcworkspace -scheme "${{ matrix.demos-scheme }}"
2020-12-08 12:02:55 -05:00
- name: Tar Artifacts
# See: https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
run: tar -cvf "${{ matrix.platform }}.tar" Package/Release/
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.platform }}
path: "${{ matrix.platform }}.tar"