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:
|
2021-10-25 19:27:33 +02:00
|
|
|
xcode: [ "13.1" ]
|
2021-02-03 15:59:50 -05:00
|
|
|
platform: [ "macos", "maccat", "ios", "tvos" ]
|
2021-10-25 19:34:37 +02:00
|
|
|
os: [ "macos-11" ]
|
2021-02-03 15:59:50 -05:00
|
|
|
upload_artifacts: [ true ]
|
2021-02-03 16:00:38 -05:00
|
|
|
# additional specific configurations
|
|
|
|
include:
|
2021-10-25 19:27:33 +02:00
|
|
|
# "Legacy" Xcode 11.7 & 12.5.1 macOS builds
|
2021-02-03 16:00:38 -05:00
|
|
|
- xcode: "11.7"
|
|
|
|
platform: "macos"
|
2021-10-25 19:34:37 +02:00
|
|
|
os: "macos-10.15"
|
2021-02-03 16:00:38 -05:00
|
|
|
upload_artifacts: false
|
2021-10-25 19:27:33 +02:00
|
|
|
- xcode: "12.5.1"
|
|
|
|
platform: "macos"
|
2021-10-25 19:34:37 +02:00
|
|
|
os: "macos-11"
|
2021-10-25 19:27:33 +02:00
|
|
|
upload_artifacts: false
|
2020-12-08 11:13:41 -05:00
|
|
|
fail-fast: false
|
|
|
|
|
2021-02-03 15:59:50 -05:00
|
|
|
name: 'MoltenVK (Xcode ${{ matrix.xcode }} - ${{ matrix.platform }})'
|
2020-12-08 11:13:41 -05:00
|
|
|
|
|
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
|
2021-02-03 15:59:50 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
env:
|
|
|
|
# See: https://github.com/actions/virtual-environments/tree/main/images/macos
|
|
|
|
XCODE_DEV_PATH: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
|
2020-12-08 11:13:41 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Select Xcode version
|
2020-12-09 09:47:08 -05:00
|
|
|
run: sudo xcode-select -switch "${XCODE_DEV_PATH}"
|
2020-12-08 11:13:41 -05:00
|
|
|
|
2020-12-08 13:21:57 -05:00
|
|
|
- name: Prep
|
|
|
|
id: prep
|
2020-12-08 11:36:29 -05:00
|
|
|
run: |
|
2020-12-08 13:21:57 -05:00
|
|
|
echo "Get Xcode version info"
|
|
|
|
XCODE_VERSION="$(xcodebuild -version)"
|
|
|
|
echo "${XCODE_VERSION}"
|
|
|
|
XCODE_VERSION="$(echo "${XCODE_VERSION}" | tr '\t\r\n ' '_')"
|
|
|
|
echo "${XCODE_VERSION}"
|
|
|
|
echo "::set-output name=XCODE_VERSION::${XCODE_VERSION}"
|
|
|
|
|
|
|
|
- name: Cache Dependencies
|
|
|
|
id: cache-dependencies
|
|
|
|
if: success() && !(github.event_name == 'push' && contains(github.ref, 'refs/tags/')) # never cache dependencies for pushed tags
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-12-09 09:47:08 -05:00
|
|
|
path: |
|
|
|
|
External/build
|
|
|
|
!External/build/Intermediates
|
2020-12-08 13:21:57 -05:00
|
|
|
key: ${{ runner.os }}-${{ steps.prep.outputs.XCODE_VERSION }}-${{ matrix.platform }}-${{ hashFiles('fetchDependencies','ExternalRevisions/**','ExternalDependencies.xcodeproj/**','Scripts/**') }}
|
|
|
|
|
|
|
|
- name: Fetch Dependencies (Use Built Cache)
|
|
|
|
if: steps.cache-dependencies.outputs.cache-hit == 'true'
|
|
|
|
run: |
|
2020-12-09 15:19:17 -05:00
|
|
|
./fetchDependencies -v --none
|
2020-12-08 11:36:29 -05:00
|
|
|
|
2020-12-08 11:13:41 -05:00
|
|
|
- name: Fetch Dependencies
|
2020-12-08 13:21:57 -05:00
|
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
2020-12-08 11:13:41 -05:00
|
|
|
run: |
|
2020-12-09 15:19:17 -05:00
|
|
|
./fetchDependencies -v --${{ matrix.platform }}
|
2020-12-08 11:13:41 -05:00
|
|
|
|
2020-12-09 13:43:56 -05:00
|
|
|
- name: Output Dependency Build Logs on Failure
|
|
|
|
if: failure()
|
|
|
|
run: cat "dependenciesbuild.log"
|
|
|
|
|
2020-12-08 11:13:41 -05:00
|
|
|
- name: Build MoltenVK
|
|
|
|
run: |
|
2020-12-09 09:47:08 -05:00
|
|
|
make ${{ matrix.platform }}
|
2020-12-08 11:36:29 -05:00
|
|
|
|
2020-12-09 13:43:56 -05:00
|
|
|
- name: Output MoltenVK Build Logs on Failure
|
2020-12-08 11:36:29 -05:00
|
|
|
if: failure()
|
2020-12-09 13:43:56 -05:00
|
|
|
run: |
|
|
|
|
if [ -f "xcodebuild.log" ]; then
|
|
|
|
cat "xcodebuild.log"
|
|
|
|
fi
|
2020-12-08 11:36:29 -05:00
|
|
|
|
2020-12-08 12:02:55 -05:00
|
|
|
- name: Tar Artifacts
|
2021-02-03 15:59:50 -05:00
|
|
|
if: success() && matrix.upload_artifacts == true
|
2020-12-08 12:02:55 -05:00
|
|
|
# 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
|
2021-02-03 15:59:50 -05:00
|
|
|
if: success() && matrix.upload_artifacts == true
|
2020-12-08 12:02:55 -05:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.platform }}
|
|
|
|
path: "${{ matrix.platform }}.tar"
|