-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
101 changed files
with
114,529 additions
and
10,681 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 |
---|---|---|
|
@@ -12,6 +12,9 @@ | |
# CREDENTIAL_CONTEXT used by build.sbt | ||
# - REALM_CREDENTIAL,HOST_CREDENTIAL,LOGIN_CREDENTIAL,PASSWORD_CREDENTIAL | ||
# | ||
# NPM_CONTEXT | ||
# - NPM_TOKEN : token (from ~/.npmrc) to publish nodejs lib | ||
# | ||
version: 2.1 | ||
workflows: | ||
compile-workflow: | ||
|
@@ -56,6 +59,17 @@ workflows: | |
branches: | ||
ignore: /.*/ | ||
|
||
# - publish_npm: | ||
# requires: | ||
# - lib_js | ||
# context: | ||
# - NPM_CONTEXT | ||
# filters: | ||
# tags: | ||
# only: /.*/ | ||
# branches: | ||
# only: strategySourceRequest | ||
|
||
- check_discovery_valid_fullopjs_cdn_jsdelivr: | ||
filters: | ||
tags: | ||
|
@@ -64,6 +78,7 @@ workflows: | |
executors: | ||
|
||
openjdk: | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
auth: | ||
|
@@ -76,6 +91,7 @@ executors: | |
auth: | ||
username: ${DOCKER_USER} | ||
password: ${DOCKER_PASS} | ||
|
||
- image: tenforce/virtuoso:virtuoso7.2.5 | ||
auth: | ||
username: ${DOCKER_USER} | ||
|
@@ -93,6 +109,9 @@ executors: | |
SPARQL_UPDATE: true | ||
DEFAULT_GRAPH: "graph:test:discovery:default:" | ||
|
||
orbs: | ||
node: circleci/[email protected] | ||
|
||
jobs: | ||
compile: | ||
executor: openjdk | ||
|
@@ -117,9 +136,7 @@ jobs: | |
|
||
lib_js: | ||
executor: openjdk | ||
environment: | ||
JVM_OPTS: -Xmx3200m | ||
TERM: dumb | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
|
@@ -135,6 +152,10 @@ jobs: | |
name: fullOptJS | ||
command: cat /dev/null | sbt discoveryJS/fullOptJS | ||
|
||
- persist_to_workspace: | ||
root: ./js/target/scala-2.13/scalajs-bundler/main/ | ||
paths: discovery-opt.js | ||
|
||
test_and_coverage_jvm: | ||
executor: virtuoso_environment_executor | ||
environment: | ||
|
@@ -149,7 +170,7 @@ jobs: | |
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Test and Coverage | ||
name: Test JVM env and Coverage | ||
command: | | ||
cat /dev/null | sbt clean coverage discoveryJVM/test:test | ||
sbt discoveryJVM/coverageReport | ||
|
@@ -206,8 +227,37 @@ jobs: | |
F2=./dist/checksum | ||
if [ "$(diff -q $F1 $F2)" != "" ]; then | ||
echo "discovery and discovery-web have to be updated with update_cdn_libjs.sh !" ; | ||
echo "current checksum : "$(cat checksum) | ||
echo "repo checksum : "$(cat dist/checksum) | ||
exit 1; | ||
fi ; | ||
publish_npm: | ||
docker: | ||
- image: circleci/node:12.20 | ||
auth: | ||
username: ${DOCKER_USER} | ||
password: ${DOCKER_PASS} | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "build.sbt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- attach_workspace: | ||
at: ~/repo/js/target/scala-2.13/scalajs-bundler/main/ | ||
|
||
- run: | ||
name: Authenticate with registry | ||
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | ||
|
||
- run: | ||
name: Js Opt Lib generation | ||
command: | | ||
npm config set registry http://registry.npmjs.org | ||
npm version 0.0.4 | ||
npm publish --access public |
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,18 +1,20 @@ | ||
import sbt.Keys.scalacOptions | ||
import sbtcrossproject.CrossPlugin.autoImport.crossProject | ||
|
||
lazy val utestVersion = "0.7.5" | ||
lazy val utestVersion = "0.7.7" | ||
lazy val upickleVersion = "1.2.2" | ||
lazy val airframeLogVersion = "20.11.0" | ||
lazy val scalaParserCombinatorVersion = "1.1.2" | ||
lazy val scalaReflectVersion = "1.0.0" | ||
lazy val RosHttpVersion = "3.0.0" | ||
lazy val scalaJsDOMVersion = "1.1.0" | ||
lazy val scalaStubVersion = "1.0.0" | ||
lazy val scalatagVersion = "0.9.2" | ||
lazy val jenaVersion = "3.16.0" | ||
lazy val rdf4jVersion = "3.6.0-M2" | ||
|
||
//https://jitpack.io/ | ||
|
||
releaseIgnoreUntrackedFiles := true | ||
|
||
val version_build = scala.util.Properties.envOrElse("DISCOVERY_VERSION", "local-SNAPSHOT" ) | ||
val SWDiscoveryVersionAtBuildTimeFile = "./shared/src/main/scala/inrae/semantic_web/SWDiscoveryVersionAtBuildTime.scala" | ||
|
||
|
@@ -25,7 +27,7 @@ val buildSWDiscoveryVersionAtBuildTimeFile = | |
|package inrae.semantic_web | ||
| | ||
|object SWDiscoveryVersionAtBuildTime { | ||
| val version : String = "${version_build}" | ||
| val version : String = " build ${java.time.LocalDate.now.toString}" | ||
|}""").stripMargin) | ||
|
||
|
||
|
@@ -45,6 +47,9 @@ def getPackageSetting() = Seq( | |
"scm:[email protected]:p2m2/Discovery.git" | ||
) | ||
), | ||
developers := List( | ||
Developer("ofilangi", "Olivier Filangi", "[email protected]",url("https://github.com/ofilangi")) | ||
), | ||
credentials += { | ||
|
||
val realm = scala.util.Properties.envOrElse("REALM_CREDENTIAL", "" ) | ||
|
@@ -85,35 +90,49 @@ lazy val discovery=crossProject(JSPlatform, JVMPlatform).in(file(".")) | |
.settings( | ||
resolvers += Resolver.bintrayRepo("hmil", "maven"), | ||
libraryDependencies ++= Seq( | ||
"com.lihaoyi" %%% "utest" % utestVersion % "test", | ||
"com.lihaoyi" %%% "utest" % utestVersion % Test, | ||
"fr.hmil" %%% "roshttp" % RosHttpVersion % Test , | ||
"com.lihaoyi" %%% "upickle" % upickleVersion, | ||
"org.wvlet.airframe" %%% "airframe-log" % airframeLogVersion, | ||
"org.scala-lang.modules" %%% "scala-parser-combinators" % scalaParserCombinatorVersion, | ||
"org.portable-scala" %%% "portable-scala-reflect" % scalaReflectVersion, | ||
"fr.hmil" %%% "roshttp" % RosHttpVersion, | ||
"com.softwaremill.sttp.client3" %%% "core" % "3.0.0" | ||
"org.scala-lang.modules" %%% "scala-parser-combinators" % scalaParserCombinatorVersion | ||
), | ||
testFrameworks += new TestFramework("utest.runner.Framework"), | ||
scalacOptions ++= Seq("-deprecation", "-feature"), | ||
classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.AllLibraryJars, | ||
coverageMinimum := 70, | ||
coverageFailOnMinimum := false, | ||
coverageHighlighting := true | ||
coverageHighlighting := true, | ||
parallelExecution in Test := false | ||
) | ||
.jsConfigure(_.enablePlugins(ScalaJSBundlerPlugin)) | ||
.jsSettings( | ||
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) } , | ||
scalaJSLinkerConfig in (Compile, fullOptJS) ~= { _.withSourceMap(false) }, | ||
libraryDependencies ++= Seq( | ||
"org.scala-js" %%% "scalajs-dom" % scalaJsDOMVersion | ||
webpackBundlingMode := BundlingMode.LibraryAndApplication(), | ||
npmDependencies in Compile ++= Seq( | ||
"axios" -> "0.21.1", | ||
"qs" -> "6.9.6", | ||
"showdown" -> "1.9.1" | ||
), | ||
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv() | ||
scalaJSLinkerConfig in (Compile, fastOptJS ) ~= { | ||
_.withOptimizer(false) | ||
.withPrettyPrint(true) | ||
.withSourceMap(true) | ||
}, | ||
scalaJSLinkerConfig in (Compile, fullOptJS) ~= { | ||
_.withSourceMap(false) | ||
.withModuleKind(ModuleKind.CommonJSModule) | ||
}, | ||
libraryDependencies ++= Seq( | ||
"org.scala-js" %%% "scalajs-dom" % "1.1.0" | ||
) | ||
) | ||
.jvmSettings( | ||
libraryDependencies ++= Seq( | ||
"org.scala-js" %% "scalajs-stubs" % scalaStubVersion % "provided", | ||
"org.apache.jena" % "apache-jena" % jenaVersion pomOnly() | ||
"org.slf4j" % "slf4j-api" % "1.7.9", | ||
"org.slf4j" % "slf4j-simple" % "1.7.9", | ||
"org.eclipse.rdf4j" % "rdf4j-storage" % rdf4jVersion, | ||
"org.eclipse.rdf4j" % "rdf4j-tools-federation" % rdf4jVersion | ||
)) | ||
//.enablePlugins(ScalaJSBundlerPlugin) | ||
|
||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
//publishTo in ThisBuild := |
Oops, something went wrong.