16754d14e2
actions/setup-go@v2.0.3 seems to cause issues with https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ Change the precise versions to major versions to get updates. Also fix the "Install ninja" action to use $GITHUB_PATH. Change-Id: Ia3ec693e405a2530350736e7856ad758af3fb027
47 lines
1 KiB
YAML
47 lines
1 KiB
YAML
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
|