Skip to content

Commit bca770a

Browse files
authored
Switch ci to GitHub actions (#85)
* Switch to github actions CI. * Fix CI job names. * Update macos CI clang setup. * Set up xcode in macos CI. * Fix macos CI xcode versions. * Add parallel cmake build in CI. * Add Windows MSVC 2017 build to CI. * Split CI into per os workflows. * Update CI badges. * Fix CI badge links. * Update badge links to base repo relative links. * Point CI badges to master runs. * Trigger CI on pull requests.
1 parent 3be5033 commit bca770a

File tree

5 files changed

+135
-91
lines changed

5 files changed

+135
-91
lines changed

.github/workflows/build_macos.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci-build-macos
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- .dockerignore
7+
- .gitignore
8+
- .gitattributes
9+
- AUTHORS
10+
- CONTRIBUTING.md
11+
- docker-compose.yml
12+
- LICENSE
13+
- README.md
14+
- Dockerfile
15+
- images/*
16+
- docker/*
17+
pull_request:
18+
19+
jobs:
20+
build-mac:
21+
name: "Macos 10.15 Xcode (Clang)"
22+
runs-on: macos-10.15
23+
strategy:
24+
matrix:
25+
xcode: [10.3, 11.5, 12.4]
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2.0.0
29+
- name: Set up CMake
30+
uses: jwlawson/actions-setup-cmake@v1.9
31+
with:
32+
cmake-version: '3.14.0'
33+
- name: Set up Xcode
34+
uses: maxim-lobanov/setup-xcode@v1
35+
with:
36+
xcode-version: ${{ matrix.xcode }}
37+
- name: Cpplint
38+
run: cmake -P cmake/cpplint.cmake
39+
- name: Configure
40+
run: cmake -B build -D DOWNLOAD_DATASETS=OFF
41+
- name: Build tutorials
42+
run: cmake --build build --parallel 4

.github/workflows/build_ubuntu.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci-build-ubuntu
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- .dockerignore
7+
- .gitignore
8+
- .gitattributes
9+
- AUTHORS
10+
- CONTRIBUTING.md
11+
- docker-compose.yml
12+
- LICENSE
13+
- README.md
14+
- Dockerfile
15+
- images/*
16+
- docker/*
17+
pull_request:
18+
19+
jobs:
20+
build-ubuntu:
21+
name: "Ubuntu 20.04 GCC"
22+
runs-on: ubuntu-20.04
23+
strategy:
24+
matrix:
25+
gcc: [8, 9, 10, 11]
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2.0.0
29+
- name: Set up CMake
30+
uses: jwlawson/actions-setup-cmake@v1.9
31+
with:
32+
cmake-version: '3.14.0'
33+
- name: Set up GCC
34+
uses: egor-tensin/setup-gcc@v1
35+
with:
36+
version: ${{ matrix.gcc }}
37+
- name: Cpplint
38+
run: cmake -P cmake/cpplint.cmake
39+
- name: Configure
40+
run: cmake -B build -D DOWNLOAD_DATASETS=OFF
41+
- name: Build tutorials
42+
run: cmake --build build --parallel 4

.github/workflows/build_windows.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: ci-build-windows
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- .dockerignore
7+
- .gitignore
8+
- .gitattributes
9+
- AUTHORS
10+
- CONTRIBUTING.md
11+
- docker-compose.yml
12+
- LICENSE
13+
- README.md
14+
- Dockerfile
15+
- images/*
16+
- docker/*
17+
pull_request:
18+
19+
jobs:
20+
build-windows:
21+
name: ${{ matrix.config.name }}
22+
runs-on: ${{ matrix.config.os }}
23+
strategy:
24+
matrix:
25+
config:
26+
- {
27+
name: Windows MSVC 2017,
28+
os: windows-2016
29+
}
30+
- {
31+
name: Windows MSVC 2019,
32+
os: windows-2019
33+
}
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2.0.0
37+
- name: Set up CMake
38+
uses: jwlawson/actions-setup-cmake@v1.9
39+
with:
40+
cmake-version: '3.14.0'
41+
- name: Cpplint
42+
run: cmake -P cmake/cpplint.cmake
43+
- name: Configure
44+
run: cmake -B build -A x64 -D DOWNLOAD_DATASETS=OFF
45+
- name: Build tutorials
46+
run: cmake --build build --config Release --parallel 4

.travis.yml

-80
This file was deleted.

README.md

+5-11
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,17 @@
44
<p align="center">
55
C++ Implementation of PyTorch Tutorials for Everyone
66
<br />
7-
<img src="https://img.shields.io/travis/prabhuomkar/pytorch-cpp">
87
<img src="https://img.shields.io/github/license/prabhuomkar/pytorch-cpp">
98
<img src="https://img.shields.io/badge/libtorch-1.8.0-ee4c2c">
109
<img src="https://img.shields.io/badge/cmake-3.14-064f8d">
1110
</p>
1211

1312

14-
| OS (Compiler)\\LibTorch | 1.8.0 | nightly |
15-
| :---------------------: | :---------------------------------------------------------------------------------------------------: | :-----: |
16-
| macOS (clang 9.1) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/1) | |
17-
| macOS (clang 10.0) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/2) | |
18-
| macOS (clang 11.0) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/3) | |
19-
| Linux (gcc 5) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/4) | |
20-
| Linux (gcc 6) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/5) | |
21-
| Linux (gcc 7) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/6) | |
22-
| Linux (gcc 8) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/7) | |
23-
| Windows (msvc 2017) | ![Status](https://travis-matrix-badges.herokuapp.com/repos/prabhuomkar/pytorch-cpp/branches/master/8) | |
13+
| OS (Compiler)\\LibTorch | 1.8.0 |
14+
| :--------------------- | :--------------------------------------------------------------------------------------------------- |
15+
| macOS (clang 10.0, 11.0, 12.0) | [![Status](https://github.com/prabhuomkar/pytorch-cpp/actions/workflows/build_macos.yml/badge.svg?branch=master)](https://github.com/prabhuomkar/pytorch-cpp/actions?query=workflow%3Aci-build-macos) |
16+
| Linux (gcc 8, 9, 10, 11) | [![Status](https://github.com/prabhuomkar/pytorch-cpp/actions/workflows/build_ubuntu.yml/badge.svg?branch=master)](https://github.com/prabhuomkar/pytorch-cpp/actions?query=workflow%3Aci-build-ubuntu) |
17+
| Windows (msvc 2017, 2019) | [![Status](https://github.com/prabhuomkar/pytorch-cpp/actions/workflows/build_windows.yml/badge.svg?branch=master)](https://github.com/prabhuomkar/pytorch-cpp/actions?query=workflow%3Aci-build-windows) |
2418

2519
## Table of Contents
2620

0 commit comments

Comments
 (0)