Skip to content

Commit

Permalink
refactor: adapt build for RAW Labs usage (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
datYori authored Sep 12, 2024
1 parent 3bcc03a commit 3c3e472
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 38 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions .github/workflows/test.yml

This file was deleted.

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -20,6 +18,12 @@ [email protected]

https://github.com/inkytonik

RAW Labs S.A

[email protected]

https://github.com/raw-labs

## Latest News

* Jul 16, 2023: Version 2.5.1 released
Expand Down
37 changes: 23 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 := (
<url>https://github.com/inkytonik/kiama</url>
<url>https://github.com/raw-labs/kiama</url>
<licenses>
<license>
<name>Mozilla Public License, v. 2.0</name>
Expand All @@ -130,15 +134,20 @@ val commonSettings =
</license>
</licenses>
<scm>
<url>https://github.com/inkytonik/kiama</url>
<connection>scm:hg:https://github.com/inkytonik/kiama</connection>
<url>https://github.com/raw-labs/kiama</url>
<connection>scm:hg:https://github.com/raw-labs/kiama</connection>
</scm>
<developers>
<developer>
<id>inkytonik</id>
<name>Tony Sloane</name>
<url>https://github.com/inkytonik</url>
</developer>
<developer>
<id>raw-labs</id>
<name>RAW Labs</name>
<url>https://github.com/raw-labs</url>
</developer>
</developers>
)
)
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.2
sbt.version=1.9.9
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 3c3e472

Please sign in to comment.