Skip to content

Commit 86e7e33

Browse files
committed
Add support for testing different SN versions in the CI
1 parent 62ce2c2 commit 86e7e33

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ jobs:
44
test-all:
55
runs-on: ${{matrix.OS}}
66
strategy:
7+
fail-fast: false
78
matrix:
89
OS: [ubuntu-18.04, windows-2019]
10+
SN: [0.4.0, 0.4.1, 0.4.2]
11+
exclude:
12+
# does not support windows
13+
- OS: windows-2019
14+
SN: 0.4.0
915
steps:
1016
- uses: actions/checkout@v2
1117
- uses: olafurpg/setup-scala@v13
1218
- name: Unit tests
13-
run: sbt cli/test
19+
run: SN_CLI_VERSION=${{matrix.SN}} sbt cli/test
1420
shell: bash
1521
- name: Intergration tests
16-
run: sbt cliIntegration/scripted
22+
run: SN_CLI_VERSION=${{matrix.SN}} sbt cliIntegration/scripted
1723
shell: bash

.github/workflows/check-lint.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,5 @@ jobs:
55
check-lint:
66
runs-on: ubuntu-18.04
77
steps:
8-
- name: Install clang-format
9-
run: |
10-
sudo apt update
11-
sudo apt install clang-format-6.0
128
- uses: actions/checkout@v2
139
- run: ./scripts/check-lint.sh
14-
env:
15-
CLANG_FORMAT_PATH: "/usr/bin/clang-format-6.0"

build.sbt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
scalaVersion := "2.12.15"
2-
val nativeVersion = "0.4.1"
2+
3+
// TODO remove and settle for one version after release
4+
val nativeVersion = sys.env.get("SN_CLI_VERSION") match {
5+
case Some(value) => "0.4.1"
6+
case None => "0.4.0"
7+
}
8+
val versionTag =
9+
if (nativeVersion == "0.4.0") "0.4.0"
10+
else "newer"
11+
//
12+
313
val cliVersion = nativeVersion + "-SNAPSHOT"
414

515
inThisBuild(
@@ -18,8 +28,8 @@ lazy val cli = project
1828
libraryDependencies += "com.github.alexarchambault" %% "case-app" % "2.1.0-M10",
1929
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.1" % Test,
2030
assembly / assemblyJarName := "scala-native-cli.jar", // Used for integration tests.
21-
Compile / unmanagedSourceDirectories += baseDirectory.value / s"version_${nativeVersion}/src/main/scala",
22-
Test / unmanagedSourceDirectories += baseDirectory.value / s"version_${nativeVersion}/src/test/scala"
31+
Compile / unmanagedSourceDirectories += baseDirectory.value / s"version_${versionTag}/src/main/scala",
32+
Test / unmanagedSourceDirectories += baseDirectory.value / s"version_${versionTag}/src/test/scala"
2333
)
2434

2535
// Meant to resolve classpath dependencies, provide compiled nir

0 commit comments

Comments
 (0)