DIT112-V19 / group-02

Documentation on a smart car project for mine detection.
MIT License
8 stars 4 forks source link

Add CI #62

Closed MarcusAronsson1 closed 5 years ago

MarcusAronsson1 commented 5 years ago

User Story

As a SafeSweeper operator I want the software to be properly tested so that I can be sure that the product operates as it's supposed to.

Acceptance criteria

To Reproduce

Steps to reproduce the behavior:

MarcusAronsson1 commented 5 years ago

@platisd How do I add libraries so they are used by Travis. We use RFID.h and TinyGPS.h in our .ino and I don't know how to edit the .travis.yml file to find those files.

I'm trying to find out about this online but it's pretty hard overall to find help about Travis it seems.

platisd commented 5 years ago

Are they installable via the Arduino IDE library manager? If yes then write their titles, separated by commas I believe, after:

    - arduino --install-library "Smartcar shield"

If they are not, I think that if you git clone them into the root of your repository, during the install phase, they will be picked up and used for the sketch compilation. Let me know how it goes and I can have a look later if you don't get it working.

MarcusAronsson1 commented 5 years ago

Yea forgot that part, they are not installable through the library manager. I will continue looking but I feel somewhat stuck at the moment.

Thanks!

platisd commented 5 years ago

Assuming that I guessed which libraries you are using correctly, try to add the following lines in the install step of your .travis.yml:

- git clone git@github.com:mikalhart/TinyGPS.git
- git clone git@github.com:song940/RFID-RC522.git
MarcusAronsson1 commented 5 years ago

Error: The command "git clone git@github.com:mikalhart/TinyGPS.git" failed and exited with 128 during . Permission denied.

platisd commented 5 years ago

Use the https versions instead:

- git clone https://github.com/mikalhart/TinyGPS.git
- git clone https://github.com/song940/RFID-RC522.git
MarcusAronsson1 commented 5 years ago

It looks like it clones the repos now but it still gives error. SafeSweeper:3:18: error: RFID.h: No such file or directory

platisd commented 5 years ago

Can you provide a link to the failed job?

MarcusAronsson1 commented 5 years ago

https://travis-ci.org/DIT112-V19/group-02/jobs/528813828

platisd commented 5 years ago

Try this then:

- git clone https://github.com/mikalhart/TinyGPS.git $HOME/arduino_ide/libraries/TinyGPS
- git clone https://github.com/song940/RFID-RC522.git $HOME/arduino_ide/libraries/RFID-RC522
MarcusAronsson1 commented 5 years ago

IT'S WORKING!

MarcusAronsson1 commented 5 years ago

Thanks a lot for all the help! @platisd