-
Notifications
You must be signed in to change notification settings - Fork 339
Add github actions workflows #253
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
on: [push] | ||
|
||
jobs: | ||
build_and_test: | ||
name: Build adn test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --all --benches --bins --examples --tests | ||
|
||
- name: check unstable | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --features unstable --all --benches --bins --examples --tests | ||
|
||
- name: tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all --doc --features unstable | ||
|
||
check_fmt_and_docs: | ||
name: Checking fmt and docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: setup | ||
run: | | ||
rustup default nightly | ||
rustup component add rustfmt | ||
cargo install mdbook | ||
rustc --version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you see the install-mdbook script? That way saves quite a bit of time compared to the However, the script is fragile because it ultimately relies on a specific release filename pattern and it would be nice if we could have a more general solution. (This is currently an issue for another CI related PR here). I think a better way might be to create a docker image based on the official image (or slim or docs.rs) with all of the tools we need (deadlinks, mdbook, tarpaulin?) pre-installed. Then we could use the container.image setting to set the environment so that stuff is available without having to rebuild it. Another github action could handle docker image related tasks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree this would be really nice, and it would probably worth doing this in a follow-up! Perhaps it's worth opening an issue for this on https://github.com/actions-rs/meta/issues also; I agree that having a general solution for this would probably be very valuable to a lot of people. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, long. I will fix it tonight, so take a moment |
||
- name: mdbook | ||
run: | | ||
mdbook build docs | ||
- name: fmt | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Docs | ||
run: cargo doc --features docs,unstable |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
on: push | ||
name: Clippy check | ||
jobs: | ||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- id: component | ||
uses: actions-rs/components-nightly@v1 | ||
with: | ||
component: clippy | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
Uh oh!
There was an error while loading. Please reload this page.