Giter Site home page Giter Site logo

test1's Introduction

myProject

Use the makefile to compile the c++ file and run the test with googleTest.

Follow the steps to complete settings. You need to setup the compile environment on your PC to run the project with test, and add webhook for your repository that can trigger CI server to do the building and running automated test.

This project is only used to create the environment, you should clean it when HW1.

Updata

  • Fri Sep 15 2017 21:26:13

    HW1 already upload, deadline is on 9/21 23:59. Any question about homework or some suggestions, just email to us.

  • Fri Sep 15 2017 13:45:26

    And for CI job building, we recommend you do not put the build files (*.o, executable file) into github. You can use .gitignore to avoid it.

  • Fri Sep 15 2017 11:22:16

    When your try to download googleTest on googleTest github page, you should download the release. Do not use respository url.

1. How to set up everything on your PC

Prerequisites

Install GoogleTest in different platforms

  • Windows 10 / Ubuntu

  • Mac

    Notice that Mac's googleTest installation guide, the command should be amended.

    Original:
    sudo cp -r gtest-1.7.0/include /usr/local/Cellar/gtest/
    
    Modified:
    sudo cp -r gtest-1.7.0/include/ /usr/local/Cellar/
  • Windows 7

Running the tests

cd <your/project/path>
make
./exp

After run the exp file, you should get the result like that: Imgur

2. How to set up everything for CI server

You already have an account on the CI server. Username and password is your student id, so your need to reset password first. Imgur

Create a new repository

https://github.com/new

Name your repository whatever you want, and place this project's file to your own repository(exclude .git folder).

Add WebHook to repository

On repository page -> Settings -> Webhooks -> Add webhook -> set Payload URL :

http://140.124.181.114:8080/buildByToken/build?job=<studentId>&token=<studentId>

Good example:
http://140.124.181.114:8080/buildByToken/build?job=1055980XX&token=1055980XX

Bad example:
http://140.124.181.114:8080/buildByToken/build?job=<1055980XX>&token=<1055980XX>

And it should show the green tick.

Imgur

Email your repository url to TA

Email to [email protected]. Just need subject, no content required.

Subject: <studentId>, <repositoryURL>

Imgur

After email

Wait TA for setting, your CI job will be triggered to run test after every push.

Done

If you want to test your CI job is setup or not: init your repository and place this project's file, commit and push a simple change, and go to CI server to check the job result.

And if you have some problems that you really don't know why and how to solve it, email us: [email protected] or come to 1321 in office hours (Fri. 2pm to 4pm).

Update History

  • Thu Sep 14 2017 14:56:35

    Modify makefile.

    Notice that Mac's googleTest installation guide, the command should be amended.

    Original:
    sudo cp -r gtest-1.7.0/include /usr/local/Cellar/gtest/
    
    Modified:
    sudo cp -r gtest-1.7.0/include/ /usr/local/Cellar/
  • Wed Sep 13 2017 14:12:35

    About <studentId>, you should replace whole brackets not just "studentId". That is ok on email subject , but you should be careful the webhook.

    Good:
    http://140.124.181.114:8080/buildByToken/build?job=1055980XX&token=1055980XX
    
    Bad:
    http://140.124.181.114:8080/buildByToken/build?job=<1055980XX>&token=<1055980XX>
    

    And about your own repository, if you want to test your CI job is setup or not: init your repository and place this project's file, commit and push a simple change, and go to CI server to check the job result.

test1's People

Contributors

james-jhang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.