This repository has been archived by the owner on Mar 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from juanjux/feature/semantic
Semantic objects
- Loading branch information
Showing
335 changed files
with
180,528 additions
and
115,972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
language: go | ||
|
||
go: | ||
- 1.9 | ||
- '1.10' | ||
|
||
services: | ||
- docker | ||
|
||
before_script: | ||
- go get -v gopkg.in/bblfsh/sdk.v2/... | ||
- bblfsh-sdk prepare-build . | ||
- go get -v -t ./driver/... | ||
- curl -L https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 > $GOPATH/bin/dep | ||
- chmod +x $GOPATH/bin/dep | ||
- dep ensure --vendor-only | ||
- go get ./vendor/gopkg.in/bblfsh/sdk.v2/cmd/... | ||
- go install ./vendor/gopkg.in/bblfsh/sdk.v2/cmd/... | ||
- docker pull bblfsh/bblfshd | ||
|
||
script: | ||
- make test integration-test | ||
- bblfsh-sdk update --dry-run | ||
- bblfsh-sdk build ci-build | ||
- bblfsh-sdk test ci-build | ||
|
||
after_success: | ||
- make push | ||
- bblfsh-sdk push ci-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Prerequisites: | ||
# dep ensure --vendor-only | ||
# bblfsh-sdk release | ||
|
||
#============================== | ||
# Stage 1: Native Driver Build | ||
#============================== | ||
FROM python:3.6-alpine as native | ||
|
||
ADD native /native | ||
WORKDIR /native | ||
|
||
# build native driver | ||
RUN pip3 install -U --prefix=./.local ./python_package | ||
|
||
|
||
#================================ | ||
# Stage 1.1: Native Driver Tests | ||
#================================ | ||
FROM native as native_test | ||
# run native driver tests | ||
RUN cd ./python_package/test && PYTHONPATH=../../.local:$PYTHONPATH python3 -m unittest discover | ||
|
||
|
||
#================================= | ||
# Stage 2: Go Driver Server Build | ||
#================================= | ||
FROM golang:1.10-alpine as driver | ||
|
||
ENV DRIVER_REPO=github.com/bblfsh/python-driver | ||
ENV DRIVER_REPO_PATH=/go/src/$DRIVER_REPO | ||
|
||
ADD vendor $DRIVER_REPO_PATH/vendor | ||
ADD driver $DRIVER_REPO_PATH/driver | ||
|
||
WORKDIR $DRIVER_REPO_PATH/ | ||
|
||
# build server binary | ||
RUN go build -o /tmp/driver ./driver/main.go | ||
# build tests | ||
RUN go test -c -o /tmp/fixtures.test ./driver/fixtures/ | ||
|
||
#======================= | ||
# Stage 3: Driver Build | ||
#======================= | ||
FROM python:3.6-alpine | ||
|
||
RUN apk add python2 | ||
|
||
|
||
LABEL maintainer="source{d}" \ | ||
bblfsh.language="python" | ||
|
||
WORKDIR /opt/driver | ||
|
||
# copy static files from driver source directory | ||
ADD ./native/sh/native.sh ./bin/native | ||
|
||
|
||
# copy build artifacts for native driver | ||
COPY --from=native /native/.local ./bin/.local | ||
|
||
|
||
# copy driver server binary | ||
COPY --from=driver /tmp/driver ./bin/ | ||
|
||
# copy tests binary | ||
COPY --from=driver /tmp/fixtures.test ./bin/ | ||
# move stuff to make tests work | ||
RUN ln -s /opt/driver ../build | ||
VOLUME /opt/fixtures | ||
|
||
# copy driver manifest and static files | ||
ADD .manifest.release.toml ./etc/manifest.toml | ||
|
||
ENTRYPOINT ["/opt/driver/bin/driver"] |
Oops, something went wrong.