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

Add continuous integration #428

Merged
merged 5 commits into from
Nov 8, 2021
Merged

Add continuous integration #428

merged 5 commits into from
Nov 8, 2021

Conversation

odow
Copy link
Member

@odow odow commented Nov 4, 2021

No idea if this will work, but let's see.

cc @simonbowly

@odow
Copy link
Member Author

odow commented Nov 4, 2021

Success
image

@odow
Copy link
Member Author

odow commented Nov 4, 2021

Artifacts are pretty cool: https://pkgdocs.julialang.org/v1/artifacts/. They make including downloads like this trivial!

@simonbowly
Copy link
Collaborator

Nice one! I made some progress testing the license - evidently I didn't quite configure it right, but copying in the license file from a repo secret mostly does the trick.

image

@odow
Copy link
Member Author

odow commented Nov 4, 2021

@simonbowly I've invited you as an admin user. That should mean you have permission to upload secrets. Let me know if that isn't the case.

@simonbowly
Copy link
Collaborator

Cheers - I'm just testing using my own license at the moment so will wait for yours to be issued (almost sorted I think).

@simonbowly
Copy link
Collaborator

Got the license configuration worked out - tests running ok on my master branch. Now just need to sort out your license (getting there sorry!) I had to change the artifacts usage slightly to get this running, not really sure why...

image

@odow
Copy link
Member Author

odow commented Nov 4, 2021

I had to change the artifacts usage

You probably have an existing deps.jl file in your local clone of the repository?

You should have permission to push new commits to this branch, or edit the files via the web editor. (Or just make a new PR)

@simonbowly
Copy link
Collaborator

Done - I pushed just the CI change to this PR and now see the Artifacts error at build time. "Artifacts not defined"?

@odow
Copy link
Member Author

odow commented Nov 4, 2021

Oops. I was being too clever when I squashed all my test commits. Working now.

Did you upload the secret? I can't see it

image

@simonbowly
Copy link
Collaborator

Nice one. I didn't yet - I was using my own license key to test on my fork. Would rather wait for the one issued specifically for JuMP if that's ok. But this should otherwise work once that is sorted.

@odow
Copy link
Member Author

odow commented Nov 8, 2021

@simonbowly looks like I'll need your input on this:

image

Did you test a WSL on your fork? Or some other type of license?

@odow odow changed the title WIP: prep for continuous integration Add continuous integration Nov 8, 2021
@odow
Copy link
Member Author

odow commented Nov 8, 2021

@simonbowly and I discussed the license issue offline. It's now working.

However: @simonbowly when are the licenses validated? I'm seeing a lot of:
image
I assumed it would be whenever a new Env is created, but it seems that it might be on every call to optimize? Or periodically?

@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@419c872). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #428   +/-   ##
=========================================
  Coverage          ?   61.75%           
=========================================
  Files             ?        8           
  Lines             ?     3300           
  Branches          ?        0           
=========================================
  Hits              ?     2038           
  Misses            ?     1262           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 419c872...d99b88a. Read the comment docs.

@odow
Copy link
Member Author

odow commented Nov 8, 2021

It only took 8.5 years, but we now have CI! That coverage is a little shoddy though.

@odow odow merged commit fe133b6 into master Nov 8, 2021
@odow odow deleted the od/ci branch November 8, 2021 22:55
@simonbowly
Copy link
Collaborator

Great! Thanks for all your work on this Oscar.

Re: the license checks, for WLS the license token needs to be refreshed periodically from the server. The checks might occur periodically as well as on various API calls including .update() and .optimize() so I guess in tests it occurs pretty often. It is probably not communicating with the server for every one of those messages though.

@szcf-weiya
Copy link

Thanks for the great package! I am using Gurobi.jl in my project, and also want to conduct a continuous integration in github actions. At first, it throws No license error,
image

then I tried to use a WSL license like what you did here, but now it throws
image

it seems that you also encountered the same issue (#428 (comment)); how did you finally manage it? Anything I have missed?

@odow
Copy link
Member Author

odow commented Sep 23, 2022

how did you finally manage it?

We use an undocumented/still-in-development feature, so for now there is probably no way for you to use Gurobi.jl in GitHub actions. If you have a commercial license, you should contact your support rep and they may be able to help you.

@szcf-weiya
Copy link

Got it, thanks for your explanation. Also just noticed README.md wrote

However, we thank Gurobi for providing us with a license to test Gurobi.jl on GitHub.

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

Successfully merging this pull request may close these issues.

3 participants