Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Nov 9, 2017
2 parents 74476e6 + a92e7e5 commit b65689f
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
main
*.coverprofile
22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@ sudo: no
go:
- 1.9

go_import_path:
- "github.com/tatsy/gopt"
go_import_path: github.com/tatsy/gopt

before_install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/modocache/gover

install:
make
- export GOPATH=$TRAVIS_BUILD_DIR
- go build ./...

script:
make test
- go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c

after_success:
- $HOME/gopath/bin/gover
- $HOME/gopath/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken $COVERALLS_REPO_TOKEN

env:
global:
secure: IX5ny+aDB+4lFpO5riuBHyTrWoUhdx5vPCAbavVupJdxuC+yRl1d3+KtCPOojlmbCqCEVseYkH0Iht8Sg7v5dRf2lqoX4p5i54akuP0BBTE5XQi0KAh9vCH/zkx9Kl1WTjm/4QzFxYwy3dCRUNNQZMu/4gFXnVG27GzcAkaQypBdKmpT5Kg8AlAqPTHmvflzTAINdtGHrw0SjL+yE86dQzjw59ipS1omadEfW++ZKyEMR8Wu1B1yPhxPKhVFI+Xq3PHNz9+HyjDYfvyqEgDNVe16/Wx2qLwDKh0CSbhsgxN8uPOrXAxZZjVL9Br1/8wZM39hQTsTW0CD2Fj+YKHxph+uOWEV1l9nBvHIvTR+3gVJewrib8rHK/KY4PARYjKWrhY6Prkd57a5/bjkbjIRoGboS/hNiT2p3yU6C2gd+PqtoygA5X+UX78ab7sGlcxpE8ITfgM/DJe4WbWItjczRa6n4Gm5/APHy1snZs+V+udbXp2I1NLZ/xl+SqISceSnUOvb+6zJ8Y9dPzcJtZOtlzsNCztm7R8Gg6m1p0DYcDkLgJFy6ejdXq/0/yz25qGMpdEfkvFFqDnoPtc4jm/U9MHavHtsqR0roRQfIqtCfD/6u35OGctwI3rrMttI/UoQMjYrjsz7BewVX10f+HOOqngoplaliIHIFmFftNpCuMM=


branches:
only:
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
all:
go build src/main.go
export GOPATH=`pwd`
go build ./...

run:
go run src/main.go

test:
go test ./src/... --count 10 --cover
go test ./... -v --count 10 --cover

clean:
rm -rf main image.jpg
rm -rf main *.jpg *.png
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ gopt
===

[![Build Status](https://travis-ci.org/tatsy/gopt.svg?branch=master)](https://travis-ci.org/tatsy/gopt)

[![Coverage Status](https://coveralls.io/repos/github/tatsy/gopt/badge.svg)](https://coveralls.io/github/tatsy/gopt)
2 changes: 1 addition & 1 deletion src/accelerator/bvh.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package accelerator

import (
"sort"
. "../core"
. "core"
)

type BvhNode struct {
Expand Down
6 changes: 3 additions & 3 deletions src/accelerator/bvh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"math"
"math/rand"
"testing"
. "../core"
. "../shape"
. "../bsdf"
. "core"
. "shape"
. "bsdf"
)

func TestAxisSorter(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion src/bsdf/lambert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bsdf

import (
// "math"
. "../core"
. "core"
)

type LambertBsdf struct {
Expand Down
4 changes: 2 additions & 2 deletions src/integrator/path.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package integrator

import (
. "../core"
. "../accelerator"
. "core"
. "accelerator"
)

type PathIntegrator struct {
Expand Down
14 changes: 7 additions & 7 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"fmt"
. "./core"
. "./accelerator"
. "./bsdf"
. "./shape"
. "./sensor"
. "./sampler"
. "./integrator"
. "core"
. "accelerator"
. "bsdf"
. "shape"
. "sensor"
. "sampler"
. "integrator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/sampler/independent.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package sampler

import (
"math/rand"
. "../core"
. "core"
)

type IndependentSampler struct {
Expand Down
2 changes: 1 addition & 1 deletion src/sensor/perspective.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package sensor

import (
"math"
. "../core"
. "core"
)

type PerspectiveSensor struct {
Expand Down
2 changes: 1 addition & 1 deletion src/shape/sphere.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shape

import (
. "../core"
. "core"
)

type Sphere struct {
Expand Down
2 changes: 1 addition & 1 deletion src/shape/triangle.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package shape

import (
"math"
. "../core"
. "core"
)

type Triangle struct {
Expand Down
2 changes: 1 addition & 1 deletion src/shape/triangle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package shape

import (
"testing"
. "../core"
. "core"
)

func TestTriangleIntersect(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion src/shape/trimesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"bufio"
"strings"
"strconv"
. "../core"
. "core"
)

type TriMesh struct {
Expand Down

0 comments on commit b65689f

Please sign in to comment.