aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2020-06-11 17:34:37 -0700
committerDan Willemsen <dwillemsen@google.com>2020-06-11 21:20:36 -0700
commit961958ac13c263566f391cbf87a72a438f2fc909 (patch)
tree129049cc79a1aaf930471b26a994ab4bf92b9125
parent79efeda18cc5aa79f2a4e4566f5a955327701296 (diff)
downloadplatform_build_kati-961958ac13c263566f391cbf87a72a438f2fc909.tar.gz
platform_build_kati-961958ac13c263566f391cbf87a72a438f2fc909.tar.bz2
platform_build_kati-961958ac13c263566f391cbf87a72a438f2fc909.zip
Use github actions instead of travis
Change-Id: I4c5e7b6efde08f9257e68407bc160f6699655a03
-rw-r--r--.github/workflows/cpp-ci.yml44
-rw-r--r--.travis.yml36
-rw-r--r--README.md2
-rwxr-xr-xclang-format-check3
4 files changed, 46 insertions, 39 deletions
diff --git a/.github/workflows/cpp-ci.yml b/.github/workflows/cpp-ci.yml
new file mode 100644
index 0000000..c076cf1
--- /dev/null
+++ b/.github/workflows/cpp-ci.yml
@@ -0,0 +1,44 @@
+name: Build and Test
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ env:
+ CXX: clang++-9
+ CLANG_FORMAT: clang-format-9
+
+ steps:
+ - 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: make
+ run: make -j4 ckati ckati_tests
+ - name: clang format
+ run: ./clang-format-check
+ - name: run standalone tests
+ run: ruby runtest.rb -c
+ - name: run ninja tests
+ run: ruby runtest.rb -c -n
+ - name: run ninja all targets tests
+ run: ruby runtest.rb -c -n -a
+ - name: run ninja unit tests
+ run: ./ninja_test
+ - name: run stringpiece unit tests
+ run: ./string_piece_test
+ - name: run strutil unit tests
+ run: ./strutil_test
+ - name: run find unit tests
+ run: ./find_test
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e2d9e21..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-language: cpp
-
-dist: trusty
-sudo: required
-
-compiler:
- - clang
-
-addons:
- apt:
- update: true
- sources:
- - ubuntu-toolchain-r-test
- - llvm-toolchain-trusty-7
- packages:
- - clang-7
- - clang-format-7
- - realpath
-
-cache: apt
-
-before_script:
- - wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
- - unzip ninja-linux.zip -d ~/bin
-
-script:
- - export CXX=clang++-7
- - make -j4 ckati ckati_tests
- - ./clang-format-check
- - ruby runtest.rb -c
- - ruby runtest.rb -c -n
- - ruby runtest.rb -c -n -a
- - ./ninja_test
- - ./string_piece_test
- - ./strutil_test
- - ./find_test
diff --git a/README.md b/README.md
index 029a57d..ee8b51f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
kati
====
-[![Build Status](https://travis-ci.org/google/kati.svg?branch=master)](http://travis-ci.org/google/kati)
+[![Build and Test](https://github.com/google/kati/workflows/Build%20and%20Test/badge.svg)](https://github.com/google/kati/actions)
kati is an experimental GNU make clone.
The main goal of this tool is to speed-up incremental build of Android.
diff --git a/clang-format-check b/clang-format-check
index 7eaa1c2..c0a01f2 100755
--- a/clang-format-check
+++ b/clang-format-check
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
-CLANG_FORMAT="clang-format-7"
-if [ -z "$(which $CLANG_FORMAT)" ]; then
+if [ -z "$CLANG_FORMAT" ]; then
CLANG_FORMAT="clang-format"
fi