Skip to content

Build Native Libraries #614

Build Native Libraries

Build Native Libraries #614

Workflow file for this run

name: Build Native Libraries
on:
push:
paths:
- '**.cpp'
- '**.mm'
- 'windows/build.gradle.kts'
- 'macos/build.gradle.kts'
- 'buildSrc/**'
pull_request:
paths:
- '**.cpp'
- '**.mm'
- 'windows/build.gradle.kts'
- 'macos/build.gradle.kts'
release:
types:
- published
schedule:
- cron: '0 0 1 * *'
jobs:
windows:
name: Windows (Java 11)
runs-on: windows-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build
uses: eskatos/gradle-command-action@v1
with:
arguments: :darklaf-windows:build -PskipSpotless -x test
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: Upload x86 artifact
uses: actions/upload-artifact@v1
with:
name: windows-x86
path: windows/build/libs/main/x86/darklaf-windows.dll
- name: Upload x86-64 artifact
uses: actions/upload-artifact@v1
with:
name: windows-x86-64
path: windows/build/libs/main/x86-64/darklaf-windows.dll
macOS:
name: macOS (Java 11)
runs-on: macos-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build
uses: eskatos/gradle-command-action@v1
with:
arguments: :darklaf-macos:build -PskipSpotless -x test
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload x86-64 artifact
uses: actions/upload-artifact@v1
with:
name: macos-x86-64
path: macos/build/libs/main/x86-64/libdarklaf-macos.dylib
- name: Upload arm64 artifact
uses: actions/upload-artifact@v1
with:
name: macos-arm64
path: macos/build/libs/main/arm64/libdarklaf-macos.dylib
- name: Print x86-64 library information
run: otool -l macos/build/libs/main/x86-64/libdarklaf-macos.dylib && file macos/build/libs/main/x86-64/libdarklaf-macos.dylib
- name: Print arm64 library information
run: otool -l macos/build/libs/main/arm64/libdarklaf-macos.dylib && file macos/build/libs/main/arm64/libdarklaf-macos.dylib