Skip to content

Commit 9c4c442

Browse files
authored
Merge pull request #109 from ChrisCummins/feature/github_actions
Add GitHub actions workflow to run CI tests
2 parents a2caa52 + c180686 commit 9c4c442

File tree

7 files changed

+76
-68
lines changed

7 files changed

+76
-68
lines changed

.bazelrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,13 @@ build:ubsan --copt -fno-omit-frame-pointer
6565
build:ubsan --linkopt -fsanitize=undefined
6666
build:ubsan --linkopt -lubsan
6767

68-
# Control progress output when invoked by Travis
69-
build:travis --noshow_progress --noshow_loading_progress --show_task_finish --action_env=PATH
68+
# --config ci: Continuous Integration tool
69+
query:ci --noshow_progress
70+
query:ci --noshow_loading_progress
71+
build:ci --noshow_progress
72+
build:ci --noshow_loading_progress
73+
build:ci --show_task_finish
74+
build:ci --action_env=PATH
75+
build:ci --keep_going
76+
build:ci --verbose_failures
77+
build:ci --test_output=errors

.github/workflows/ci.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * 0' # weekly
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: "Linux: Mount bazel cache"
21+
uses: actions/cache@v2
22+
with:
23+
path: "/home/runner/.cache/bazel"
24+
key: ${{ matrix.os }}-bazel
25+
if: matrix.os == 'ubuntu-latest'
26+
27+
- name: "Linux: Install system dependencies"
28+
run: |
29+
curl -L "https://github.com/bazelbuild/bazelisk/releases/download/v1.6.1/bazelisk-linux-amd64" > bazel.tmp
30+
sudo mv bazel.tmp /usr/local/bin/bazel
31+
chmod +x /usr/local/bin/bazel
32+
if: matrix.os == 'ubuntu-latest'
33+
34+
- name: "macOS: Mount bazel cache"
35+
uses: actions/cache@v2
36+
with:
37+
path: "/private/var/tmp/_bazel_runner"
38+
key: ${{ matrix.os }}-bazel
39+
if: matrix.os == 'macos-latest'
40+
41+
- name: "macOS: Install system dependencies"
42+
run: |
43+
brew install freetype pkg-config bazelisk mysql-client coreutils findutils gnu-sed zlib
44+
echo "::add-path::/usr/local/opt/mysql-client/bin"
45+
if: matrix.os == 'macos-latest'
46+
47+
- name: Install python dependencies
48+
run: |
49+
python3 -m pip install --upgrade pip
50+
grep numpy requirements.txt | xargs python3 -m pip install
51+
python3 -m pip install setuptools
52+
echo "::add-path::/home/runner/.local/bin"
53+
54+
- name: whoami
55+
run: ./tools/whoami.sh
56+
57+
- name: Test
58+
run: bazel query --config=ci 'tests(//...) except attr("tags", "notravis", //...)' | xargs bazel test --config=ci
59+
60+
- name: Install
61+
run: |
62+
mkdir "${GITHUB_WORKSPACE}/install"
63+
bazel run --config=ci //:install "${GITHUB_WORKSPACE}/install"

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
exports_files([
2121
".bettercodehub.yml",
22-
".travis.yml",
2322
"CONTRIBUTING.md",
2423
"LICENSE",
2524
"README.md",

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
</a>
1515

1616
<!-- Build status -->
17-
| Branch | Travis CI | Better Code |
17+
| Branch | Test Suite | Code Quality |
1818
| ------ | --------- | ----------- |
19-
| [stable](https://github.com/ChrisCummins/ProGraML/tree/stable) | <a href="https://travis-ci.org/ChrisCummins/ProGraML"><img src="https://img.shields.io/travis/ChrisCummins/ProGraML/stable.svg"></a> | <a href="https://bettercodehub.com/results/ChrisCummins/ProGraML"><img src="https://bettercodehub.com/edge/badge/ChrisCummins/ProGraML?branch=stable"></a> |
20-
| [development](https://github.com/ChrisCummins/ProGraML/tree/development) | <a href="https://travis-ci.org/ChrisCummins/ProGraML"><img src="https://img.shields.io/travis/ChrisCummins/ProGraML/development.svg"></a> | <a href="https://bettercodehub.com/results/ChrisCummins/ProGraML"><img src="https://bettercodehub.com/edge/badge/ChrisCummins/ProGraML?branch=development"></a> |
19+
| [stable](https://github.com/ChrisCummins/ProGraML/tree/stable) | [![stable](https://github.com/ChrisCummins/ProGraML/workflows/CI/badge.svg?branch=stable)](https://github.com/ChrisCummins/ProGraML/actions?query=workflow%3ACI+branch%3Astable) | <a href="https://bettercodehub.com/results/ChrisCummins/ProGraML"><img src="https://bettercodehub.com/edge/badge/ChrisCummins/ProGraML?branch=stable"></a> |
20+
| [development](https://github.com/ChrisCummins/ProGraML/tree/development) | [![development](https://github.com/ChrisCummins/ProGraML/workflows/CI/badge.svg?branch=development)](https://github.com/ChrisCummins/ProGraML/actions?query=workflow%3ACI+branch%3Adevelopment) | <a href="https://bettercodehub.com/results/ChrisCummins/ProGraML"><img src="https://bettercodehub.com/edge/badge/ChrisCummins/ProGraML?branch=development"></a> |
2121

2222

2323
ProGraML is a representation for programs as input to a machine learning model.

tools/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
exports_files([
22
"bazel",
33
"bazel_env.sh",
4-
"Brewfile.travis",
54
"flaky_bazel.sh",
65
"make_bootstrap.py",
76
"README.md",

tools/Brewfile.travis

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)