96 lines
3.0 KiB
YAML
96 lines
3.0 KiB
YAML
name: CI
|
|
on: [push]
|
|
jobs:
|
|
build-java:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
name: Build Java
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java 8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 8
|
|
|
|
- name: Build
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
arguments: buildAll
|
|
|
|
build-natives:
|
|
env:
|
|
FREETYPE_URL: https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.gz
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
type: [win, linux, mac]
|
|
freetype: [true, false]
|
|
include:
|
|
- type: win
|
|
expected: /tmp/imgui/libsNative/windows64/imgui-java64.dll
|
|
- type: linux
|
|
expected: /tmp/imgui/libsNative/linux64/libimgui-java64.so
|
|
- type: mac
|
|
expected: /tmp/imgui/libsNative/macosx64/libimgui-java64.dylib
|
|
exclude:
|
|
- os: ubuntu-latest
|
|
type: mac
|
|
- os: macos-latest
|
|
type: win
|
|
- os: macos-latest
|
|
type: linux
|
|
name: Build Native (type=${{ matrix.type }}, freetype=${{ matrix.freetype }})
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout Repository and Submodules
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Java 8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 8
|
|
|
|
- name: Ant Version
|
|
run: ant -version
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
name: Install MinGW-w64/GCC/G++
|
|
run: sudo apt install mingw-w64
|
|
|
|
- if: matrix.os == 'ubuntu-latest' && matrix.type == 'linux' && matrix.freetype == true
|
|
name: FreeType - Install
|
|
run: sudo apt install libfreetype6-dev
|
|
|
|
- if: matrix.os == 'ubuntu-latest' && matrix.type == 'win' && matrix.freetype == true
|
|
name: FreeType - Download
|
|
run: |
|
|
sudo wget -O /freetype.tar.gz ${{ env.FREETYPE_URL }}
|
|
sudo mkdir /freetype
|
|
sudo tar -xzf /freetype.tar.gz -C /freetype --strip-components=1
|
|
|
|
- if: matrix.os == 'ubuntu-latest' && matrix.type == 'win' && matrix.freetype == true
|
|
name: FreeType - Compile & Install
|
|
working-directory: /freetype
|
|
run: |
|
|
sudo ./configure --with-zlib=no --with-bzip2=no --with-png=no --with-harfbuzz=no --with-brotli=no --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32
|
|
sudo make
|
|
sudo make install
|
|
|
|
- name: Build
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
arguments: :imgui-binding:generateLibs -Denvs=${{ matrix.type }} -Dfreetype=${{ matrix.freetype }}
|
|
|
|
- name: Upload Native
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ matrix.freetype && 'freetype' || 'common' }}
|
|
path: ${{ matrix.expected }}
|
|
if-no-files-found: error
|