Draft setup to build on Linus as well #14
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: MacOS Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: [macos-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Install ncurses | |
run: | | |
if [ "$(uname)" == "Darwin" ]; then | |
brew install ncurses | |
else | |
sudo apt-get install libncurses-dev | |
fi | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Install Kotlin | |
uses: sdkman/sdkman-action@master | |
with: | |
candidate: kotlin | |
version: '1.9.22' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew assemble | |
continue-on-error: true | |
- name: Print environment information | |
run: | | |
uname -a | |
java -version | |
kotlin -version | |
xcrun --show-sdk-path | |
xcode-select -p | |
ls -la /Library/Developer/CommandLineTools/SDKs | |
continue-on-error: true | |
- name: Check cinterop output | |
run: | | |
ls -la /usr/local/opt/ncurses/lib | |
ls -la /usr/local/opt/ncurses/include | |
ls -la build/classes/kotlin/native/main/cinterop/ | |
ls -la build/classes/kotlin/native/main/cinterop/dogcat-cinterop-ncurses.klib-build/ | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: build/bin/native/* |