diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8f509d7..4af4cad2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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" diff --git a/modules/scala-native b/modules/scala-native index c5181956..939a1291 160000 --- a/modules/scala-native +++ b/modules/scala-native @@ -1 +1 @@ -Subproject commit c518195657c54b5675e87966a488c36823484b05 +Subproject commit 939a12916ba5e25e3d7b1603b5d65cfd4e23cbd9 diff --git a/nix/default.nix b/nix/default.nix index 3343f761..e81f0bb1 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -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/" + ]; }; }; } diff --git a/scripts/travis-install b/scripts/travis-install index 623fde2c..8244be43 100755 --- a/scripts/travis-install +++ b/scripts/travis-install @@ -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" diff --git a/shell.nix b/shell.nix index 80a04355..74d1f43c 100644 --- a/shell.nix +++ b/shell.nix @@ -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 ''; }