Skip to content

Commit 6b8731b

Browse files
committed
Build on Github
* ensure to fetch tag information (see issue [#290]) [#290]: actions/checkout#290
1 parent fbc194b commit 6b8731b

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2.3.4
10+
with:
11+
submodules: true
1012
- uses: cachix/install-nix-action@v12
1113
with:
1214
skip_adding_nixpkgs_channel: true
@@ -16,5 +18,6 @@ jobs:
1618
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
1719
# Only needed for private caches
1820
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
21+
- run: git fetch --tags --force --recurse-submodules
1922
- run: nix-build
20-
# TODO - run: nix-shell --run "sbt test"
23+
- run: nix-shell --run "sbt -batch -Dfile.encoding=UTF8 scalalsNative/run"

modules/scala-native

Submodule scala-native updated 1025 files

nix/default.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ in
3636
nixpkgs-fmt.enable = true;
3737
nix-linter.enable = true;
3838
};
39-
# generated files
40-
excludes = [ "^nix/sources\.nix$" ];
39+
# generated files / submodules
40+
excludes = [
41+
"^nix/sources\.nix$"
42+
"^modules/"
43+
];
4144
};
4245
};
4346
}

scripts/travis-install

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ if [ -e "$SCALA_NATIVE_BUILD" ]; then
99
else
1010
rm -rf "$HOME/.ivy2/local"
1111

12+
printf '\n*** Compiling scala-native ***\n\n'
1213
(cd modules/scala-native && sbt -batch -Dfile.encoding=UTF8 -sbt-version "$SBT_VERSION" publishLocal)
13-
(cd modules/scopt && sbt -batch -Dfile.encoding=UTF8 -sbt-version "$SBT_VERSION" "++$TRAVIS_SCALA_VERSION" scoptNative/publishLocal)
14+
15+
printf '\n*** Compiling scopt ***\n\n'
16+
(cd modules/scopt && sbt -batch -Dfile.encoding=UTF8 -sbt-version "$SBT_VERSION" ${TRAVIS_SCALA_VERSION:+"++$TRAVIS_SCALA_VERSION"} scoptNative/publishLocal)
17+
18+
printf '\n*** Compiling scala-library-compat ***\n\n'
1419
(cd modules/scala-library-compat && SCALANATIVE_VERSION=0.4.0-SNAPSHOT sbt -batch -sbt-version "$SBT_VERSION" compat211Native/publishLocal)
1520

1621
touch "$SCALA_NATIVE_BUILD"

shell.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ project.pkgs.mkShell {
88
buildInputs = builtins.attrValues project.devTools;
99
shellHook = ''
1010
${project.ci.pre-commit-check.shellHook}
11+
12+
export SN_BUILD=$( sed -n -e 's/.* SN_BUILD=\([0-9]*\).*/\1/p' -e T -e q .travis.yml )
13+
export SBT_VERSION=$( sed -n -e 's/.* SBT_VERSION=\([0-9.]*\).*/\1/p' -e T -e q .travis.yml )
14+
export TRAVIS_SCALA_VERSION=$( sed -n -e '/^scala:/{ n ; s/^[- ]*//p ; q }' .travis.yml )
15+
16+
scripts/travis-install
1117
'';
1218
}

0 commit comments

Comments
 (0)