Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Migrate project from TravisCI to GitHub Actions #30

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
czgdp1807 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
test:
runs-on: ${{matrix.os}}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
cd ../
wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz
tar -zxvf cmake-3.10.2-Linux-x86_64.tar.gz
wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz
tar -zxvf release-1.10.0.tar.gz
ls -a
mkdir googletest-build
cd googletest-build
sudo ../cmake-3.10.2-Linux-x86_64/bin/cmake ../googletest-release-1.10.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if sudo is allowed on Github actions CI. Can we create a conda environment and install dependencies there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From GitHub Docs:

The Linux and macOS virtual machines both run using passwordless sudo. When you need to execute commands or install tools that require more privileges than the current user, you can use sudo without needing to provide a password.

Ref: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#about-virtual-environments

sudo make -j
sudo make install
cd ../
mkdir build-BNN
cd build-BNN
sudo ../cmake-3.10.2-Linux-x86_64/bin/cmake -DBUILD_TESTS=ON -DINSTALL_GOOGLETEST=OFF -DCMAKE_PREFIX_PATH=/usr/local/include ../BNN
sudo make -j5
wget https://raw.githubusercontent.com/codezonediitj/test_data/master/t10k-images-idx3-ubyte.gz
gzip -d t10k-images-idx3-ubyte.gz
wget https://raw.githubusercontent.com/codezonediitj/test_data/master/t10k-labels-idx1-ubyte.gz
gzip -d t10k-labels-idx1-ubyte.gz

- name: Run tests
run: |
./bin/test_core --CI=ON
./bin/test_operations --CI=ON
./bin/test_io --CI=ON
./bin/test_autodiff --CI=ON
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.