forked from CS2103JAN2018-F09-B1/main
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[se-edu#192] Set Up AppVeyor CI (se-edu#218)
AppVeyor[1] is a continuous integration service used to build and test projects on a Windows VM. Adding AppVeyor support to this project will allow us to easily ensure that our tests do not break on Windows. Add an appveyor.yml file that will teach AppVeyor how to build this project and run its tests. Update our documentation to explain to developers how to set up AppVeyor on their own repositories. For now, we will run our tests with 64-bit Java only, since the project does not use any native libraries and thus is unlikely to have any architecture-specific bugs. In the future, should we use any native libraries, the appveyor.yml file should be updated to run our tests on both 32-bit and 64-bit Java. [1] https://www.appveyor.com/
- Loading branch information
Showing
12 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# AppVeyor configuration file | ||
# For more details see https://www.appveyor.com/docs/build-configuration/ | ||
|
||
# Call on gradle to build and run tests | ||
# --no-daemon: Prevent the daemon from launching to prevent file-in-use errors | ||
# when we cache the ~/.gradle directory | ||
build_script: | ||
- gradlew.bat --no-daemon assemble checkstyleMain checkstyleTest | ||
|
||
test_script: | ||
- appveyor-retry gradlew.bat --no-daemon headless allTests | ||
|
||
environment: | ||
JAVA_HOME: C:\Program Files\Java\jdk1.8.0 # Use 64-bit Java | ||
|
||
# Files/folders to preserve between builds to speed them up | ||
cache: | ||
- C:\Users\appveyor\.gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# AppVeyor | ||
|
||
[AppVeyor](https://www.appveyor.com/) is a _Continuous Integration_ platform for GitHub projects. | ||
It runs its builds on Windows virtual machines. | ||
|
||
AppVeyor can run the project's tests automatically whenever new code is pushed to the repo. | ||
This ensures that existing functionality and features have not been broken on Windows by the changes. | ||
|
||
The current AppVeyor setup performs the following things whenever someone pushes code to the repo: | ||
|
||
* Runs the `gradlew.bat headless allTests` command. | ||
|
||
* Automatically retries the build up to 3 times if a task fails. | ||
|
||
If you would like to customize your AppVeyor build further, you can learn more about AppVeyor from the | ||
[AppVeyor Documentation](https://www.appveyor.com/docs/). | ||
|
||
## Setting up AppVeyor | ||
|
||
1. Fork the repo to your own organization. | ||
|
||
2. Go to https://ci.appveyor.com/, and under `Login`, click on `GitHub` to login with your GitHub account. | ||
Enter your GitHub account details if needed. | ||
|
||
 | ||
|
||
3. After logging in, you will be brought to your projects dashboard. Click on `NEW PROJECT`. | ||
|
||
 | ||
|
||
4. You will be brought to the `Select repository` page. Select `GitHub`. | ||
|
||
* On your first usage of AppVeyor, you will need to give AppVeyor authorization to your GitHub account. | ||
Click on `Authorize GitHub`. | ||
|
||
 | ||
|
||
* This will bring you to a GitHub page that manages the access of third-party applications to your repositories. | ||
|
||
Depending on whether you are the owner of the repository, you can either grant access: | ||
|
||
 | ||
|
||
Or request access: | ||
|
||
 | ||
|
||
5. AppVeyor will then list the repositories you have access to in your GitHub account. | ||
Find the repository you want to set AppVeyor up on, and then click `ADD`. | ||
|
||
 | ||
|
||
6. AppVeyor will then be activated on that repository. | ||
To see the CI in action, push a commit to any branch! | ||
|
||
* Go to the repository and see the pushed commit. There should be an icon which will link you to the AppVeyor build: | ||
|
||
 | ||
|
||
* As the build is run on a remote machine, we can only examine the logs it produces: | ||
|
||
 | ||
|
||
7. Update the link to the "build status" badge at the top of `README.md` to point to the AppVeyor build status of your own repo. | ||
|
||
* To find your build status badge URL, | ||
first go to your project settings by clicking on the "Settings" icon: | ||
|
||
 | ||
|
||
* Then go to the `Badges` section of your project settings by clicking on it: | ||
|
||
 | ||
|
||
* Then copy and paste the markdown code for your `master` branch to your `README.md` file: | ||
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.