From 8af31fd32c8b98174f8d13e8f5136ecd8b92d2b2 Mon Sep 17 00:00:00 2001 From: SpaiR Date: Sat, 27 Mar 2021 16:45:13 +0300 Subject: [PATCH] [Build] Update GitHub actions to build natives --- .github/workflows/ci-build.yml | 74 +++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 49b5791..d7cf414 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -1,13 +1,77 @@ name: CI Build on: [ push, pull_request ] jobs: - gradle: - runs-on: ubuntu-latest + build-java: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + name: Build Java [${{ matrix.os }}] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Java 8 + uses: actions/setup-java@v1 with: java-version: 8 - - uses: eskatos/gradle-command-action@v1 + - name: Build + uses: eskatos/gradle-command-action@v1 with: arguments: build + build-natives: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + type: [win32, win64, linux32, linux64, mac64] + include: + - os: ubuntu-latest + type: win32 + expected: imgui-binding/build/libsNative/windows32/imgui-java.dll + - os: ubuntu-latest + type: win64 + expected: imgui-binding/build/libsNative/windows64/imgui-java64.dll + - os: ubuntu-latest + type: linux32 + expected: imgui-binding/build/libsNative/linux32/libimgui-java.so + - os: ubuntu-latest + type: linux64 + expected: imgui-binding/build/libsNative/linux64/libimgui-java64.so + - os: macos-latest + type: mac64 + expected: imgui-binding/build/libsNative/macosx64/libimgui-java64.dylib + exclude: + - os: ubuntu-latest + type: mac64 + - os: macos-latest + type: win32 + - os: macos-latest + type: win64 + - os: macos-latest + type: linux32 + - os: macos-latest + type: linux64 + name: Build Natives [${{ matrix.os }}]-[${{ matrix.type }}] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository and submodules + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up 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-get install mingw-w64 gcc-multilib g++-multilib + - name: Build [${{ matrix.type }}] + uses: eskatos/gradle-command-action@v1 + with: + arguments: :imgui-binding:generateLibs -Denvs=${{ matrix.type }} -Dlocal + - name: Check [${{ matrix.expected }}] + uses: andstor/file-existence-action@v1 + with: + files: ${{ matrix.expected }} +