fizyk20 / generic-array

Generic array types in Rust
MIT License
404 stars 77 forks source link

Switch from the long forsaken Travis CI build to using GitHub Actions #139

Closed ilyvion closed 1 year ago

ilyvion commented 1 year ago

I was thinking that in the spirit of an upcoming 1.0 release, it'd be useful to have a proper CI setup back up and running. So that's what this PR provides!

You can see a sample run of this action in my forked repo. In addition to providing CI (both for master branch and for PRs), this action also publishes docs to the repo's GH pages branch (only on pushes to the master branch), ensuring that the documentation link in the README doesn't keep getting more and more outdated. Here's the latest copy of the docs as automatically generated and pushed to my fork by this very GH Actions setup.

Setting this whole thing up even let me discover a mistake in the impl_zeroize.rs file that had gone unnoticed without CI.

In order for the documentation to be published successfully, the GITHUB_TOKEN must be given write permissions to the repo, otherwise it can't push to the gh-pages branch. The CI.yml file should be simple enough to vet to ensure that I'm not up to anything mischievous, since you otherwise have no obvious reason to trust me. Instructions on how to enable this write permission. You'll want to change this setting before merging this PR if you want the documentation publish to succeed.

novacrazy commented 1 year ago

@fizyk20 will need to do this, as I don't have the ability to enable the write permission. Otherwise, looks good to me.

novacrazy commented 1 year ago

Running the tests with Miri (only) would be good as well.

ilyvion commented 1 year ago

I added a step for running the tests with Miri.

novacrazy commented 1 year ago

I think the only build/test step should be cargo miri test --all-features, which will build and test with miri in a single step. Save as much time as we can, since miri acts as a separate build target anyway and requires recompilation.

ilyvion commented 1 year ago

Alright. In my own projects I would want to run my code on both real hardware and in the Miri interpreter, out of an abundance of caution, but 10-4. 😄

fizyk20 commented 1 year ago

As far as I can tell, the relevant setting is already set correctly, so I'm merging this PR. Thank you!