-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[new] Add initial repo project content
- Loading branch information
1 parent
e3cbc6c
commit 89027cc
Showing
13 changed files
with
274 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Graal tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
java: ['17'] | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: 'latest' | ||
java-version: ${{ matrix.java }} | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: DeLaGuardo/[email protected] | ||
with: | ||
lein: latest | ||
bb: latest | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: deps-${{ hashFiles('deps.edn') }} | ||
restore-keys: deps- | ||
|
||
- run: bb graal-tests |
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,30 @@ | ||
name: Main tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
java: ['17', '18', '19'] | ||
os: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'corretto' | ||
java-version: ${{ matrix.java }} | ||
|
||
- uses: DeLaGuardo/[email protected] | ||
with: | ||
lein: latest | ||
|
||
- uses: actions/cache@v3 | ||
id: cache-deps | ||
with: | ||
path: ~/.m2/repository | ||
key: deps-${{ hashFiles('project.clj') }} | ||
restore-keys: deps- | ||
|
||
- run: lein test-all |
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,3 @@ | ||
This project uses [**Break Versioning**](https://www.taoensso.com/break-versioning). | ||
|
||
--- |
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,2 @@ | ||
github: ptaoussanis | ||
custom: "https://www.taoensso.com/clojure" |
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,2 +1,59 @@ | ||
# telemere | ||
Coming later | ||
<a href="https://www.taoensso.com/clojure" title="More stuff by @ptaoussanis at www.taoensso.com"><img src="https://www.taoensso.com/open-source.png" alt="Taoensso open source" width="340"/></a> | ||
[**Documentation**](#documentation) | [Latest releases](#latest-releases) | [Get support][GitHub issues] | ||
|
||
# Telemere | ||
|
||
### Coming soon | ||
|
||
This library is **still under development** and not available yet for public use. | ||
|
||
ETA: [~Dec 2023](https://www.taoensso.com/clojure/roadmap). | ||
|
||
## Latest release/s | ||
|
||
- Coming later | ||
|
||
[![Main tests][Main tests SVG]][Main tests URL] | ||
[![Graal tests][Graal tests SVG]][Graal tests URL] | ||
|
||
See [here][GitHub releases] for earlier releases. | ||
|
||
## Why Telemere? | ||
|
||
- Coming later | ||
|
||
## Documentation | ||
|
||
- [Full documentation][GitHub wiki] (**getting started** and more) | ||
- Auto-generated API reference: [Codox][Codox docs], [clj-doc][clj-doc docs] | ||
|
||
## Funding | ||
|
||
You can [help support][sponsor] continued work on this project, thank you!! 🙏 | ||
|
||
## License | ||
|
||
Copyright © 2023 [Peter Taoussanis][]. | ||
Licensed under [EPL 1.0](LICENSE.txt) (same as Clojure). | ||
|
||
<!-- Common --> | ||
|
||
[GitHub releases]: ../../releases | ||
[GitHub issues]: ../../issues | ||
[GitHub wiki]: ../../wiki | ||
|
||
[Peter Taoussanis]: https://www.taoensso.com | ||
[sponsor]: https://www.taoensso.com/sponsor | ||
|
||
<!-- Project --> | ||
|
||
[Codox docs]: https://taoensso.github.io/telemere/ | ||
[clj-doc docs]: https://cljdoc.org/d/com.taoensso/telemere/ | ||
|
||
[Clojars SVG]: https://img.shields.io/clojars/v/com.taoensso/telemere.svg | ||
[Clojars URL]: https://clojars.org/com.taoensso/telemere | ||
|
||
[Main tests SVG]: https://github.com/taoensso/telemere/actions/workflows/main-tests.yml/badge.svg | ||
[Main tests URL]: https://github.com/taoensso/telemere/actions/workflows/main-tests.yml | ||
[Graal tests SVG]: https://github.com/taoensso/telemere/actions/workflows/graal-tests.yml/badge.svg | ||
[Graal tests URL]: https://github.com/taoensso/telemere/actions/workflows/graal-tests.yml |
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,10 @@ | ||
{:paths ["bb"] | ||
:tasks | ||
{:requires ([graal-tests]) | ||
graal-tests | ||
{:doc "Run Graal native-image tests" | ||
:task | ||
(do | ||
(graal-tests/uberjar) | ||
(graal-tests/native-image) | ||
(graal-tests/run-tests))}}} |
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,38 @@ | ||
#!/usr/bin/env bb | ||
|
||
(ns graal-tests | ||
(:require | ||
[clojure.string :as str] | ||
[babashka.fs :as fs] | ||
[babashka.process :refer [shell]])) | ||
|
||
(defn uberjar [] | ||
(let [command "lein with-profiles +graal-tests uberjar" | ||
command | ||
(if (fs/windows?) | ||
(if (fs/which "lein") | ||
command | ||
;; Assume PowerShell powershell module | ||
(str "powershell.exe -command " (pr-str command))) | ||
command)] | ||
|
||
(shell command))) | ||
|
||
(defn executable [dir name] | ||
(-> (fs/glob dir (if (fs/windows?) (str name ".{exe,bat,cmd}") name)) | ||
first | ||
fs/canonicalize | ||
str)) | ||
|
||
(defn native-image [] | ||
(let [graalvm-home (System/getenv "GRAALVM_HOME") | ||
bin-dir (str (fs/file graalvm-home "bin"))] | ||
(shell (executable bin-dir "gu") "install" "native-image") | ||
(shell (executable bin-dir "native-image") | ||
"--features=clj_easy.graal_build_time.InitClojureClasses" | ||
"--no-fallback" "-jar" "target/graal-tests.jar" "graal_tests"))) | ||
|
||
(defn run-tests [] | ||
(let [{:keys [out]} (shell {:out :string} (executable "." "graal_tests"))] | ||
(assert (str/includes? out "loaded") out) | ||
(println "Native image works!"))) |
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,2 @@ | ||
{:cljdoc/docstring-format :plaintext} | ||
|
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,74 @@ | ||
(defproject com.taoensso/telemere "1.0.0-SNAPSHOT" | ||
:author "Peter Taoussanis <https://www.taoensso.com>" | ||
:description "Coming soon" | ||
:url "https://github.com/taoensso/tempel" | ||
|
||
:license | ||
{:name "Eclipse Public License - v 1.0" | ||
:url "https://www.eclipse.org/legal/epl-v10.html"} | ||
|
||
:dependencies | ||
[[com.taoensso/encore "3.68.0"]] | ||
|
||
:profiles | ||
{;; :default [:base :system :user :provided :dev] | ||
:provided {:dependencies [[org.clojure/clojure "1.11.1"]]} | ||
:c1.11 {:dependencies [[org.clojure/clojure "1.11.1"]]} | ||
:c1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]} | ||
:c1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} | ||
|
||
:test | ||
{:jvm-opts ["-Dtaoensso.elide-deprecated=true"] | ||
:global-vars | ||
{*warn-on-reflection* true | ||
*assert* true | ||
*unchecked-math* false #_:warn-on-boxed} | ||
|
||
:dependencies | ||
[[org.clojure/test.check "1.1.1"]]} | ||
|
||
:graal-tests | ||
{:dependencies [[org.clojure/clojure "1.11.1"] | ||
[com.github.clj-easy/graal-build-time "1.0.5"]] | ||
:main taoensso.graal-tests | ||
:aot [taoensso.graal-tests] | ||
:uberjar-name "graal-tests.jar"} | ||
|
||
:dev | ||
[:c1.11 :test | ||
{:jvm-opts ["-server"] | ||
:plugins | ||
[[lein-pprint "1.3.2"] | ||
[lein-ancient "0.7.0"] | ||
[com.taoensso.forks/lein-codox "0.10.10"]] | ||
|
||
:codox | ||
{:language #{:clojure :clojurescript} | ||
:base-language :clojure}}]} | ||
|
||
:test-paths ["test" #_"src"] | ||
|
||
:cljsbuild | ||
{:test-commands {"node" ["node" "target/test.js"]} | ||
:builds | ||
[{:id :main | ||
:source-paths ["src"] | ||
:compiler | ||
{:output-to "target/main.js" | ||
:optimizations :advanced}} | ||
|
||
{:id :test | ||
:source-paths ["src" "test"] | ||
:compiler | ||
{:output-to "target/test.js" | ||
:target :nodejs | ||
:optimizations :simple}}]} | ||
|
||
:aliases | ||
{"start-dev" ["with-profile" "+dev" "repl" ":headless"] | ||
"build-once" ["do" ["clean"] ["cljsbuild" "once"]] | ||
"deploy-lib" ["do" ["build-once"] ["deploy" "clojars"] ["install"]] | ||
|
||
"test-clj" ["with-profile" "+c1.11:+c1.10:+c1.9" "test"] | ||
"test-cljs" ["with-profile" "+test" "cljsbuild" "test"] | ||
"test-all" ["do" ["clean"] ["test-clj"] ["test-cljs"]]}) |
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 @@ | ||
(ns taoensso.telemere) |
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,5 @@ | ||
(ns taoensso.graal-tests | ||
(:require [taoensso.telemere :as telemere]) | ||
(:gen-class)) | ||
|
||
(defn -main [& args] (println "Namespace loaded successfully")) |
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,17 @@ | ||
(ns taoensso.telemere-tests | ||
(:require | ||
[clojure.test :as test :refer [deftest testing is]] | ||
[taoensso.encore :as enc] | ||
[taoensso.telemere :as telemere])) | ||
|
||
(comment | ||
(remove-ns 'taoensso.telemere-tests) | ||
(test/run-tests 'taoensso.telemere-tests)) | ||
|
||
;;;; | ||
|
||
(deftest _test (is (= 1 1))) | ||
|
||
;;;; | ||
|
||
#?(:cljs (test/run-tests)) |
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 +1 @@ | ||
Init | ||
Coming soon |