Skip to content

Commit

Permalink
chore: more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
k13gomez committed Sep 21, 2024
1 parent 2a6b5d0 commit 1f888b6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/clojure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Tools setup
- name: SDK Tools setup
uses: jdx/mise-action@v2
with:
install: true
cache: true
- name: Native Image setup
run: |
echo "JAVA_HOME=$(mise where java)" >> $GITHUB_ENV
echo "GRAALVM_HOME=$(mise where java)" >> $GITHUB_ENV
gu install native-image
- name: Run tests
run: make test
- name: Run clj-kondo linter
Expand All @@ -28,5 +33,4 @@ jobs:
- name: Run build app
run: |
printenv
gu install native-image
bin/build-native
make build-native
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,24 @@ build:
clojure -X:jar :sync-pom true :jar "build/hierarchy.jar"

build-native: build
bin/build-native
mkdir -p build/graalvm-config
clojure -X:uberjar :sync-pom false :jar "build/hierarchy-test-app.jar"
java -agentlib:native-image-agent=config-output-dir=build/graalvm-config -jar "build/hierarchy-test-app.jar" hierarchy.main
native-image -jar "build/hierarchy-test-app.jar" \
"-H:+ReportExceptionStackTraces" \
"-H:+JNI" \
"-H:EnableURLProtocols=http,https,jar" \
"-J-Dclojure.spec.skip-macros=true" \
"-J-Dclojure.compiler.direct-linking=true" \
"--report-unsupported-elements-at-runtime" \
"--verbose" \
"--no-fallback" \
"--no-server" \
"--allow-incomplete-classpath" \
"--trace-object-instantiation=java.lang.Thread" \
"--features=clj_easy.graal_build_time.InitClojureClasses" \
"-H:ConfigurationFileDirectories=build/graalvm-config" \
"build/hierarchy-test-app"

deploy: clean build
clojure -X:deploy-maven
Expand Down

0 comments on commit 1f888b6

Please sign in to comment.