Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ jobs:
PRIMARY: "compiler"
- env:
JDK: "labsjdk-ce-11"
GATE: "build"
PRIMARY: "vm"
DYNAMIC_IMPORTS: "/tools,/substratevm,/sulong"
NATIVE_IMAGES: "polyglot"
WITHOUT_VCS: true
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -124,8 +128,9 @@ jobs:
if: ${{ contains(matrix.env.GATE, 'style') }}
run: |
sudo apt install python-pip python-setuptools
sudo pip install astroid==1.1.0
sudo pip install pylint==1.1.0
cat common.json |
jq -r '.deps.common.packages | to_entries[] | select(.key | startswith("pip:")) | (.key | split(":")[1]) + .value' |
xargs sudo pip install
- name: Build GraalVM and run gate
env: ${{ matrix.env }}
run: |
Expand Down Expand Up @@ -155,7 +160,6 @@ jobs:
if [[ ${WITHOUT_VCS} ]]
then
rm -rf .git
${MX_PATH}/mx --primary-suite-path substratevm native-image --help
else
${MX_PATH}/mx --primary-suite-path ${PRIMARY} --J @"-Xmx2g" --java-home=${JAVA_HOME} gate --strict-mode --tags ${GATE}
fi

${MX_PATH}/mx --primary-suite-path ${PRIMARY} --J @"-Xmx2g" --java-home=${JAVA_HOME} gate --strict-mode --tags ${GATE}
Copy link
Member

@olpaw olpaw Jun 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will build a GraalVM release that contains the /substratevm suite.
After running this,
$(mx --primary-suite-path ${PRIMARY} graalvm-home) contains a working bin/native-image bash-launcher.
i.e. this looks good.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this is not enough to test if things work outside a VCS repo, please see #3478 (comment) for more details.

Copy link
Member

@olpaw olpaw Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this is not enough to test if things work outside a VCS repo

Since 6eee91e got merged almost all substrate-related mx commands (like e.g. mx native-image or mx native-image-configure) are just calling artifacts that got built as part of running mx build in the substratevm directory. In other words if mx build (or mx gate --tags build) succeeded you can safely assume that mx native-image --help also works since its just calling the native-image bash launcher that is located at $(mx --primary-suite-path ${PRIMARY} graalvm-home)/bin/native-image after mx build made sure it got created there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could also do this:

PRIMARY=vm
DYNAMIC_IMPORTS=/substratevm,/sulong,/tools
NATIVE_IMAGES=polyglot # to save some time
GATE=build

It's not literally building everything, but it would exercise almost every different category of stuff there is to build (e.g. Java projects, native projects, a native-image launcher, ...).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I admit I didn't check the latest state of mx_substratevm.py, my mistake. Thanks for making this clear Paul.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not literally building everything, but it would exercise almost every different category of stuff there is to build (e.g. Java projects, native projects, a native-image launcher, ...).

Yup that would give pretty good coverage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, and seems to be working (at least on github, still waiting for the internal gate to finish).

2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"MX_PYTHON": "python3"
},
"packages": {
"pip:logilab-common ": "==1.4.4",
"pip:logilab-common": "==1.4.4",
"pip:pylint": "==1.9.3",
"pip:ninja_syntax": "==1.7.2"
}
Expand Down
11 changes: 11 additions & 0 deletions vm/ci_includes/vm.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ builds += [
]
name: gate-vm-unittest-windows
}
${vm_java_11} ${gate_vm_linux} ${sulong_linux} {
environment: {
DYNAMIC_IMPORTS: "/tools,/substratevm,/sulong"
NATIVE_IMAGES: "polyglot"
}
run: [
[rm, "-rf", "../.git"]
[mx, gate, "--strict-mode", "--tags", "build"]
]
name: gate-vm-build-without-vcs
}
${gate_vm_linux} ${linux-deploy} ${maven_base_8_11} {
run: [
${maven_base_8_11.build}
Expand Down