-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TurtIeSocks/rework
Rework
- Loading branch information
Showing
31 changed files
with
2,292 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
name: Continuous Integration | ||
|
||
jobs: | ||
check: | ||
name: Run cargo check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install Linux dependencies | ||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
|
||
- name: Run cargo check | ||
run: cargo check --all-targets | ||
|
||
- name: Run cargo check with all feature | ||
run: cargo check --all-targets --all-features | ||
|
||
- name: Run cargo check headless | ||
run: cargo check --all-targets --no-default-features | ||
|
||
docs: | ||
name: Run cargo doc | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install Linux dependencies | ||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
|
||
- name: Run cargo doc | ||
run: cargo doc --features="inspect" --no-deps | ||
|
||
build_examples: | ||
name: Build examples | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install Linux dependencies | ||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
|
||
- name: Build examples without inspect feature | ||
run: cargo build --examples --features="ogg" | ||
|
||
- name: Clean | ||
run: cargo clean | ||
|
||
- name: Build examples with all features | ||
run: cargo build --examples --all-features | ||
|
||
# test: | ||
# name: Tests | ||
# strategy: | ||
# # Tests are most likely to have OS-specific behavior | ||
# matrix: | ||
# os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
# runs-on: ${{ matrix.os }} | ||
# steps: | ||
# - name: Checkout sources | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Install stable toolchain | ||
# uses: dtolnay/rust-toolchain@stable | ||
|
||
# - name: Install Linux dependencies | ||
# if: ${{ matrix.os == 'ubuntu-latest' }} | ||
# run: sudo apt-get install --no-install-recommends libwayland-dev libxkbcommon-dev | ||
|
||
# - name: Run cargo test | ||
# run: cargo test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish to crates.io | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Cache Cargo registry | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo-registry- | ||
- name: Cache Cargo index | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo-index- | ||
- name: Install toml-cli | ||
run: cargo install toml-cli | ||
- name: Check version | ||
run: test "v$(toml get -r Cargo.toml package.version)" = "${{ github.ref_name }}" | ||
|
||
- name: Build and verify the crate | ||
run: cargo publish --dry-run | ||
|
||
- name: Publish to crates.io | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
run: cargo publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.formatOnSave": true | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.