Skip to content

Commit

Permalink
LWJGL configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed May 10, 2024
1 parent bf097ed commit ea15d2b
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 140 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text
140 changes: 0 additions & 140 deletions .github/workflows/CI.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/lwjgl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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
MACOS: 10.13
- ARCH: arm64
ARCHS: arm64
MACOS: 11.0
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Cache key preparation
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 Dependencies
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: Fetch Dependencies (Use Built Cache)
run: ./fetchDependencies -v --none
if: steps.cache-dependencies.outputs.cache-hit == 'true'
- name: Fetch Dependencies
run: ARCHS=${{matrix.ARCHS}} ./fetchDependencies -v --macos
if: steps.cache-dependencies.outputs.cache-hit != 'true'
- name: Print dependencies log on failure
run: cat dependenciesbuild.log
if: failure()
- name: Build
run: |
xcodebuild -verbose -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (macOS only)" -configuration Release MACOSX_DEPLOYMENT_TARGET=${{matrix.MACOS}} ARCHS=${{matrix.ARCHS}} GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS MVK_LOGGING_ENABLED=0' -derivedDataPath bin build -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=4
ls -la bin
ls -la Package
strip -u -r Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib
- name: Print log on failure
run: cat "xcodebuild.log"
if: failure()
- name: Upload artifact
run: aws s3 cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
- name: Upload git revision
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
1 change: 1 addition & 0 deletions fetchDependencies
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ function build_impl() {
-enableUndefinedBehaviorSanitizer "${XC_USE_UBSAN}" \
-derivedDataPath "${XC_LCL_DD_PATH}" \
${XC_BUILD_VERBOSITY} \
${LWJGL_PARAMS} \
build

echo Completed building external libraries for ${XC_PLTFM}
Expand Down

0 comments on commit ea15d2b

Please sign in to comment.