File tree 2 files changed +19
-3
lines changed
buildSrc/src/main/java/org/springframework/shell/gradle 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 25
25
musl : true
26
26
name : Compile ${{ matrix.nickname }}
27
27
steps :
28
+ - name : macos info
29
+ if : runner.os == 'macOS'
30
+ shell : bash
31
+ run : |
32
+ sysctl machdep.cpu
28
33
- uses : actions/checkout@v3
29
34
- uses : graalvm/setup-graalvm@v1
30
35
with :
79
84
nickname : linux
80
85
name : E2E ${{ matrix.os }}
81
86
steps :
87
+ - name : macos info
88
+ if : runner.os == 'macOS'
89
+ shell : bash
90
+ run : |
91
+ sysctl machdep.cpu
82
92
- uses : actions/checkout@v3
83
93
- uses : actions/setup-java@v3
84
94
with :
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2022-2023 the original author or authors.
2
+ * Copyright 2022-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
15
15
*/
16
16
package org .springframework .shell .gradle ;
17
17
18
+ import java .util .ArrayList ;
19
+
18
20
import org .graalvm .buildtools .gradle .NativeImagePlugin ;
19
21
import org .graalvm .buildtools .gradle .dsl .GraalVMExtension ;
20
22
import org .gradle .api .Plugin ;
@@ -74,10 +76,14 @@ private void customizeNative(Project project) {
74
76
75
77
private void configureGraalVmExtension (Project project ) {
76
78
GraalVMExtension extension = project .getExtensions ().getByType (GraalVMExtension .class );
79
+ ArrayList <String > options = new ArrayList <String >();
77
80
if (isEnabled (project , MUSL )) {
78
- extension . getBinaries (). getByName ( NativeImagePlugin . NATIVE_MAIN_EXTENSION ). buildArgs ( "--static" ,
79
- "--libc=musl" );
81
+ options . add ( "--static" );
82
+ options . add ( "--libc=musl" );
80
83
}
84
+ // force compatibility as detection i.e. in macos runners is flaky
85
+ options .add ("-march=compatibility" );
86
+ extension .getBinaries ().getByName (NativeImagePlugin .NATIVE_MAIN_EXTENSION ).buildArgs (options .toArray ());
81
87
}
82
88
83
89
private boolean isEnabled (Project project , String property ) {
You can’t perform that action at this time.
0 commit comments