Skip to content

Commit faf4a00

Browse files
committed
Build: disable -g and enable -Ob while GITHUB_CI env is set
1 parent f3a30d0 commit faf4a00

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/scripts/extract_matrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
DEFAULT_ENV = {
1616
"CI": "true",
17-
"PYTHONIOENCODING": "utf-8"
17+
"GITHUB_CI": "true",
18+
"PYTHONIOENCODING": "utf-8",
1819
}
1920

2021

graalpython/com.oracle.graal.python/src/META-INF/native-image/org.graalvm.python/python-language/native-image.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ Args = -H:MaxRuntimeCompileMethods=20000 \
44
--features=com.oracle.graal.python.BouncyCastleFeature \
55
--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl=org.graalvm.py \
66
--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl=ALL-UNNAMED
7-
8-
# GR-46399: libpythonvm needs more than the default minimum of 8 GB to be built
9-
JavaArgs = -Xms14g

mx.graalpython/mx_graalpython.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,12 @@ def graalpy_standalone_home(standalone_type, enterprise=False, dev=False, build=
825825
standalone_dist = 'GRAALPY_NATIVE_STANDALONE'
826826

827827
mx_args = ['-p', SUITE.dir, *(['--env', env_file] if env_file else [])]
828-
mx_args.append("--extra-image-builder-argument=-g")
828+
829+
if os.environ.get("GITHUB_CI"):
830+
print("[DEBUG] Running in GitHub Ci")
831+
mx_args.append("--extra-image-builder-argument=-Ob")
832+
else:
833+
mx_args.append("--extra-image-builder-argument=-g")
829834

830835
pgo_profile = os.environ.get("GRAALPY_PGO_PROFILE")
831836
if pgo_profile is not None:

0 commit comments

Comments
 (0)