Skip to content

Commit f2e66cf

Browse files
authored
Update Scala Native and cleanup for Scala 3 (#70)
* Update version * Update scalafmt and add script to workflow * Update Scala Native to 0.4.3 and Scala 3 * Add semver strategy * Update docs prior to format * Format with new scalafmt * Update readme for release
1 parent 7f7ec9f commit f2e66cf

File tree

10 files changed

+1754
-1407
lines changed

10 files changed

+1754
-1407
lines changed

.github/workflows/check-link.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Check Lint
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
jobs:
7+
check-lint:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
- run: ./scripts/check-lint.sh

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@
88

99
# vscode
1010
/.vscode/
11+
12+
# IntelliJ
13+
/.idea/
14+
15+
# scripts generated
16+
/scripts/.coursier
17+
/scripts/.scalafmt*

.scalafmt.conf

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
version = 3.3.1
2-
style = defaultWithAlign
3-
docstrings = JavaDoc
1+
# Test upgrades: $ scripts/scalafmt --test 2> diff.txt
2+
version = 3.4.0
3+
runner.dialect = scala213source3
4+
preset = default
5+
6+
# JavaDoc style (ported from Java)
7+
docstrings.style = Asterisk
48
assumeStandardLibraryStripMargin = true
59
project.git = true
6-
# changed 1.6 or after
7-
align.openParenCallSite = true
8-
align.openParenDefnSite = true
9-
# avoid wrapping parens on new line
10-
danglingParentheses.defnSite = false
11-
danglingParentheses.callSite = false
10+
11+
# This creates less of a diff but is not default
12+
# but is more aligned with Scala.js syntax.
13+
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly
14+
15+
# Keep control sites more streamlined
16+
indent.ctrlSite = 4
17+
danglingParentheses.ctrlSite = false
18+
19+
# Default is not recommended
20+
indentOperator.exemptScope = aloneEnclosed
21+
22+
# allow dialect for Scala 3
23+
fileOverride {
24+
"glob:**/scala-3/**.scala" {
25+
runner.dialect = scala3
26+
}
27+
}

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ converted to [LLVM IR](http://llvm.org/). Finally LLVM code is optimized
1616
and compiled by [Clang](http://clang.llvm.org/) to produce a native executable.
1717

1818
## Getting started
19-
[![Maven Central](https://img.shields.io/maven-central/v/org.ekrich/sblas_native0.4_2.11.svg)](https://maven-badges.herokuapp.com/maven-central/org.ekrich/sblas_native0.4_2.11)
19+
[![Maven Central](https://img.shields.io/maven-central/v/org.ekrich/sblas_native0.4_2.13.svg)](https://maven-badges.herokuapp.com/maven-central/org.ekrich/sblas_native0.4_2.13)
2020

2121
If you are already familiar with Scala Native you can jump right in by adding the following dependency in your `sbt` build file.
2222

@@ -43,6 +43,18 @@ $ sudo apt-get install libatlas-base-dev
4343

4444
* Other OSes need to have `libcblas` available on the system.
4545

46+
## Scala Build Versions
47+
48+
| Scala Version | Native (0.4.0) | Native (0.4.3+) |
49+
| ---------------------- | :-------------------: | :------------: |
50+
| 2.11.x |||
51+
| 2.12.x |||
52+
| 2.13.x |||
53+
| 3.x.x | ||
54+
55+
Use version sblas `0.3.0` for Scala Native `0.4.0`.
56+
Use version sblas `0.4.0` for Scala Native `0.4.3` with Scala 3 support.
57+
4658
## Usage and Help
4759
[![scaladoc](https://www.javadoc.io/badge/org.ekrich/sblas_native0.4_2.11.svg?label=scaladoc)](https://www.javadoc.io/doc/org.ekrich/sblas_native0.4_2.11)
4860
[![Join chat https://gitter.im/ekrich/sblas](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ekrich/sblas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -57,7 +69,7 @@ $ cd <directory entered after the prompt>
5769
$ sbt run
5870
```
5971

60-
In addition, look at the [sblas unit tests](https://github.com/ekrich/sblas/blob/v0.3.0/sblas/src/test/scala/org/ekrich/blas/unsafe/BlasTest.scala) for other examples of usage.
72+
In addition, look at the [sblas unit tests](https://github.com/ekrich/sblas/blob/main/sblas/src/test/scala/org/ekrich/blas/unsafe/BlasTest.scala) for other examples of usage.
6173

6274
## BLAS References and External Documentation
6375

@@ -83,6 +95,7 @@ IBM Website:
8395

8496
## Versions
8597

98+
Release [0.4.0](https://github.com/ekrich/sblas/releases/tag/v0.4.0) - (2022-02-01)<br/>
8699
Release [0.3.0](https://github.com/ekrich/sblas/releases/tag/v0.3.0) - (2021-03-20)<br/>
87100
Release [0.2.0](https://github.com/ekrich/sblas/releases/tag/v0.2.0) - (2019-12-05)<br/>
88101
Release [0.1.1](https://github.com/ekrich/sblas/releases/tag/v0.1.1) - (2019-05-01)<br/>

build.sbt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
// sblas build
2-
val prevVersion = "0.2.0"
3-
val nextVersion = "0.3.0"
2+
val prevVersion = "0.3.0"
3+
val nextVersion = "0.4.0"
44

55
val scala211 = "2.11.12"
66
val scala212 = "2.12.15"
77
val scala213 = "2.13.8"
8-
val scala300 = "3.0.0"
8+
val scala3 = "3.1.1"
99

10-
val versionsNative = Seq(scala212, scala211, scala213)
10+
val versionsNative = Seq(scala211, scala212, scala213, scala3)
1111

1212
ThisBuild / scalaVersion := scala213
1313
ThisBuild / crossScalaVersions := versionsNative
14+
ThisBuild / versionScheme := Some("early-semver")
1415

1516
inThisBuild(
1617
List(
1718
description := "BLAS interface for Scala Native",
1819
organization := "org.ekrich",
1920
homepage := Some(url("https://github.com/ekrich/sblas")),
2021
licenses := List(
21-
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
22+
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
23+
),
2224
developers := List(
2325
Developer(
2426
id = "ekrich",
@@ -31,7 +33,8 @@ inThisBuild(
3133
dynver := sbtdynver.DynVer
3234
.getGitDescribeOutput(new java.util.Date)
3335
.mkVersion(versionFmt, "")
34-
))
36+
)
37+
)
3538

3639
// stable snapshot is not great for publish local
3740
def versionFmt(out: sbtdynver.GitDescribeOutput): String = {

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
resolvers += Resolver.sonatypeRepo("snapshots")
33

44
// includes sbt-dynver sbt-pgp sbt-sonatype sbt-git
5-
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
5+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
66
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")
77

88
// Scala Native support
9-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.2")
9+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3")

0 commit comments

Comments
 (0)