|
4 | 4 | build-java:
|
5 | 5 | strategy:
|
6 | 6 | matrix:
|
7 |
| - os: [ubuntu-latest, macos-latest] |
8 |
| - name: Build Java [${{ matrix.os }}] |
| 7 | + os: [ubuntu-20.04, macos-10.15] |
| 8 | + name: Build Java |
9 | 9 | runs-on: ${{ matrix.os }}
|
10 | 10 | steps:
|
11 | 11 | - name: Checkout repository
|
12 | 12 | uses: actions/checkout@v2
|
| 13 | + |
13 | 14 | - name: Set up Java 8
|
14 | 15 | uses: actions/setup-java@v1
|
15 | 16 | with:
|
16 | 17 | java-version: 8
|
| 18 | + |
17 | 19 | - name: Build
|
18 | 20 | uses: eskatos/gradle-command-action@v1
|
19 | 21 | with:
|
20 | 22 | arguments: build
|
21 | 23 | build-natives:
|
| 24 | + env: |
| 25 | + FREETYPE_URL: https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.gz |
22 | 26 | strategy:
|
23 | 27 | matrix:
|
24 |
| - os: [ubuntu-latest, macos-latest] |
| 28 | + os: [ubuntu-20.04, macos-10.15] |
25 | 29 | type: [win, linux, mac]
|
| 30 | + freetype: [true, false] |
26 | 31 | include:
|
27 |
| - - os: ubuntu-latest |
28 |
| - type: win |
| 32 | + - type: win |
29 | 33 | expected: /tmp/imgui/libsNative/windows64/imgui-java64.dll
|
30 |
| - - os: ubuntu-latest |
31 |
| - type: linux |
| 34 | + libName: imgui-java64.dll |
| 35 | + libNameFt: imgui-java64-ft.dll |
| 36 | + - type: linux |
32 | 37 | expected: /tmp/imgui/libsNative/linux64/libimgui-java64.so
|
33 |
| - - os: macos-latest |
34 |
| - type: mac |
| 38 | + libName: libimgui-java64.so |
| 39 | + libNameFt: libimgui-java64-ft.so |
| 40 | + - type: mac |
35 | 41 | expected: /tmp/imgui/libsNative/macosx64/libimgui-java64.dylib
|
| 42 | + libName: libimgui-java64.dylib |
| 43 | + libNameFt: libimgui-java64-ft.dylib |
36 | 44 | exclude:
|
37 |
| - - os: ubuntu-latest |
| 45 | + - os: ubuntu-20.04 |
38 | 46 | type: mac
|
39 |
| - - os: macos-latest |
| 47 | + - os: macos-10.15 |
40 | 48 | type: win
|
41 |
| - - os: macos-latest |
| 49 | + - os: macos-10.15 |
42 | 50 | type: linux
|
43 |
| - name: Build Natives [${{ matrix.os }}]-[${{ matrix.type }}] |
| 51 | + name: Build Native (type=${{ matrix.type }}, freetype=${{ matrix.freetype }}) |
44 | 52 | runs-on: ${{ matrix.os }}
|
45 | 53 | steps:
|
46 | 54 | - name: Checkout repository and submodules
|
47 | 55 | uses: actions/checkout@v2
|
48 | 56 | with:
|
49 | 57 | submodules: recursive
|
| 58 | + |
50 | 59 | - name: Set up Java 8
|
51 | 60 | uses: actions/setup-java@v1
|
52 | 61 | with:
|
53 | 62 | java-version: 8
|
| 63 | + |
54 | 64 | - name: Ant Version
|
55 | 65 | run: ant -version
|
56 |
| - - if: matrix.os == 'ubuntu-latest' |
| 66 | + |
| 67 | + - if: matrix.os == 'ubuntu-20.04' |
57 | 68 | name: Install MinGW-w64/GCC/G++
|
58 |
| - run: sudo apt-get install mingw-w64 gcc-multilib g++-multilib |
59 |
| - - name: Build [${{ matrix.type }}] |
| 69 | + run: sudo apt install mingw-w64 |
| 70 | + |
| 71 | + - if: matrix.os == 'ubuntu-20.04' && matrix.type == 'linux' && matrix.freetype == true |
| 72 | + name: FreeType - Install |
| 73 | + run: sudo apt install libfreetype6-dev |
| 74 | + |
| 75 | + - if: matrix.os == 'ubuntu-20.04' && matrix.type == 'win' && matrix.freetype == true |
| 76 | + name: FreeType - Download |
| 77 | + run: | |
| 78 | + sudo wget -O /freetype.tar.gz ${{ env.FREETYPE_URL }} |
| 79 | + sudo mkdir /freetype |
| 80 | + sudo tar -xzf /freetype.tar.gz -C /freetype --strip-components=1 |
| 81 | +
|
| 82 | + - if: matrix.os == 'ubuntu-20.04' && matrix.type == 'win' && matrix.freetype == true |
| 83 | + name: FreeType - Compile & Install |
| 84 | + working-directory: /freetype |
| 85 | + run: | |
| 86 | + 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 |
| 87 | + sudo make |
| 88 | + sudo make install |
| 89 | +
|
| 90 | + - name: Build |
60 | 91 | uses: eskatos/gradle-command-action@v1
|
61 | 92 | with:
|
62 |
| - arguments: :imgui-binding:generateLibs -Denvs=${{ matrix.type }} |
63 |
| - - name: Check [${{ matrix.expected }}] |
64 |
| - uses: andstor/file-existence-action@v1 |
| 93 | + arguments: :imgui-binding:generateLibs -Denvs=${{ matrix.type }} -Dfreetype=${{ matrix.freetype }} |
| 94 | + |
| 95 | + - name: Upload Native |
| 96 | + uses: actions/upload-artifact@v2 |
65 | 97 | with:
|
66 |
| - files: ${{ matrix.expected }} |
| 98 | + name: ${{ matrix.freetype && matrix.libNameFt || matrix.libName }} |
| 99 | + path: ${{ matrix.expected }} |
| 100 | + if-no-files-found: error |
0 commit comments