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 for Lingua-Franca #25

Closed
cxbrooks opened this issue May 22, 2019 · 4 comments
Closed

Continuous Integration for Lingua-Franca #25

cxbrooks opened this issue May 22, 2019 · 4 comments

Comments

@cxbrooks
Copy link
Contributor

It would be good to set up continuous integration for lingua-franca. The idea here is to be sure that everything builds properly and that there is an update repository so that people could eventually use lingua-franca without checking out the repo itself.

One way to do this would be to use Maven to build any Eclipse artifacts and then use Travis to run Maven.

See https://www.eclipse.org/Xtext/documentation/350_continuous_integration.html#maven-tycho-hints

There is an example repo at https://github.com/xtext/maven-xtext-example

It might be possible to use the Maven archetype at https://github.com/fuinorg/emt-xtext-archetype

Maven archetype that creates an Xtext project with a multi module Maven layout and Tycho (manifest-first approach). The archetype was created using the Maven Xtext Example.

The idea here would be to use the archetype to build a fake project that has the layout of the current lingua-franca project and then copy the Maven and Tycho files in to the real repo.

I used Maven to build Triquetrum. There are random notes at https://wiki.eecs.berkeley.edu/ptexternal/Main/EclipseAndTycho See also https://wiki.eclipse.org/Triquetrum/Releng

I found that doing the initial setup had a fairly steep learning curve (looking at examples helped greatly) and eventually it all worked.

As the lingua-franca repo is private, to use Travis would require using https://travis-ci.com instead of .org. Fortunately, it it possible for iCyPhy to use the travis-ci.com via the Travis educational effort. This access might already be set up.

@cxbrooks
Copy link
Contributor Author

cxbrooks commented Jun 7, 2019

I seem to be able to run tests and create a p2 site.

I created a cxb-maven-1 branch and checked in my work thus far.

To replicate what I have, install mvn with

sudo port install maven3

Make sure you are running Maven 3.x:

bash-3.2$ mvn --version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T11:41:47-07:00)
Maven home: /opt/local/share/java/maven3
Java version: 1.8.0_171, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachinees/jdk1.8.0_171.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.4", arch: "x86_64", family: "mac"

Check out the branch, compile and verify:

git clone https://github.com/icyphy/lingua-franca.git
cd lingua-franca/
git checkout cxb-maven-1
cd xtext
mvn compile
mvn verify

To run just one test:

mvn -Dtest=LinguaFrancaGeneratorTest test

For details about running a single test, see https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html

However, this seems not to work:

mvn -Dtest=LinguaFrancaGeneratorTest surefire:test

See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html for the maven goals

I have notes at lingua-franca/xtext/maven.md

@cxbrooks
Copy link
Contributor Author

cxbrooks commented Jun 7, 2019

My Travis-ci.com account seems not to have free access to travis-ci.com and private builds. I tried setting up the travis-ci to use the private lingua-franca repo, which created https://travis-ci.com/icyphy/lingua-franca

After creating the travis-ci build or running the build itself, I got an email about starting my 100 build private repo trial.

Also, it seems like travis-ci might not build non-default branches of private repos, so I would need to create a pull request for my changes from my cxb-maven-1 branch.

Below are some resources:

The next steps:

  • validate that the Maven infrastructure is working
  • do a pull request for the cxb-maven-1 branch so that .travis.yml is in the default (master) branch
  • consider making this repo public so that we are not stuck with the 100 build limit

@cxbrooks
Copy link
Contributor Author

cxbrooks commented Jun 7, 2019

Also:

@edwardalee
Copy link
Collaborator

edwardalee commented Jun 7, 2019 via email

@lhstrh lhstrh closed this as completed Apr 1, 2020
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

No branches or pull requests

3 participants