forked from athensresearch/athens
-
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.
build: move from lein to clj+deps.edn
Lein with deps.edn does not work on Windows, so we're moving to clj+deps.edn. See RickMoynihan/lein-tools-deps#85
- Loading branch information
1 parent
805cc41
commit af8cfc9
Showing
17 changed files
with
158 additions
and
198 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
|
@@ -8,10 +8,19 @@ runs: | |
id: restore-maven | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('project.clj') }} | ||
key: ${{ runner.os }}-maven-${{ hashFiles('deps.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Restore gitlibs | ||
uses: actions/cache@v2 | ||
id: restore-gitlibs | ||
with: | ||
path: ~/.gitlibs | ||
key: ${{ runner.os }}-gitlibs-${{ hashFiles('deps.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-gitlibs- | ||
- name: Prepare java | ||
uses: actions/setup-java@v2 | ||
with: | ||
|
@@ -21,20 +30,19 @@ runs: | |
- uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.10.3.986 | ||
lein: 2.9.7 | ||
|
||
- name: Fetch maven dependencies | ||
shell: bash | ||
# 'if' not supported yet, workaround in bash | ||
# https://github.com/actions/runner/issues/834 | ||
# if: steps.restore-maven.outputs.cache-hit != 'true' | ||
# run: lein deps | ||
# run: clj -P | ||
run: | | ||
if echo ${{ steps.restore-maven.outputs.cache-hit }} | grep -c "true" | ||
then | ||
echo "Cache hit - skipping dependency installation" | ||
else | ||
${{ runner.os != 'Windows' && 'lein deps' || 'pwsh -c "lein deps"' }} | ||
${{ runner.os != 'Windows' && 'clj -P' || 'pwsh -c "clj -P"' }} | ||
fi | ||
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,3 +1,3 @@ | ||
# athens-data | ||
|
||
This is where `lein run` and `docker compose up` will place data files while working in dev setups. | ||
This is where `yarn server:run` and `docker compose up` will place data files while working in dev setups. |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(ns build | ||
"Build the Athens server uberjar. | ||
From https://clojure.org/guides/tools_build#_compiled_uberjar_application_build" | ||
(:require [clojure.tools.build.api :as b])) | ||
|
||
(def version (format "1.0.0-alpha.rtc.xx")) | ||
(def class-dir "target/classes") | ||
(def basis (b/create-basis {:project "deps.edn"})) | ||
(def uber-file "target/athens-lan-party-standalone.jar") | ||
|
||
(defn uber [_] | ||
(b/delete {:path "target"}) | ||
(b/compile-clj {:basis basis | ||
:src-dirs ["src/clj" "src/cljc"] | ||
:class-dir class-dir}) | ||
(b/uber {:class-dir class-dir | ||
:uber-file uber-file | ||
:basis basis | ||
:main 'athens.self-hosted.core})) |
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,3 +1,3 @@ | ||
brew 'openjdk@11' | ||
brew 'leiningen' | ||
brew 'yarn' | ||
brew 'clojure' | ||
brew 'yarn' |
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
Oops, something went wrong.