2020-06-15 19:21:56 +02:00
|
|
|
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 }}
|
2020-11-24 01:52:58 +01:00
|
|
|
uses: actions/setup-go@v2
|
2020-06-15 19:21:56 +02:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code
|
2020-11-24 01:52:58 +01:00
|
|
|
uses: actions/checkout@v2
|
2020-06-15 19:21:56 +02:00
|
|
|
|
|
|
|
- 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
|
2020-11-24 01:52:58 +01:00
|
|
|
echo "${GITHUB_WORKSPACE}/ninja-bin" >> $GITHUB_PATH
|
2020-06-15 19:21:56 +02:00
|
|
|
|
|
|
|
- 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
|