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 CircleCI 2.0 with nightly builds #223

Merged
merged 5 commits into from Sep 6, 2018

Conversation

bcardiff
Copy link
Member

Fixes #177.
Adds CircleCI as an alternative CI using docker images.

  • It will use crystal:latest image on every push, and
  • It will build master using crystal:nightly image every midnight
  • There is not much dependencies in shards, but I've already shamelessly copy setup the appropriate commands for caching the global shards cache between builds.

@ysbaddaden
Copy link
Contributor

I'd be fine to move completely from Travis to Circle, but does the configuration has to be so complex?

nightly:
triggers:
- schedule:
cron: "0 0 * * *"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure circle would appreciate it if you randomized these values instead of everyone submitting jobs at exactly midnight.

@bcardiff
Copy link
Member Author

@ysbaddaden the shards cache can be removed, a small bash script could be added to remove the git config, but at the end of the day circleci are more verbose than travis by it's nature.

Currently the shipped shards bin is used to grab development dependencies. Maybe generated binary from this repo should be used in the CI. Since shards itself has no dependencies that is possible.

Let me know if you prefer some of these changes to reduce the boilerplate.

@Sija
Copy link
Contributor

Sija commented Sep 1, 2018

Since shards itself has no dependencies that is possible.

@bcardiff They do, at least development_dependencies:

shards/shard.yml

Lines 7 to 9 in 0c9ac57

development_dependencies:
minitest:
github: ysbaddaden/minitest.cr

@ysbaddaden
Copy link
Contributor

Sigh, Circle used to have a simpler configuration some years ago :(

@ysbaddaden
Copy link
Contributor

@Sija yes and no. Shards doesn't have dependencies to build itself, but it needs one external library to build the test suite after that.

@ysbaddaden
Copy link
Contributor

I dont think we need the cache. It's a single repository clone, and that's never been an issue in Travis.

@bcardiff
Copy link
Member Author

bcardiff commented Sep 4, 2018

@ysbaddaden done

@ysbaddaden
Copy link
Contributor

I DRYed the test steps.

I consider building bin/shards is a test itself (it must compile). The just built binary should also be capable to install its own test dependency (minitest), but maybe we want to delay this to the integration tests? I'm not sure.

@bcardiff
Copy link
Member Author

bcardiff commented Sep 6, 2018

Given that there are no actual dependencies for the binary itself, using the shipped shards vs the built shards only impact in the case there is a breaking change in the format. I'm fine either way for now. But in order to change one thing at a time the state of this PR is enough IMO.

@ysbaddaden
Copy link
Contributor

You're right, let's use shards not bin/shards which is what Travis does.

@ysbaddaden ysbaddaden merged commit 4dfc2c1 into crystal-lang:master Sep 6, 2018
@ysbaddaden
Copy link
Contributor

Merged, all that's left is to enable the crystal-lang/shards project on CircleCI :)

@bcardiff
Copy link
Member Author

bcardiff commented Sep 6, 2018

And a small fixup in the DRY test steps commit steps: &steps -> steps: *steps. I didn't notice that issue.

@bcardiff bcardiff mentioned this pull request Sep 6, 2018
@bcardiff bcardiff deleted the ci/circle branch October 18, 2018 17:08
bcardiff added a commit to bcardiff/shards that referenced this pull request Mar 11, 2020
taylor pushed a commit to vulk/shards that referenced this pull request Aug 11, 2020
f-fr pushed a commit to f-fr/shards that referenced this pull request Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants