Skip to content

Commit 4cc0782

Browse files
authored
Fix macOS runner by manually specifying dylib locations (#185)
1 parent 7f70c13 commit 4cc0782

File tree

15 files changed

+58
-48
lines changed

15 files changed

+58
-48
lines changed

.github/workflows/checks.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
uses: actions/setup-java@v4
1919
with:
2020
distribution: "corretto"
21-
java-version: 25 # run a newer version on macOS to work around libzip linking issues
21+
java-version: 23
2222

2323
- name: Setup Gradle
2424
uses: gradle/actions/setup-gradle@v3
2525
with:
26-
gradle-version: 8.14
26+
gradle-version: 9.1.0
2727

2828
- name: Run checks
2929
run: ./gradlew build check shadowJar
@@ -34,21 +34,21 @@ jobs:
3434
./run_samples.sh
3535
3636
macos-sense-check:
37-
runs-on: macos-14
37+
runs-on: macos-26
3838
steps:
3939
- name: Checkout
4040
uses: actions/checkout@v4
4141

4242
- name: Setup Java
4343
uses: actions/setup-java@v4
4444
with:
45-
distribution: "temurin"
45+
distribution: "corretto"
4646
java-version: 23
4747

4848
- name: Setup Gradle
4949
uses: gradle/actions/setup-gradle@v3
5050
with:
51-
gradle-version: 8.14
51+
gradle-version: 9.1.0
5252

5353
- name: Run checks
5454
run: ./gradlew build check shadowJar
@@ -67,13 +67,13 @@ jobs:
6767
- name: Setup Java
6868
uses: actions/setup-java@v4
6969
with:
70-
distribution: "temurin"
70+
distribution: "corretto"
7171
java-version: 23
7272

7373
- name: Setup Gradle
7474
uses: gradle/actions/setup-gradle@v3
7575
with:
76-
gradle-version: 8.14
76+
gradle-version: 9.1.0
7777

7878
- name: Run samples
7979
shell: pwsh
@@ -99,13 +99,13 @@ jobs:
9999
- name: Setup Java
100100
uses: actions/setup-java@v4
101101
with:
102-
distribution: "temurin"
102+
distribution: "corretto"
103103
java-version: 23
104104

105105
- name: Setup Gradle
106106
uses: gradle/actions/setup-gradle@v3
107107
with:
108-
gradle-version: 8.14
108+
gradle-version: 9.1.0
109109

110110
- name: Run checks
111111
run: ./run_single_docker_tests.sh ${{ matrix.variant }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repositories {
2323
}
2424

2525
dependencies {
26-
implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.2")
26+
implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.3")
2727
}
2828
```
2929

@@ -35,7 +35,7 @@ You must add `--enable-native-access=ALL-UNNAMED` to your JVM runtime arguments.
3535
about "Restricted methods". In the future, the JVM will throw an error if you don't explicitly include this flag.
3636

3737
As the project uses the Java FFM API, and Markdown comments, your target must also be JDK 23+. Bindings are currently
38-
generated from libvips `8.17.0` (but should be safe to use with different minor or patch versions).
38+
generated from libvips `8.17.2` (but should be safe to use with different minor or patch versions).
3939

4040
> [!NOTE]
4141
> This library **does not** include `libvips` in the download, you must add it to the system/container you're building

core/src/main/java/app/photofox/vipsffm/VImage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8452,8 +8452,8 @@ public static VImage sum(Arena arena, List<VImage> in, VipsOption... args) throw
84528452
///
84538453
/// Rendering uses the librsvg library and should be fast.
84548454
///
8455-
/// Use `dpi` to set the rendering resolution. The default is 72. You can also
8456-
/// scale the rendering by `scale`.
8455+
/// Use `dpi` to set the rendering resolution. The default is 72. Additionally,
8456+
/// you can scale by setting `scale`. If you set both, they combine.
84578457
///
84588458
/// This function only reads the image header and does not render any pixel
84598459
/// data. Rendering occurs when pixels are accessed.
@@ -8882,7 +8882,7 @@ public static VImage thumbnailSource(Arena arena, VSource source, int width, Vip
88828882
/// default, loaders are permissive, that is, [VipsFailOn#FAIL_ON_NONE].
88838883
///
88848884
/// When using libtiff 4.7.0+, the TIFF loader will limit memory allocation
8885-
/// for tag processing to 20MB to prevent denial of service attacks.
8885+
/// for decoding each input file to 50MB to prevent denial of service attacks.
88868886
/// Set `unlimited` to remove this limit.
88878887
///
88888888
/// Any ICC profile is read and attached to the VIPS image as

core/src/main/java/app/photofox/vipsffm/jextract/VipsRaw.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15177,25 +15177,25 @@ public static int VIPS_SBUF_BUFFER_SIZE() {
1517715177
}
1517815178
/**
1517915179
* {@snippet lang=c :
15180-
* #define VIPS_VERSION "8.17.1"
15180+
* #define VIPS_VERSION "8.17.2"
1518115181
* }
1518215182
*/
1518315183
public static MemorySegment VIPS_VERSION() {
1518415184
class Holder {
1518515185
static final MemorySegment VIPS_VERSION
15186-
= VipsRaw.LIBRARY_ARENA.allocateFrom("8.17.1");
15186+
= VipsRaw.LIBRARY_ARENA.allocateFrom("8.17.2");
1518715187
}
1518815188
return Holder.VIPS_VERSION;
1518915189
}
1519015190
/**
1519115191
* {@snippet lang=c :
15192-
* #define VIPS_VERSION_STRING "8.17.1"
15192+
* #define VIPS_VERSION_STRING "8.17.2"
1519315193
* }
1519415194
*/
1519515195
public static MemorySegment VIPS_VERSION_STRING() {
1519615196
class Holder {
1519715197
static final MemorySegment VIPS_VERSION_STRING
15198-
= VipsRaw.LIBRARY_ARENA.allocateFrom("8.17.1");
15198+
= VipsRaw.LIBRARY_ARENA.allocateFrom("8.17.2");
1519915199
}
1520015200
return Holder.VIPS_VERSION_STRING;
1520115201
}
@@ -15217,10 +15217,10 @@ public static int VIPS_MAJOR_VERSION() {
1521715217
public static int VIPS_MINOR_VERSION() {
1521815218
return VIPS_MINOR_VERSION;
1521915219
}
15220-
private static final int VIPS_MICRO_VERSION = (int)1L;
15220+
private static final int VIPS_MICRO_VERSION = (int)2L;
1522115221
/**
1522215222
* {@snippet lang=c :
15223-
* #define VIPS_MICRO_VERSION 1
15223+
* #define VIPS_MICRO_VERSION 2
1522415224
* }
1522515225
*/
1522615226
public static int VIPS_MICRO_VERSION() {
@@ -15235,10 +15235,10 @@ public static int VIPS_MICRO_VERSION() {
1523515235
public static int VIPS_LIBRARY_CURRENT() {
1523615236
return VIPS_LIBRARY_CURRENT;
1523715237
}
15238-
private static final int VIPS_LIBRARY_REVISION = (int)1L;
15238+
private static final int VIPS_LIBRARY_REVISION = (int)2L;
1523915239
/**
1524015240
* {@snippet lang=c :
15241-
* #define VIPS_LIBRARY_REVISION 1
15241+
* #define VIPS_LIBRARY_REVISION 2
1524215242
* }
1524315243
*/
1524415244
public static int VIPS_LIBRARY_REVISION() {

core/src/main/java/app/photofox/vipsffm/jextract/_GValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static class data {
123123
VipsRaw.C_FLOAT.withName("v_float"),
124124
VipsRaw.C_DOUBLE.withName("v_double"),
125125
VipsRaw.C_POINTER.withName("v_pointer")
126-
).withName("$anon$119:3");
126+
).withName("$anon$137:3");
127127

128128
/**
129129
* The layout of this union

docs/app.photofox.vipsffm/app/photofox/vipsffm/VImage.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11028,8 +11028,8 @@ <h3>svgload</h3>
1102811028
throws <span class="exceptions"><a href="VipsError.html" title="class in app.photofox.vipsffm">VipsError</a></span></div>
1102911029
<div class="block"><p>Render a SVG file into a VIPS image.</p>
1103011030
<p>Rendering uses the librsvg library and should be fast.</p>
11031-
<p>Use <code>dpi</code> to set the rendering resolution. The default is 72. You can also
11032-
scale the rendering by <code>scale</code>.</p>
11031+
<p>Use <code>dpi</code> to set the rendering resolution. The default is 72. Additionally,
11032+
you can scale by setting <code>scale</code>. If you set both, they combine.</p>
1103311033
<p>This function only reads the image header and does not render any pixel
1103411034
data. Rendering occurs when pixels are accessed.</p>
1103511035
<p>SVGs larger than 10MB are normally blocked for security. Set <code>unlimited</code> to
@@ -11373,7 +11373,7 @@ <h3>tiffload</h3>
1137311373
<p>Use <code>fail_on</code> to set the type of error that will cause load to fail. By
1137411374
default, loaders are permissive, that is, <a href="enums/VipsFailOn.html#FAIL_ON_NONE"><code>VipsFailOn.FAIL_ON_NONE</code></a>.</p>
1137511375
<p>When using libtiff 4.7.0+, the TIFF loader will limit memory allocation
11376-
for tag processing to 20MB to prevent denial of service attacks.
11376+
for decoding each input file to 50MB to prevent denial of service attacks.
1137711377
Set <code>unlimited</code> to remove this limit.</p>
1137811378
<p>Any ICC profile is read and attached to the VIPS image as
1137911379
<code>META_ICC_NAME</code>. Any XMP metadata is read and attached to the image

docs/app.photofox.vipsffm/app/photofox/vipsffm/jextract/VipsRaw.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11063,7 +11063,7 @@ <h2>Method Summary</h2>
1106311063
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
1106411064
<div class="block">
1106511065
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
11066-
<pre class="snippet" id="snippet-VIPS_LIBRARY_REVISION()1"><code class="language-c">#define VIPS_LIBRARY_REVISION 1
11066+
<pre class="snippet" id="snippet-VIPS_LIBRARY_REVISION()1"><code class="language-c">#define VIPS_LIBRARY_REVISION 2
1106711067
</code></pre>
1106811068
</div>
1106911069
</div>
@@ -11463,7 +11463,7 @@ <h2>Method Summary</h2>
1146311463
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
1146411464
<div class="block">
1146511465
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
11466-
<pre class="snippet" id="snippet-VIPS_MICRO_VERSION()1"><code class="language-c">#define VIPS_MICRO_VERSION 1
11466+
<pre class="snippet" id="snippet-VIPS_MICRO_VERSION()1"><code class="language-c">#define VIPS_MICRO_VERSION 2
1146711467
</code></pre>
1146811468
</div>
1146911469
</div>
@@ -14831,7 +14831,7 @@ <h2>Method Summary</h2>
1483114831
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
1483214832
<div class="block">
1483314833
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
14834-
<pre class="snippet" id="snippet-VIPS_VERSION()1"><code class="language-c">#define VIPS_VERSION "8.17.1"
14834+
<pre class="snippet" id="snippet-VIPS_VERSION()1"><code class="language-c">#define VIPS_VERSION "8.17.2"
1483514835
</code></pre>
1483614836
</div>
1483714837
</div>
@@ -14851,7 +14851,7 @@ <h2>Method Summary</h2>
1485114851
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
1485214852
<div class="block">
1485314853
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
14854-
<pre class="snippet" id="snippet-VIPS_VERSION_STRING()1"><code class="language-c">#define VIPS_VERSION_STRING "8.17.1"
14854+
<pre class="snippet" id="snippet-VIPS_VERSION_STRING()1"><code class="language-c">#define VIPS_VERSION_STRING "8.17.2"
1485514855
</code></pre>
1485614856
</div>
1485714857
</div>
@@ -32228,7 +32228,7 @@ <h3>VIPS_VERSION</h3>
3222832228
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a></span>&nbsp;<span class="element-name">VIPS_VERSION</span>()</div>
3222932229
<div class="block">
3223032230
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
32231-
<pre class="snippet" id="snippet-VIPS_VERSION()2"><code class="language-c">#define VIPS_VERSION "8.17.1"
32231+
<pre class="snippet" id="snippet-VIPS_VERSION()2"><code class="language-c">#define VIPS_VERSION "8.17.2"
3223232232
</code></pre>
3223332233
</div>
3223432234
</div>
@@ -32242,7 +32242,7 @@ <h3>VIPS_VERSION_STRING</h3>
3224232242
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a></span>&nbsp;<span class="element-name">VIPS_VERSION_STRING</span>()</div>
3224332243
<div class="block">
3224432244
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
32245-
<pre class="snippet" id="snippet-VIPS_VERSION_STRING()2"><code class="language-c">#define VIPS_VERSION_STRING "8.17.1"
32245+
<pre class="snippet" id="snippet-VIPS_VERSION_STRING()2"><code class="language-c">#define VIPS_VERSION_STRING "8.17.2"
3224632246
</code></pre>
3224732247
</div>
3224832248
</div>
@@ -32284,7 +32284,7 @@ <h3>VIPS_MICRO_VERSION</h3>
3228432284
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">VIPS_MICRO_VERSION</span>()</div>
3228532285
<div class="block">
3228632286
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
32287-
<pre class="snippet" id="snippet-VIPS_MICRO_VERSION()2"><code class="language-c">#define VIPS_MICRO_VERSION 1
32287+
<pre class="snippet" id="snippet-VIPS_MICRO_VERSION()2"><code class="language-c">#define VIPS_MICRO_VERSION 2
3228832288
</code></pre>
3228932289
</div>
3229032290
</div>
@@ -32312,7 +32312,7 @@ <h3>VIPS_LIBRARY_REVISION</h3>
3231232312
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">VIPS_LIBRARY_REVISION</span>()</div>
3231332313
<div class="block">
3231432314
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
32315-
<pre class="snippet" id="snippet-VIPS_LIBRARY_REVISION()2"><code class="language-c">#define VIPS_LIBRARY_REVISION 1
32315+
<pre class="snippet" id="snippet-VIPS_LIBRARY_REVISION()2"><code class="language-c">#define VIPS_LIBRARY_REVISION 2
3231632316
</code></pre>
3231732317
</div>
3231832318
</div>

docs/index-all.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18831,7 +18831,7 @@ <h2 class="title" id="I:V">V</h2>
1883118831
<dd>
1883218832
<div class="block">
1883318833
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="resource-files/copy.svg" alt="Copy snippet"></button>
18834-
<pre class="snippet" id="snippet-VIPS_LIBRARY_REVISION()3"><code class="language-c">#define VIPS_LIBRARY_REVISION 1
18834+
<pre class="snippet" id="snippet-VIPS_LIBRARY_REVISION()3"><code class="language-c">#define VIPS_LIBRARY_REVISION 2
1883518835
</code></pre>
1883618836
</div>
1883718837
</div>
@@ -19191,7 +19191,7 @@ <h2 class="title" id="I:V">V</h2>
1919119191
<dd>
1919219192
<div class="block">
1919319193
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="resource-files/copy.svg" alt="Copy snippet"></button>
19194-
<pre class="snippet" id="snippet-VIPS_MICRO_VERSION()3"><code class="language-c">#define VIPS_MICRO_VERSION 1
19194+
<pre class="snippet" id="snippet-VIPS_MICRO_VERSION()3"><code class="language-c">#define VIPS_MICRO_VERSION 2
1919519195
</code></pre>
1919619196
</div>
1919719197
</div>
@@ -22194,7 +22194,7 @@ <h2 class="title" id="I:V">V</h2>
2219422194
<dd>
2219522195
<div class="block">
2219622196
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="resource-files/copy.svg" alt="Copy snippet"></button>
22197-
<pre class="snippet" id="snippet-VIPS_VERSION()3"><code class="language-c">#define VIPS_VERSION "8.17.1"
22197+
<pre class="snippet" id="snippet-VIPS_VERSION()3"><code class="language-c">#define VIPS_VERSION "8.17.2"
2219822198
</code></pre>
2219922199
</div>
2220022200
</div>
@@ -22212,7 +22212,7 @@ <h2 class="title" id="I:V">V</h2>
2221222212
<dd>
2221322213
<div class="block">
2221422214
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="resource-files/copy.svg" alt="Copy snippet"></button>
22215-
<pre class="snippet" id="snippet-VIPS_VERSION_STRING()3"><code class="language-c">#define VIPS_VERSION_STRING "8.17.1"
22215+
<pre class="snippet" id="snippet-VIPS_VERSION_STRING()3"><code class="language-c">#define VIPS_VERSION_STRING "8.17.2"
2221622216
</code></pre>
2221722217
</div>
2221822218
</div>

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h2 id="usage-heading">Usage</h2>
7070
}
7171

7272
dependencies {
73-
implementation(&quot;app.photofox.vips-ffm:vips-ffm-core:1.9.2&quot;)
73+
implementation(&quot;app.photofox.vips-ffm:vips-ffm-core:1.9.3&quot;)
7474
}
7575
</code></pre>
7676
<p>Figure out what you're trying to do by looking at the <a href="https://www.libvips.org/API/current/">libvips documentation</a>
@@ -79,7 +79,7 @@ <h2 id="usage-heading">Usage</h2>
7979
<p>You must add <code>--enable-native-access=ALL-UNNAMED</code> to your JVM runtime arguments. If you don't, you'll get a warning
8080
about &quot;Restricted methods&quot;. In the future, the JVM will throw an error if you don't explicitly include this flag.</p>
8181
<p>As the project uses the Java FFM API, and Markdown comments, your target must also be JDK 23+. Bindings are currently
82-
generated from libvips <code>8.17.0</code> (but should be safe to use with different minor or patch versions).</p>
82+
generated from libvips <code>8.17.2</code> (but should be safe to use with different minor or patch versions).</p>
8383
<blockquote>
8484
<p>[!NOTE]
8585
This library <strong>does not</strong> include <code>libvips</code> in the download, you must add it to the system/container you're building

generate_ffm_bindings.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,13 @@ set -x
8383
@includes_filtered.txt \
8484
"jextract_entry/entrypoint.h"
8585

86+
./gradlew clean generator:run --args="bootstrap"
8687
./gradlew clean generator:build generator:shadowJar
8788

88-
DYLD_LIBRARY_PATH=$(readlink -f ./libvips)/release/lib:/opt/homebrew/lib java --enable-native-access=ALL_UNNAMED -jar generator/build/libs/generator-all.jar
89+
export JAVA_PATH_OPTS="-Dvipsffm.libpath.vips.override=/opt/homebrew/lib/libvips.dylib \
90+
-Dvipsffm.libpath.glib.override=/opt/homebrew/lib/libglib-2.0.dylib \
91+
-Dvipsffm.libpath.gobject.override=/opt/homebrew/lib/libgobject-2.0.dylib"
92+
93+
java $JAVA_PATH_OPTS --enable-native-access=ALL_UNNAMED -jar generator/build/libs/generator-all.jar
8994

9095
./build_docs.sh

0 commit comments

Comments
 (0)