Skip to content

Commit 38995b3

Browse files
committed
[GR-69288][GR-69311] Some CI job fixes.
PullRequest: graalpython/3981
2 parents 2961e42 + 4bda515 commit 38995b3

File tree

3 files changed

+40
-30
lines changed

3 files changed

+40
-30
lines changed

.github/workflows/platforms-tests.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ jobs:
3636
mvn -f graalpython/com.oracle.graal.python.test.integration/pom.xml -Dcom.oracle.graal.python.test.polyglot.version=26.0.0 -Dcom.oracle.graal.python.test.polyglot_repo=file:///$(pwd)/m2repo --batch-mode -U -Dtruffle.UseFallbackRuntime=true -Dpolyglot.engine.allowUnsupportedPlatform=true -Dpolyglot.engine.userResourceCache=/$(pwd)/user_resource_cache -Dpolyglot.python.UnsupportedPlatformEmulates=linux -Dorg.graalvm.python.resources.exclude=native.files test -Dtest=HelloWorldTests,AttributeTests,BuiltinSubclassTest,ComplexTexts,CreateClassTest,AsyncActionThreadingTest,JavaInteropTest
3737
rm -rf $(pwd)/user_resource_cache
3838
39-
- name: Test on ppc64le
40-
uses: uraimo/run-on-arch-action@v3
39+
- uses: docker/setup-qemu-action@v3
4140
with:
42-
arch: ppc64le
43-
distro: ubuntu_latest
44-
dockerRunArgs: |
45-
--volume "${GITHUB_WORKSPACE}:/workspace"
46-
--memory-reservation 6G
47-
run: |
41+
platforms: ppc64le
42+
43+
- uses: docker/setup-docker-action@v4
44+
45+
- name: Test on ppc64le using Docker
46+
run: |
47+
docker run --rm --platform=linux/ppc64le -v "${GITHUB_WORKSPACE}:/workspace" -w /workspace ubuntu:24.04 bash -c "
4848
apt-get update
4949
apt-get install -y python3 git wget tar gzip cmake build-essential maven openjdk-17-jdk
5050
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-ppc64el
51-
export PATH=$JAVA_HOME/bin:$PATH
51+
export PATH=\$JAVA_HOME/bin:\$PATH
5252
53-
echo "Using $JAVA_HOME"
54-
$JAVA_HOME/bin/java -version
55-
cd /workspace
56-
mkdir $(pwd)/user_resource_cache
57-
mvn -f graalpython/com.oracle.graal.python.test.integration/pom.xml -Dcom.oracle.graal.python.test.polyglot.version=26.0.0 -Dcom.oracle.graal.python.test.polyglot_repo=file:///$(pwd)/m2repo --batch-mode -U -Dtruffle.UseFallbackRuntime=true -Dpolyglot.engine.allowUnsupportedPlatform=true -Dpolyglot.engine.userResourceCache=/$(pwd)/user_resource_cache -Dpolyglot.python.UnsupportedPlatformEmulates=linux -Dorg.graalvm.python.resources.exclude=native.files test -Dtest=HelloWorldTests,AttributeTests,BuiltinSubclassTest,ComplexTexts,CreateClassTest,AsyncActionThreadingTest,JavaInteropTest
58-
rm -rf $(pwd)/user_resource_cache
53+
echo 'Using \$JAVA_HOME'
54+
\$JAVA_HOME/bin/java -version
55+
mkdir \$(pwd)/user_resource_cache
56+
mvn -f graalpython/com.oracle.graal.python.test.integration/pom.xml -Dcom.oracle.graal.python.test.polyglot.version=26.0.0 -Dcom.oracle.graal.python.test.polyglot_repo=file:///\$(pwd)/m2repo --batch-mode -U -Dtruffle.UseFallbackRuntime=true -Dpolyglot.engine.allowUnsupportedPlatform=true -Dpolyglot.engine.userResourceCache=/\$(pwd)/user_resource_cache -Dpolyglot.python.UnsupportedPlatformEmulates=linux -Dorg.graalvm.python.resources.exclude=native.files test -Dtest=HelloWorldTests,AttributeTests,BuiltinSubclassTest,ComplexTexts,CreateClassTest,AsyncActionThreadingTest,JavaInteropTest
57+
rm -rf \$(pwd)/user_resource_cache
58+
"

docs/site/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source "https://rubygems.org"
1+
source ENV.fetch("RUBYGEMS_MIRROR", "https://rubygems.org")
22

33
gem "jekyll", "~> 4.3.4"
44

mx.graalpython/mx_graalpython.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ def libpythonvm_build_args():
300300
f"graalpy/{commit}",
301301
profile,
302302
],
303-
nonZeroIsFatal=False
303+
nonZeroIsFatal=False,
304+
env={"UPLOADER_PYTHON": sys.executable, **os.environ},
304305
)
305306
else:
306307
# Locally, we try to get a reasonable profile
@@ -320,7 +321,7 @@ def libpythonvm_build_args():
320321
or ",bench," in os.environ.get("LABELS", "")
321322
):
322323
mx.warn("PGO profile must exist for benchmarking and release, creating one now...")
323-
profile = graalpy_native_pgo_build_and_test([])
324+
profile = graalpy_native_pgo_build_and_test()
324325

325326
if os.path.isfile(profile or ""):
326327
print(invert(f"Automatically chose PGO profile {profile}. To disable this, set GRAALPY_PGO_PROFILE to an empty string'", blinking=True), file=sys.stderr)
@@ -335,7 +336,7 @@ def libpythonvm_build_args():
335336
return build_args
336337

337338

338-
def graalpy_native_pgo_build_and_test(_):
339+
def graalpy_native_pgo_build_and_test(args=None):
339340
"""
340341
Builds a PGO-instrumented GraalPy native standalone, runs the unittests to generate a profile,
341342
then builds a PGO-optimized GraalPy native standalone with the collected profile.
@@ -415,18 +416,22 @@ def graalpy_native_pgo_build_and_test(_):
415416
mx.log(mx.colorize(f"[PGO] Gzipped profile at: {iprof_gz_path}", color="yellow"))
416417

417418
if shutil.which("artifact_uploader"):
418-
run([
419-
"artifact_uploader",
420-
iprof_gz_path,
421-
str(SUITE.vc.tip(SUITE.dir)).strip(),
422-
"graalpy",
423-
"--lifecycle",
424-
"cache",
425-
"--artifact-repo-key",
426-
os.environ.get("ARTIFACT_REPO_KEY_LOCATION"),
427-
])
419+
run(
420+
[
421+
"artifact_uploader",
422+
iprof_gz_path,
423+
str(SUITE.vc.tip(SUITE.dir)).strip(),
424+
"graalpy",
425+
"--lifecycle",
426+
"cache",
427+
"--artifact-repo-key",
428+
os.environ.get("ARTIFACT_REPO_KEY_LOCATION"),
429+
],
430+
env={"UPLOADER_PYTHON": sys.executable, **os.environ},
431+
)
428432

429-
return iprof_gz_path
433+
if args is None:
434+
return iprof_gz_path
430435

431436

432437
def full_python(args, env=None):
@@ -1124,6 +1129,11 @@ def run_python_unittests(python_binary, args=None, paths=None, exclude=None, env
11241129
if mx.primary_suite() != SUITE:
11251130
env.setdefault("GRAALPYTEST_ALLOW_NO_JAVA_ASSERTIONS", "true")
11261131

1132+
if (pip_index := env.get("PIP_INDEX_URL")) and "PIP_EXTRA_INDEX_URL" not in env:
1133+
# the user was overriding the index, don't sneak our default extra
1134+
# index in in that case
1135+
env["PIP_EXTRA_INDEX_URL"] = pip_index
1136+
11271137
if BYTECODE_DSL_INTERPRETER:
11281138
args += ['--vm.Dpython.EnableBytecodeDSLInterpreter=true']
11291139
args += [_python_test_runner(), "run", "--durations", "10", "-n", parallelism, f"--subprocess-args={shlex.join(args)}"]

0 commit comments

Comments
 (0)