-
Notifications
You must be signed in to change notification settings - Fork 37
120 lines (103 loc) · 3.31 KB
/
build-natives.yml
File metadata and controls
120 lines (103 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build Native Libraries
on:
workflow_call:
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: Build Windows native DLLs
shell: cmd
working-directory: mediaplayer/src/jvmMain/native/windows
run: call build.bat
env:
NATIVE_LIBS_OUTPUT_DIR: ${{ github.workspace }}/build/nativeLibs
- name: Verify Windows natives
shell: bash
run: |
for f in \
build/nativeLibs/win32-x86-64/NativeVideoPlayer.dll \
build/nativeLibs/win32-arm64/NativeVideoPlayer.dll; do
if [ ! -f "$f" ]; then echo "MISSING: $f" >&2; exit 1; fi
echo "OK: $f ($(wc -c < "$f") bytes)"
done
- name: Upload Windows natives
uses: actions/upload-artifact@v7
with:
name: native-windows
path: build/nativeLibs/
retention-days: 1
macos:
runs-on: macos-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: Build macOS native dylibs
run: bash mediaplayer/src/jvmMain/native/macos/build.sh
env:
NATIVE_LIBS_OUTPUT_DIR: ${{ github.workspace }}/build/nativeLibs
- name: Verify macOS natives
run: |
for f in \
build/nativeLibs/darwin-aarch64/libNativeVideoPlayer.dylib \
build/nativeLibs/darwin-x86-64/libNativeVideoPlayer.dylib; do
if [ ! -f "$f" ]; then echo "MISSING: $f" >&2; exit 1; fi
echo "OK: $f ($(wc -c < "$f") bytes)"
done
- name: Upload macOS natives
uses: actions/upload-artifact@v7
with:
name: native-macos
path: build/nativeLibs/
retention-days: 1
linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86-64
- os: ubuntu-24.04-arm
arch: aarch64
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: Install GStreamer dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good
- name: Build Linux native library
working-directory: mediaplayer/src/jvmMain/native/linux
run: bash build.sh
env:
NATIVE_LIBS_OUTPUT_DIR: ${{ github.workspace }}/build/nativeLibs
- name: Verify Linux natives
run: |
test -f build/nativeLibs/linux-${{ matrix.arch }}/libNativeVideoPlayer.so
ls -la build/nativeLibs/linux-${{ matrix.arch }}/
- name: Upload Linux library
uses: actions/upload-artifact@v7
with:
name: native-linux-${{ matrix.arch }}
path: build/nativeLibs/
retention-days: 1