aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2020-06-15 10:21:56 -0700
committerDan Willemsen <dwillemsen@google.com>2020-06-15 10:32:10 -0700
commitbb7ecb7fb34b7daeb85042907d27337baed20676 (patch)
tree42b153446fa5738ba189933aacbb80435c334c1b /.github
parentfe2fa04c306f40bea8682c372f35ae17b3f5a928 (diff)
downloadplatform_build_blueprint-bb7ecb7fb34b7daeb85042907d27337baed20676.tar.gz
platform_build_blueprint-bb7ecb7fb34b7daeb85042907d27337baed20676.tar.bz2
platform_build_blueprint-bb7ecb7fb34b7daeb85042907d27337baed20676.zip
Use github actions instead of travis
Change-Id: I8a03ca383c53bbcacc403cb954fc2ec2af8fe33d
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..2d22da4
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,47 @@
+name: build
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ go: [ '1.14', '1.13' ]
+ name: Build and test on go ${{ matrix.go }}
+ steps:
+
+ - name: Set up Go ${{ matrix.go }}
+ uses: actions/setup-go@v2.0.3
+ with:
+ go-version: ${{ matrix.go }}
+ id: go
+
+ - name: Check out code
+ uses: actions/checkout@v2.2.0
+
+ - name: Install ninja
+ run: |
+ mkdir -p ${GITHUB_WORKSPACE}/ninja-bin; cd ${GITHUB_WORKSPACE}/ninja-bin
+ wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
+ unzip ninja-linux.zip
+ rm ninja-linux.zip
+ echo "::add-path::${GITHUB_WORKSPACE}/ninja-bin"
+
+ - name: Run gofmt
+ run: ./.gofmt.sh
+
+ - name: Test
+ run: go test ./...
+
+ - name: Test with race detector
+ run: go test -race -short ./...
+
+ - run: ./tests/test.sh
+ - run: ./tests/test_tree_tests.sh
+ - run: ./tests/test_tree_tests.sh -t