Skip to content

Commit 4c3f4cf

Browse files
committed
Linux build
1 parent 95c9e72 commit 4c3f4cf

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.github/workflows/package.yml

+18-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Package
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
build-freeimage-android:
77
runs-on: ubuntu-latest
88
container:
99
image: unityci/editor:ubuntu-2021.3.14f1-android-1.0.1
@@ -27,4 +27,20 @@ jobs:
2727
with:
2828
name: "armeabi-v7a"
2929
path: build-armeabi-v7a/libFreeImage.so
30-
30+
build-freeimage-ubuntu:
31+
runs-on: ubuntu-latest
32+
container:
33+
image: ubuntu/16.04
34+
steps:
35+
- uses: actions/checkout@v1
36+
with:
37+
submodules: true
38+
- name: Build FreeImage
39+
run: |
40+
chmod a+x scripts/build.py
41+
python scripts/build.py
42+
shell: bash
43+
- uses: actions/upload-artifact@v3
44+
with:
45+
name: "arm64-v8a"
46+
path: build-arm64-v8a/libFreeImage.so

FreeImage

scripts/build.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os, shutil, errno, sys
2+
3+
def build(build_folder):
4+
if os.path.exists(build_folder):
5+
shutil.rmtree(build_folder)
6+
os.mkdir(build_folder)
7+
os.chdir(build_folder)
8+
9+
cmd_configure = """cmake ../FreeImage \
10+
-G"Unix Makefiles" \
11+
-DCMAKE_BUILD_TYPE=Release \
12+
-DFREEIMAGE_LIB=OFF \
13+
-DSUPPORT_FMT_TIFF=ON \
14+
-DSUPPORT_FMT_JPEG=ON""")
15+
16+
os.system(cmd_configure)
17+
os.system("cmake --build .")
18+
19+
build("build")

0 commit comments

Comments
 (0)