Merge pull request #305 from danw/ghactions
Use github actions instead of travis
This commit is contained in:
commit
2c0cd0ac8d
6 changed files with 48 additions and 59 deletions
47
.github/workflows/build.yml
vendored
Normal file
47
.github/workflows/build.yml
vendored
Normal file
|
@ -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
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if echo $TRAVIS_BUILD_DIR | grep -vq "github.com/google/blueprint$" ; then
|
||||
cd ../..
|
||||
mkdir -p google
|
||||
mv $TRAVIS_BUILD_DIR google/blueprint
|
||||
cd google/blueprint
|
||||
export TRAVIS_BUILD_DIR=$PWD
|
||||
fi
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Version of ninja to build -- can be any git revision
|
||||
VERSION="v1.7.1"
|
||||
|
||||
set -ev
|
||||
|
||||
SCRIPT_HASH=$(sha1sum ${BASH_SOURCE[0]} | awk '{print $1}')
|
||||
|
||||
cd ~
|
||||
if [[ -d ninjabin && "$SCRIPT_HASH" == "$(cat ninjabin/script_hash)" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git clone https://github.com/martine/ninja
|
||||
cd ninja
|
||||
./configure.py --bootstrap
|
||||
|
||||
mkdir -p ../ninjabin
|
||||
rm -f ../ninjabin/ninja
|
||||
echo -n $SCRIPT_HASH >../ninjabin/script_hash
|
||||
mv ninja ../ninjabin/
|
27
.travis.yml
27
.travis.yml
|
@ -1,27 +0,0 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- "1.10"
|
||||
- "1.11"
|
||||
- "1.12"
|
||||
- "1.13"
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/ninjabin
|
||||
|
||||
install:
|
||||
- ./.travis.install-ninja.sh
|
||||
- export PATH=$PATH:~/ninjabin
|
||||
|
||||
before_script:
|
||||
- source .travis.fix-fork.sh
|
||||
|
||||
script:
|
||||
- export GOROOT=$(go env GOROOT)
|
||||
- ./.travis.gofmt.sh
|
||||
- go test ./...
|
||||
- go test -race -short ./...
|
||||
- ./tests/test.sh
|
||||
- ./tests/test_tree_tests.sh
|
||||
- ./tests/test_tree_tests.sh -t
|
|
@ -1,6 +1,6 @@
|
|||
Blueprint Build System
|
||||
======================
|
||||
[![Build Status](https://travis-ci.org/google/blueprint.svg?branch=master)](https://travis-ci.org/google/blueprint)
|
||||
[![build](https://github.com/danw/blueprint/workflows/build/badge.svg)](https://github.com/google/blueprint/actions)
|
||||
|
||||
Blueprint is a meta-build system that reads in Blueprints files that describe
|
||||
modules that need to be built, and produces a
|
||||
|
|
Loading…
Reference in a new issue