diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b870e4e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: build + +on: + push: + branches: [master] + pull_request: + branches: [master] + +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 + 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 251a51d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -sudo: required - -language: cpp - -compiler: g++ - -before_scirpt: - - 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 - - sudo make -j5 - - 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 - -script: - - ./bin/test_core --CI=ON - - ./bin/test_operations --CI=ON - - ./bin/test_io --CI=ON - - ./bin/test_autodiff --CI=ON