Skip to content

Commit

Permalink
Build on Github
Browse files Browse the repository at this point in the history
* ensure to fetch tag information (see issue [#290])

[#290]: actions/checkout#290
  • Loading branch information
avdv committed Nov 5, 2020
1 parent fbc194b commit 6b8731b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
submodules: true
- uses: cachix/install-nix-action@v12
with:
skip_adding_nixpkgs_channel: true
Expand All @@ -16,5 +18,6 @@ jobs:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# Only needed for private caches
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: git fetch --tags --force --recurse-submodules
- run: nix-build
# TODO - run: nix-shell --run "sbt test"
- run: nix-shell --run "sbt -batch -Dfile.encoding=UTF8 scalalsNative/run"
2 changes: 1 addition & 1 deletion modules/scala-native
Submodule scala-native updated 1025 files
7 changes: 5 additions & 2 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ in
nixpkgs-fmt.enable = true;
nix-linter.enable = true;
};
# generated files
excludes = [ "^nix/sources\.nix$" ];
# generated files / submodules
excludes = [
"^nix/sources\.nix$"
"^modules/"
];
};
};
}
7 changes: 6 additions & 1 deletion scripts/travis-install
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ if [ -e "$SCALA_NATIVE_BUILD" ]; then
else
rm -rf "$HOME/.ivy2/local"

printf '\n*** Compiling scala-native ***\n\n'
(cd modules/scala-native && sbt -batch -Dfile.encoding=UTF8 -sbt-version "$SBT_VERSION" publishLocal)
(cd modules/scopt && sbt -batch -Dfile.encoding=UTF8 -sbt-version "$SBT_VERSION" "++$TRAVIS_SCALA_VERSION" scoptNative/publishLocal)

printf '\n*** Compiling scopt ***\n\n'
(cd modules/scopt && sbt -batch -Dfile.encoding=UTF8 -sbt-version "$SBT_VERSION" ${TRAVIS_SCALA_VERSION:+"++$TRAVIS_SCALA_VERSION"} scoptNative/publishLocal)

printf '\n*** Compiling scala-library-compat ***\n\n'
(cd modules/scala-library-compat && SCALANATIVE_VERSION=0.4.0-SNAPSHOT sbt -batch -sbt-version "$SBT_VERSION" compat211Native/publishLocal)

touch "$SCALA_NATIVE_BUILD"
Expand Down
6 changes: 6 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ project.pkgs.mkShell {
buildInputs = builtins.attrValues project.devTools;
shellHook = ''
${project.ci.pre-commit-check.shellHook}
export SN_BUILD=$( sed -n -e 's/.* SN_BUILD=\([0-9]*\).*/\1/p' -e T -e q .travis.yml )
export SBT_VERSION=$( sed -n -e 's/.* SBT_VERSION=\([0-9.]*\).*/\1/p' -e T -e q .travis.yml )
export TRAVIS_SCALA_VERSION=$( sed -n -e '/^scala:/{ n ; s/^[- ]*//p ; q }' .travis.yml )
scripts/travis-install
'';
}

0 comments on commit 6b8731b

Please sign in to comment.