Skip to content

Commit

Permalink
Update build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvincent committed Jul 16, 2024
1 parent eec5eff commit 95ecf4d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,20 @@ jobs:
- name: Fetch Tags
run: git fetch --tags origin

- uses: actions/setup-java@v2
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'temurin'
java-version: 21
java-version: '22'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: extractions/setup-just@v1
- uses: DeLaGuardo/[email protected]
with:
cli: latest

- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Auth
run: |
mkdir -p ~/.m2/
cp ./build/settings.xml ~/.m2/settings.xml
- name: Build Native Image
Expand Down Expand Up @@ -86,11 +82,6 @@ jobs:
mv checksums.txt bin/checksums.txt
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 21

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
6 changes: 3 additions & 3 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
(def basis (b/create-basis {:project "deps.edn"
:aliases [:native]}))
(def class-dir "target/classes")
(def uber-file "target/kl.jar")
(def jar-file "target/kl.jar")

(defn clean [_]
(b/delete {:path "target"}))

(defn uber [_]
(defn build [_]
(clean nil)
(b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir})
Expand All @@ -22,6 +22,6 @@
"-Dclojure.spec.skip-macros=true"]})

(b/uber {:class-dir class-dir
:uber-file uber-file
:uber-file jar-file
:basis basis
:main 'k16.kl.cli}))
7 changes: 2 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
clean:
clojure -T:build clean

build: clean
clojure -T:build uber
build:
clojure -T:build build

native-image:
$GRAALVM_HOME/bin/native-image -jar target/kl.jar target/kl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Args = --no-fallback \
--features=clj_easy.graal_build_time.InitClojureClasses \
--report-unsupported-elements-at-runtime \
-H:+UnlockExperimentalVMOptions \
--initialize-at-build-time=org.fusesource.jansi.Ansi$Attribute,org.fusesource.jansi.Ansi$Color \
-H:ReflectionConfigurationResources=${.}/reflect-config.json \
-H:ResourceConfigurationResources=${.}/resource-config.json \
-H:+ReportExceptionStackTraces

0 comments on commit 95ecf4d

Please sign in to comment.