forked from smithy-lang/smithy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup cross platform builds of the CLI
This commit adds support for cross platform builds of the CLI using jlink via each support version of JDK 16 of Amazon Corretto (we'll bump to JDK 17 when it's available). Each supported build target is built by downloading the appropriate JDK from Corretto and running jlink. The Dockerfile has been updated to now use the prebuilt binary for linux-x86_64, and will now use application class data sharing to improve CLI startup time in the Docker container. A couple dependencies were updated, including Gradle, in order to build on JDK 16. JDK 16 also complained about creating an explicitly boxed value, so that was addressed too. Future work should include building signed tar.gz and zip files, creating a Mac pkg file via jpackage, and creating an msi via jpackage.
- Loading branch information
Showing
6 changed files
with
81 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
FROM gradle:5.4.1-jdk12 | ||
USER root | ||
ADD ./ /smithy | ||
FROM amazonlinux:2 | ||
ADD smithy-cli/build/image/smithy-cli-linux-x86_64 /smithy | ||
WORKDIR /smithy | ||
RUN gradle :smithy-cli:runtime | ||
WORKDIR /work | ||
|
||
ENTRYPOINT [ "/smithy/smithy-cli/build/image/bin/smithy" ] | ||
# Build application class data sharing archive using smithy validate as the baseline. | ||
RUN SMITHY_OPTS="-XX:DumpLoadedClassList=/smithy/lib/smithy.lst" \ | ||
/smithy/bin/smithy validate | ||
RUN SMITHY_OPTS="-Xshare:dump -XX:SharedArchiveFile=/smithy/lib/smithy.jsa -XX:SharedClassListFile=/smithy/lib/smithy.lst" \ | ||
/smithy/bin/smithy validate | ||
|
||
ENTRYPOINT [ "/smithy/bin/smithy" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters