aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
blob: deb261d62217a949778ed94b6ab0070686a40d5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
      with:
        go-version: ${{ matrix.go }}
      id: go

    - name: Check out code
      uses: actions/checkout@v2

    - 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 "${GITHUB_WORKSPACE}/ninja-bin" >> $GITHUB_PATH

    - 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