66 pull_request :
77
88jobs :
9- build-macos-x86_64 :
9+ build-macos-arm64 :
1010 runs-on : macos-latest
1111 steps :
1212 - name : Checkout repository and submodules
13- uses : actions/checkout@v3
13+ uses : actions/checkout@v4
1414 with :
1515 submodules : recursive
1616 - name : Setup Java
17- uses : actions/setup-java@v3
17+ uses : actions/setup-java@v4
1818 with :
1919 distribution : ' temurin'
2020 java-version : ' 11'
@@ -23,41 +23,98 @@ jobs:
2323 - name : Build native code
2424 run : |
2525 export CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin"
26+ export CXXFLAGS="-I${JAVA_HOME}/include -static-libstdc++"
2627 cd libjpeg-turbo
2728 autoreconf -fiv
2829 mkdir build
2930 cd build
3031 ../configure --with-java
3132 make
32- - uses : actions/upload-artifact@v3
33+ - uses : actions/upload-artifact@v4
3334 if : failure()
3435 with :
3536 name : configure log
3637 path : libjpeg-turbo/build/config.log
3738 - name : Upload artifacts
38- uses : actions/upload-artifact@v2
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : artifacts-macos-arm64
42+ path : libjpeg-turbo/build/.libs/libturbojpeg.dylib
43+ if-no-files-found : error
44+ build-macos-x86_64 :
45+ runs-on : macos-15-intel
46+ steps :
47+ - name : Checkout repository and submodules
48+ uses : actions/checkout@v4
49+ with :
50+ submodules : recursive
51+ - name : Setup Java
52+ uses : actions/setup-java@v4
53+ with :
54+ distribution : ' temurin'
55+ java-version : ' 11'
56+ - name : Install build dependencies
57+ run : brew install automake libtool nasm
58+ - name : Build native code
59+ run : |
60+ export CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin"
61+ cd libjpeg-turbo
62+ autoreconf -fiv
63+ mkdir build
64+ cd build
65+ ../configure --with-java
66+ make
67+ - uses : actions/upload-artifact@v4
68+ if : failure()
69+ with :
70+ name : configure log
71+ path : libjpeg-turbo/build/config.log
72+ - name : Upload artifacts
73+ uses : actions/upload-artifact@v4
3974 with :
4075 name : artifacts-macos-x86_64
4176 path : libjpeg-turbo/build/.libs/libturbojpeg.dylib
4277 if-no-files-found : error
78+ build-linux-arm64 :
79+ runs-on : ubuntu-24.04-arm
80+ steps :
81+ - name : Checkout repository and submodules
82+ uses : actions/checkout@v4
83+ with :
84+ submodules : recursive
85+ - name : Build native code
86+ run : |
87+ docker build -f Dockerfile_aarch64 . -t native_builder
88+ docker run -v $(pwd):/build --user ${UID} -t native_builder /build/linux.sh
89+ - uses : actions/upload-artifact@v4
90+ if : failure()
91+ with :
92+ name : configure log
93+ path : libjpeg-turbo/build/config.log
94+ - name : Upload artifacts
95+ uses : actions/upload-artifact@v4
96+ with :
97+ name : artifacts-linux-arm64
98+ path : libjpeg-turbo/build/.libs/libturbojpeg.so
99+ if-no-files-found : error
43100 build-linux-x86_64 :
44101 runs-on : ubuntu-latest
45102 steps :
46103 - name : Checkout repository and submodules
47- uses : actions/checkout@v3
104+ uses : actions/checkout@v4
48105 with :
49106 submodules : recursive
50107 - name : Build native code
51108 run : |
52- docker build -f Dockerfile2010 . -t native_builder
109+ docker build -f Dockerfile_x86_64 . -t native_builder
53110 docker run -v $(pwd):/build --user ${UID} -t native_builder /build/linux.sh
54- - uses : actions/upload-artifact@v3
111+ - uses : actions/upload-artifact@v4
55112 if : failure()
56113 with :
57114 name : configure log
58115 path : libjpeg-turbo/build/config.log
59116 - name : Upload artifacts
60- uses : actions/upload-artifact@v2
117+ uses : actions/upload-artifact@v4
61118 with :
62119 name : artifacts-linux-x86_64
63120 path : libjpeg-turbo/build/.libs/libturbojpeg.so
@@ -66,11 +123,11 @@ jobs:
66123 runs-on : windows-latest
67124 steps :
68125 - name : Checkout repository and submodules
69- uses : actions/checkout@v3
126+ uses : actions/checkout@v4
70127 with :
71128 submodules : recursive
72129 - name : Setup Java
73- uses : actions/setup-java@v3
130+ uses : actions/setup-java@v4
74131 with :
75132 distribution : ' temurin'
76133 java-version : ' 11'
@@ -88,54 +145,57 @@ jobs:
88145 cmake -DWITH_JAVA=ON ..
89146 cmake --build .
90147 - name : Upload artifacts
91- uses : actions/upload-artifact@v2
148+ uses : actions/upload-artifact@v4
92149 with :
93150 name : artifacts-windows-x86_64
94151 path : libjpeg-turbo/build/**/turbojpeg.dll
95152 if-no-files-found : error
96153 build-package :
97- needs : [build-macos-x86_64, build-windows-x86_64, build-linux-x86_64]
154+ needs : [build-macos-arm64, build-macos- x86_64, build-windows-x86_64, build-linux-arm64 , build-linux-x86_64]
98155 runs-on : ubuntu-latest
99156 env :
100157 gradle_commands : --stacktrace clean jar
101158 steps :
102- - uses : actions/checkout@v3
103- - uses : actions/setup-java@v1
159+ - uses : actions/checkout@v4
160+ - uses : actions/setup-java@v4
104161 with :
162+ distribution : ' zulu'
105163 java-version : ' 8'
106164 - name : Run commands
107165 run : |
108166 ./gradlew ${{ env.gradle_commands }}
109167 - name : Download artifacts from build
110- uses : actions/download-artifact@v2
168+ uses : actions/download-artifact@v4
111169 - name : List artifacts
112170 run : ls -R
113171 - name : Repack jar
114172 run : ./jar-pack.sh
115173 - name : Upload artifacts
116- uses : actions/upload-artifact@v2
174+ uses : actions/upload-artifact@v4
117175 with :
118176 name : libjpeg-turbo-java
119177 path : build/libs/*.jar
120178 test :
121179 needs : build-package
122180 strategy :
123181 matrix :
124- os : [ubuntu-latest, windows-latest, macos-latest]
182+ os : [ubuntu-24.04-arm, ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
183+ java : [8, 11, 17, 21]
125184 runs-on : ${{ matrix.os }}
126185 env :
127186 gradle_commands : --stacktrace clean jar
128187 test_commands : --stacktrace test
129188 steps :
130- - uses : actions/checkout@v3
131- - uses : actions/setup-java@v1
189+ - uses : actions/checkout@v4
190+ - uses : actions/setup-java@v4
132191 with :
133- java-version : ' 8'
192+ distribution : ' zulu'
193+ java-version : ' ${{ matrix.java }}'
134194 - name : Run commands
135195 run : |
136196 ./gradlew ${{ env.gradle_commands }}
137197 - name : Download artifacts from build
138- uses : actions/download-artifact@v2
198+ uses : actions/download-artifact@v4
139199 - name : Move packed jar to build dir
140200 run : rm build/libs/libjpeg-turbo*.jar; mv libjpeg-turbo-java/libjpeg-turbo*.jar build/libs/
141201 - name : Run tests
@@ -148,14 +208,16 @@ jobs:
148208 runs-on : ubuntu-latest
149209 steps :
150210 - name : Download artifacts from build
151- uses : actions/download-artifact@v2
211+ uses : actions/download-artifact@v4
152212 - name : List artifacts
153213 run : ls -R
154214 - name : Release
155215 uses : softprops/action-gh-release@v1
156216 with :
157217 files : |
218+ artifacts-macos-arm64/*.dylib
158219 artifacts-macos-x86_64/*.dylib
220+ artifacts-linux-arm64/*.so
159221 artifacts-linux-x86_64/*.so
160222 artifacts-windows-x86_64/Debug/*.dll
161223 libjpeg-turbo-java/*.jar
0 commit comments