Building GraalVM native images on GitHub

Raw notes:

If you receive this error:

Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}

It is probably because you’re re-running a previous build. Go into your project’s main page, look at the releases on the right side of the page, select the release with the name you’re trying to rebuild, and when the page for that release loads select the trash can icon. This will delete the artifact so it can be rebuilt.

Installing on EC2:

Step 1 - ssh in and run these commands

tar xzvf graalvm-ce-java17-linux-amd64-22.1.0.tar.gz
echo 'export PATH=/home/ubuntu/graalvm-ce-java17-22.1.0/bin:$PATH' >> .bashrc
echo 'export JAVA_HOME=/home/ubuntu/graalvm-ce-java17-22.1.0' >> .bashrc

Step 2 - ssh in again and run these commands

gu install native-image
sudo apt update
sudo apt install -y clang gcc zlib1g-dev