LWJGL configuration #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: LWJGL Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
env: | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0" | |
jobs: | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ARCH: [x64, arm64] | |
include: | |
- ARCH: x64 | |
ARCHS: x86_64 | |
- ARCH: arm64 | |
ARCHS: arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 3 | |
- run: | | |
XCODE_VERSION="$(xcodebuild -version)" | |
XCODE_VERSION="$(echo "${XCODE_VERSION}" | tr '\t\r\n ' '_')" | |
echo "::set-output name=XCODE_VERSION::${XCODE_VERSION}" | |
id: cache-key-prep | |
name: Cache key preparation | |
- uses: actions/cache@v2 | |
id: cache-dependencies | |
with: | |
path: | | |
External/build | |
!External/build/Intermediates | |
key: ${{runner.os}}-${{steps.cache-key-prep.outputs.XCODE_VERSION}}-${{matrix.ARCH}}-${{hashFiles('fetchDependencies','ExternalRevisions/**','ExternalDependencies.xcodeproj/**','Scripts/**')}} | |
name: Cache Dependencies | |
- run: ./fetchDependencies -v --none | |
if: steps.cache-dependencies.outputs.cache-hit == 'true' | |
name: Fetch Dependencies (Use Built Cache) | |
- run: ARCHS=${{matrix.ARCHS}} ./fetchDependencies -v --macos | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
name: Fetch Dependencies | |
- run: cat dependenciesbuild.log | |
if: failure() | |
name: Print dependencies log on failure | |
- run: | | |
xcodebuild -verbose -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (macOS only)" -configuration Release ARCHS=${{matrix.ARCHS}} GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS MVK_LOGGING_ENABLED=0' -derivedDataPath bin build -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=4 | |
strip -u -r bin/Build/Products/Release/dynamic/libMoltenVK.dylib | |
name: Build | |
- run: cat "xcodebuild.log" | |
if: failure() | |
name: Print log on failure | |
- run: aws s3 cp bin/Build/Products/Release/dynamic/libMoltenVK.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS | |
name: Upload artifact | |
- run: | | |
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libMoltenVK.dylib.git | |
aws s3 cp libMoltenVK.dylib.git s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS | |
name: Upload git revision |