Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Reformat the github workflows config, add crates.io deploy stage (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
crsaracco authored Nov 17, 2020
1 parent 19a17cc commit 3edec93
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 9 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy

on:
release:
types: [created]

jobs:
build:
steps:
- uses: actions/checkout@v2

# Installs the latest stable rust, and all components needed for the rest of the CI pipeline.
- name: Set up CI environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

# Sanity check: make sure the release builds
- name: Build
run: cargo build --verbose

# Sanity check: make sure all tests in the release pass
- name: Test
run: cargo test --verbose

# Deploy to crates.io
# Only works on github releases (tagged commits)
- name: Deploy to crates.io
env:
CRATESIO_ENCRYPTED_TOKEN: ${{ secrets.CRATESIO_ENCRYPTED_TOKEN }}
run: cargo publish --token $CRATESIO_ENCRYPTED_TOKEN --manifest-path Cargo.toml
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docs

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Installs the latest stable rust, and all components needed for the rest of the CI pipeline.
- name: Set up CI environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

# Sanity check: make sure the release builds
- name: Build
run: cargo build --verbose

# Sanity check: make sure all tests in the release pass
- name: Test
run: cargo test --verbose

# Generate docs and push to documentation branch
- name: Generate docs
env:
GH_ENCRYPTED_TOKEN: ${{ secrets.GH_ENCRYPTED_TOKEN }}
run: |
cargo doc --all --no-deps
echo '<meta http-equiv=refresh content=0;url=vst/index.html>' > target/doc/index.html
sudo pip install ghp-import
ghp-import -n target/doc
git push -fq https://${GH_ENCRYPTED_TOKEN}@github.com/${GITHUB_REPOSITORY}.git gh-pages
19 changes: 15 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,28 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Install latest stable rust

# Installs the latest stable rust, and all components needed for the rest of the CI pipeline.
- name: Set up CI environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

# Makes sure the code builds successfully.
- name: Build
run: cargo build --verbose
- name: Run tests

# Makes sure all of the tests pass.
- name: Test
run: cargo test --verbose
# - name: Clippy
# run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp -A clippy::comparison-chain -A clippy::needless-doctest-main -A clippy::missing-safety-doc

# Runs Clippy on the codebase, and makes sure there are no lint warnings.
# Disabled for now. Re-enable if you find it useful enough to deal with it constantly breaking.
# - name: Clippy
# run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp -A clippy::comparison-chain -A clippy::needless-doctest-main -A clippy::missing-safety-doc

# Makes sure the codebase is up to `cargo fmt` standards
- name: Format check
run: cargo fmt --all -- --check
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ description = "VST 2.4 API implementation in rust. Create plugins or hosts."

readme = "README.md"
repository = "https://github.com/rustaudio/vst-rs"
documentation = "https://rustaudio.github.io/vst-rs/vst/"

license = "MIT"
keywords = ["vst", "vst2", "plugin"]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# vst-rs
[![Travis Build][trav-img]][trav-url]
[![crates.io][crates-img]][crates-url]
[![dependency status](https://deps.rs/repo/github/rustaudio/vst-rs/status.svg)](https://deps.rs/repo/github/rustaudio/vst-rs)
[![Discord Chat][discord-img]][discord-url]
Expand All @@ -16,7 +15,10 @@ your plugin code to be compatible with the new, thread-safe plugin API. See the
to port your plugin.

## Library Documentation
- https://rustaudio.github.io/vst-rs/vst/

Documentation for **released** versions can be found [here](https://docs.rs/vst/).

Development documentation (current `master` branch) can be found [here](https://rustaudio.github.io/vst-rs/vst/).

## Crate
This crate is available on [crates.io](https://crates.io/crates/vst). If you prefer the bleeding-edge, you can also
Expand Down Expand Up @@ -81,8 +83,6 @@ name = "basicvst"
crate-type = ["cdylib"]
```

[trav-img]: https://travis-ci.org/rustaudio/vst-rs.svg?branch=master
[trav-url]: https://travis-ci.org/rustaudio/vst-rs
[crates-img]: https://img.shields.io/crates/v/vst.svg
[crates-url]: https://crates.io/crates/vst
[discord-img]: https://img.shields.io/discord/590254806208217089.svg?label=Discord&logo=discord&color=blue
Expand Down

0 comments on commit 3edec93

Please sign in to comment.