Skip to content

Commit

Permalink
Add git import test using simple go project
Browse files Browse the repository at this point in the history
  • Loading branch information
mdales committed May 21, 2024
1 parent 497adfa commit 651c72b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
28 changes: 28 additions & 0 deletions specs/build-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Testing an git checkout and build

This spec is a test of using a git repository import in shark to pull an data to a shark environment:

```shark-import
https://github.com/quantifyearth/littlejohn.git /data/littlejohn
```

This project happens to be in golang, so we'll need a Go build environment:

```shark-build:golang
((from "golang:latest"))
```

We can then do the build and copy the result to a shark friendly location:

```shark-run:golang
$ cd /data/littlejohn
$ mkdir /data/build/
$ GOPATH=/data/build go install
$ ls -laR /data/build
```

And then publish the results

```shark-publish
/data/build/bin/littlejohn
```
27 changes: 0 additions & 27 deletions specs/ocaml-test.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case "$1" in
cat ./_shark/gdal.version


sudo "$GITHUB_WORKSPACE/_build/install/default/bin/shark" md specs/ocaml-test.md --store=rsync:/rsync --rsync-mode=hardlink --verbose
sudo "$GITHUB_WORKSPACE/_build/install/default/bin/shark" md specs/build-test.md --store=rsync:/rsync --rsync-mode=hardlink --verbose

# Expect a failure but with output.
if sudo "$GITHUB_WORKSPACE/_build/install/default/bin/shark" md specs/shark.failure.md --store=rsync:/rsync --rsync-mode=hardlink; then
Expand Down

0 comments on commit 651c72b

Please sign in to comment.