@@ -69,16 +69,16 @@ jobs:
69
69
- name : Ant Version
70
70
run : ant -version
71
71
72
- - if : matrix.os == 'ubuntu-latest'
73
- name : Install MinGW-w64/GCC/G++ (Linux & Windows)
72
+ - name : Install MinGW-w64/GCC/G++ (Linux & Windows)
73
+ if : matrix.os == 'ubuntu-latest'
74
74
run : sudo apt install mingw-w64
75
75
76
- - if : matrix.os == 'ubuntu-latest' && matrix.type == 'linux' && matrix.freetype == true
77
- name : FreeType - Install (Linux)
76
+ - name : FreeType - Install (Linux)
77
+ if : matrix.os == 'ubuntu-latest' && matrix.type == 'linux' && matrix.freetype == true
78
78
run : sudo apt install libfreetype6-dev
79
79
80
- - if : matrix.os == 'ubuntu-latest' && matrix.type == 'windows' && matrix.freetype == true
81
- name : FreeType - Install (Windows)
80
+ - name : FreeType - Install (Windows)
81
+ if : matrix.os == 'ubuntu-latest' && matrix.type == 'windows' && matrix.freetype == true
82
82
run : |
83
83
sudo mkdir /freetype
84
84
sudo tar -xzf ./vendor/freetype-2.12.1.tar.gz -C /freetype --strip-components=1
98
98
path : ${{ matrix.expected }}
99
99
100
100
update-bin :
101
- if : github.ref == 'refs/heads/main' # runs only on the main branch
102
101
name : Update Binaries
102
+ if : github.ref == 'refs/heads/main' # runs only on the main branch
103
103
runs-on : ubuntu-latest
104
104
needs : build-natives
105
105
steps :
@@ -111,20 +111,33 @@ jobs:
111
111
with :
112
112
path : /tmp/artifacts
113
113
114
+ - name : Equal Artifacts
115
+ id : equal-artifacts
116
+ continue-on-error : true
117
+ run : |
118
+ python3 buildSrc/scripts/equal_file_size.py /tmp/artifacts/native-libraries/imgui-java64.dll bin/imgui-java64.dll
119
+ python3 buildSrc/scripts/equal_file_size.py /tmp/artifacts/native-libraries/libimgui-java64.dylib bin/libimgui-java64.dylib
120
+ python3 buildSrc/scripts/equal_file_size.py /tmp/artifacts/native-libraries/libimgui-java64.so bin/libimgui-java64.so
121
+ python3 buildSrc/scripts/equal_file_size.py /tmp/artifacts/native-libraries-with-freetype/imgui-java64.dll bin/freetype/imgui-java64.dll
122
+ python3 buildSrc/scripts/equal_file_size.py /tmp/artifacts/native-libraries-with-freetype/libimgui-java64.dylib bin/freetype/libimgui-java64.dylib
123
+ python3 buildSrc/scripts/equal_file_size.py /tmp/artifacts/native-libraries-with-freetype/libimgui-java64.so bin/freetype/libimgui-java64.so
124
+
114
125
- name : Update
126
+ if : steps.equal-artifacts.outcome != 'success'
115
127
run : |
116
128
mv /tmp/artifacts/native-libraries/* bin/
117
129
mv /tmp/artifacts/native-libraries-with-freetype/* bin/freetype/
118
130
119
131
- name : Commit
132
+ if : steps.equal-artifacts.outcome != 'success'
120
133
uses : EndBug/add-and-commit@v9
121
134
with :
122
135
default_author : github_actions
123
136
message : ' [ci skip] update native binaries'
124
137
125
138
release :
126
- if : startsWith(github.ref, 'refs/tags/v') # if tag starts with "v"
127
139
name : Release
140
+ if : startsWith(github.ref, 'refs/tags/v') # if tag starts with "v"
128
141
runs-on : ubuntu-latest
129
142
needs : [ build-java, build-natives ]
130
143
steps :
0 commit comments