From 3c3e472ad04bee49b4a6b8a3095e55ae40e03083 Mon Sep 17 00:00:00 2001 From: Yann Bouzonie Date: Thu, 12 Sep 2024 09:36:38 +0200 Subject: [PATCH] refactor: adapt build for RAW Labs usage (#1) --- .github/workflows/ci.yaml | 18 ++++++++++++++++++ .github/workflows/test.yml | 20 -------------------- README.md | 10 +++++++--- build.sbt | 37 +++++++++++++++++++++++-------------- project/build.properties | 2 +- project/plugins.sbt | 2 ++ 6 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..8ead9e71 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,18 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: self-hosted + container: + image: sbtscala/scala-sbt:eclipse-temurin-jammy-8u402-b06_1.9.9_2.13.13 + options: --user 1001:1001 + steps: + - uses: actions/checkout@v4 + - name: Run tests + run: sbt clean +test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 611750a9..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Run tests - run: sbt +test diff --git a/README.md b/README.md index 4abff676..8a8384af 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ # Kiama [![License: MPL v2.0](https://img.shields.io/badge/License-MPL%20v2-blue.svg)](http://mozilla.org/MPL/2.0/) -[![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/https/oss.sonatype.org/org.bitbucket.inkytonik.kiama/kiama_2.12.svg?label=Sonatype%20Nexus%20Release)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.bitbucket.inkytonik.kiama%22) -[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/https/oss.sonatype.org/org.bitbucket.inkytonik.kiama/kiama_2.12.svg?label=Sonatype%20Nexus%20Snapshot)]() -![Test](https://github.com/inkytonik/kiama/workflows/Test/badge.svg) +![CI](https://github.com/raw-labs/kiama/workflows/CI/badge.svg) Kiama is a Scala library for language processing. In the Kiama project we are investigating embedding of language processing formalisms such as grammars, parsers, rewriters and analysers into general-purpose programming languages. @@ -20,6 +18,12 @@ inkytonik@gmail.com https://github.com/inkytonik +RAW Labs S.A + +support@raw-labs.com + +https://github.com/raw-labs + ## Latest News * Jul 16, 2023: Version 2.5.1 released diff --git a/build.sbt b/build.sbt index 43ffc899..a6466d54 100644 --- a/build.sbt +++ b/build.sbt @@ -4,9 +4,19 @@ import scalariform.formatter.preferences._ // Settings for entire build -ThisBuild/version := "2.5.2-SNAPSHOT" +// ThisBuild/version := "2.5.2-SNAPSHOT" -ThisBuild/organization := "org.bitbucket.inkytonik.kiama" +ThisBuild / credentials += Credentials( + "GitHub Package Registry", + "maven.pkg.github.com", + "raw-labs", + sys.env.getOrElse("GITHUB_TOKEN", "") +) + +ThisBuild/homepage := Some(url("https://github.com/raw-labs/kiama/")) +ThisBuild/organization := "com.raw-labs" +ThisBuild/organizationName := "RAW Labs SA" +ThisBuild/organizationHomepage := Some(url("https://www.raw-labs.com/")) ThisBuild/scalaVersion := "2.13.7" ThisBuild/crossScalaVersions := Seq("3.1.3", "2.13.7", "2.12.18", "2.11.12") @@ -110,18 +120,12 @@ val commonSettings = .setPreference(SpacesAroundMultiImports, false), // Publishing - publishTo := { - val nexus = "https://oss.sonatype.org/" - if (version.value.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") - }, + publishTo := Some("GitHub raw-labs Apache Maven Packages" at "https://maven.pkg.github.com/raw-labs/kiama"), publishMavenStyle := true, Test/publishArtifact := true, pomIncludeRepository := { _ => false }, pomExtra := ( - https://github.com/inkytonik/kiama + https://github.com/raw-labs/kiama Mozilla Public License, v. 2.0 @@ -130,8 +134,8 @@ val commonSettings = - https://github.com/inkytonik/kiama - scm:hg:https://github.com/inkytonik/kiama + https://github.com/raw-labs/kiama + scm:hg:https://github.com/raw-labs/kiama @@ -139,6 +143,11 @@ val commonSettings = Tony Sloane https://github.com/inkytonik + + raw-labs + RAW Labs + https://github.com/raw-labs + ) ) @@ -197,7 +206,7 @@ lazy val core = ScalaUnidoc/unidoc/scalacOptions ++= Seq( "-doc-source-url", - "https://github.com/inkytonik/kiama/blob/master€{FILE_PATH}.scala" + "https://github.com/raw-labs/kiama/blob/master€{FILE_PATH}.scala" ), TestScalaUnidoc/unidoc/scalacOptions := (ScalaUnidoc/unidoc/scalacOptions).value, ScalaUnidoc/unidoc/unidocProjectFilter := inAnyProject -- inProjects(extrasProject), @@ -232,7 +241,7 @@ lazy val extras = Compile/doc/scalacOptions ++= Seq( "-doc-source-url", - "https://github.com/inkytonik/kiama/blob/master€{FILE_PATH}.scala" + "https://github.com/raw-labs/kiama/blob/master€{FILE_PATH}.scala" ), Test/doc/scalacOptions := (Compile/doc/scalacOptions).value ).settings( diff --git a/project/build.properties b/project/build.properties index 875b706a..04267b14 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.2 +sbt.version=1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index 16f512d9..76c0b986 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,3 +11,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") // addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.1.2") // addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.2.0") + +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1")