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

Continuous integration #6

Closed
1 of 2 tasks
zoq opened this issue Feb 7, 2018 · 25 comments · Fixed by #52
Closed
1 of 2 tasks

Continuous integration #6

zoq opened this issue Feb 7, 2018 · 25 comments · Fixed by #52

Comments

@zoq
Copy link
Member

zoq commented Feb 7, 2018

To make sure the code builds it would be great if we could set up some continuous integration services:

  • Set up Travis
  • Set up Appveyor

Realistically we can adapt (remove the test execution/build step) https://github.com/mlpack/mlpack/blob/master/.appveyor.yml and https://github.com/mlpack/mlpack/blob/master/.travis.yml for this repository.

At the end if

mkdir build
cmake ..
make

works this should be fine for now.

@yashsharan
Copy link
Contributor

Hi,I would like to work on this issue.Thanks.

@zoq
Copy link
Member Author

zoq commented Feb 24, 2018

Nice, let me know if you need any help.

@yashsharan
Copy link
Contributor

@zoq I went through the travis.yml file in the mlpack repo. What I observed is that the file would be mostly same for this repo right?

@zoq
Copy link
Member Author

zoq commented Feb 25, 2018

Yes, we can remove the python part and the step for running the tests.

@yashsharan
Copy link
Contributor

So for the python part if i'm not wrong wrong the env: part of the code as well as the code which checks pip2 and pip3 are installed wont be needed right?
Also for the test part is this the code you are referring to?
install:

  • mkdir build && cd build && cmake -DDEBUG=OFF -DPROFILE=OFF .. && make -j

@zoq
Copy link
Member Author

zoq commented Feb 25, 2018

You are right about the python part, the test part is:

script:
  - CTEST_OUTPUT_ON_FAILURE=1 travis_wait 30 ctest -j2

@yashsharan
Copy link
Contributor

As suggested by you I removed those part of code from the file.But when i'm running the travis CI,my build is failing.
Here's the error which it is showing:

The command "mkdir build && cd build && cmake $CMAKE_OPTIONS .. && make -j2" failed and exited with 1 during .

@zoq
Copy link
Member Author

zoq commented Feb 25, 2018

How does the travis file look like? Can you open a PR?

@yashsharan
Copy link
Contributor

I have created a PR.I will squash the commits at the end once my code runs correctly.

@yashsharan
Copy link
Contributor

My travis.yml build is successful now.Should I squash all the commits and send a PR?

@yashsharan
Copy link
Contributor

@zoq I'm thinking of integrating appveyor CI.If i'm not wrong the test script wont be needed right?

@yashsharan
Copy link
Contributor

yashsharan commented Mar 18, 2018

I had one doubt. I cant seem to figure out in which line is the make command getting executed in appveyor.yml file

@zoq
Copy link
Member Author

zoq commented Mar 18, 2018

You are right the test step isn't needed.

@yashsharan
Copy link
Contributor

so what does line 38 and 39 do?( - 7z a mlpack-windows-no-libs.zip "%APPVEYOR_BUILD_FOLDER%\build\Release*.exe")

@zoq
Copy link
Member Author

zoq commented Mar 18, 2018

Line 38 and 39 creates an archive that contains the library and or executables.

@yashsharan
Copy link
Contributor

So basically i will be building both mlpack and model repo. And that archive would be needed to be created for both the libraries right?

@zoq
Copy link
Member Author

zoq commented Mar 18, 2018

I think we don't have to create an archive for the models repo.

@yashsharan
Copy link
Contributor

ohh i see.Thank you

@yashsharan
Copy link
Contributor

I guess I need a little help.In the final step for cmake for the models repository,an error pops up saying that CmakeList.txt is not present even though it is.

cd`C:\projects\models && mkdir build && cd build
cmake -G "Visual Studio 14 2015 Win64" -DBLAS_LIBRARY:FILEPATH="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DLAPACK_LIBRARY:FILEPATH="%APPVEYOR_BUILD_FOLDER%/mlpack/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DARMADILLO_INCLUDE_DIR="%APPVEYOR_BUILD_FOLDER%/armadillo-7.800.2/include" -DARMADILLO_LIBRARY:FILEPATH="C:\projects\models\armadillo-7.800.2\build\Debug\armadillo.lib" -DBOOST_INCLUDEDIR:PATH="C:\projects\models\boost.1.60.0.0\lib\native\include"
CMake Error: The source directory "C:/projects/models/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Here's the error which is coming.

@zoq
Copy link
Member Author

zoq commented Mar 18, 2018

CMake Error: The source directory "C:/projects/models/build" does not appear to contain CMakeLists.txt.

Are you sure you are using the correct path, C:/projects/models is the one that has the CMake file.

@yashsharan
Copy link
Contributor

yashsharan commented Mar 18, 2018

Yeah I guessed that too but where I'm getting confused is that for building mlpack repo, similar code has been written and there no error is there so why is it showing an error when i'm using almost same code to build the model repo?
Here's the appveyor file which i have written: https://github.com/yashsharan/models/blob/master/.appveyor.yml

@zoq
Copy link
Member Author

zoq commented Mar 18, 2018

Not sure what the issue is, you could open a PR, or I guess another idea is to check the output with some dir, cat commands.

@yashsharan
Copy link
Contributor

I will open a PR first then. Also will writing cmake .. -G instead of cmake -G work ,like we compile it in linux?

@zoq
Copy link
Member Author

zoq commented Mar 18, 2018

yes, this should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants