Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

[WIP] Test against a source build of the Scala ecosystem #143

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ tools/deleted_packages.rc
/.settings
/.vscode/
/bazel.iml
singularity
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ jobs:
- <<: *linux
env: V=0.18.0
script: ./travis.sh test
# Test against scala ecosystem source build
- <<: *osx
env: V=0.18.0
script: ./travis.sh test-singularity
- <<: *linux
env: V=0.18.0
script: ./travis.sh test-singularity
19 changes: 19 additions & 0 deletions test-singularity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh -e

sha=0ddc53be490bfd068162bcf29a15d5c5183af247
url="https://github.com/andyscott/singularity/archive/$sha.tar.gz"
location="singularity"
if [ ! -d "$location" ]; then
mkdir -p "$location"
curl -L "$url" | tar zxf - --strip-components=1 -C "$location"
fi

rules_scala_annex=$(pwd)
(
cd "$location" && \
bazel test \
--announce_rc \
--disk_cache="$rules_scala_annex/.bazel_cache" \
--override_repository=rules_scala_annex="$rules_scala_annex" \
--config=quick //repos:test_suite
)
3 changes: 2 additions & 1 deletion tools/gen-ignores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ cd "$(dirname "$0")"/..

PACKAGES0=$(find -L external-tools -iname BUILD -o -iname BUILD.bazel | xargs -n1 dirname | tr '\n' ,)
PACKAGES1=$(find -L tests -iname BUILD -o -iname BUILD.bazel | xargs -n1 dirname | tr '\n' ,)
PACKAGES2=$(find -L singularity -iname BUILD -o -iname BUILD.bazel | xargs -n1 dirname | tr '\n' ,)

echo Updating tools/deleted_packages.rc
echo '# generated' > tools/deleted_packages.rc
packages=$PACKAGES0,$PACKAGES1
packages=$PACKAGES0,$PACKAGES1,$PACKAGES2
(
echo "build --deleted_packages=$packages"
echo "query --deleted_packages=$packages"
Expand Down
4 changes: 4 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ case "$1" in
./test.sh
;;

"test-singularity")
./test-singularity.sh
;;

"lint")
./setup-tools.sh --skip-deps
./format.sh check
Expand Down