mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-22 15:21:01 +00:00
commit
4ba3fcf352
1 changed files with 64 additions and 33 deletions
97
.github/workflows/rust.yml
vendored
97
.github/workflows/rust.yml
vendored
|
@ -1,36 +1,67 @@
|
||||||
name: rust
|
|
||||||
|
|
||||||
# Trigger the workflow on push or pull request
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
name: Continuous integration
|
||||||
rustfmt:
|
|
||||||
name: rustfmt
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: nightly
|
|
||||||
override: true
|
|
||||||
components: rustfmt
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
||||||
clippy:
|
jobs:
|
||||||
name: clippy
|
check:
|
||||||
runs-on: ubuntu-latest
|
name: check
|
||||||
steps:
|
runs-on: ubuntu-latest
|
||||||
- uses: actions/checkout@v2
|
steps:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
- uses: actions-rs/toolchain@v1
|
||||||
profile: minimal
|
with:
|
||||||
toolchain: nightly
|
profile: minimal
|
||||||
override: true
|
toolchain: stable
|
||||||
components: clippy
|
override: true
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
with:
|
- uses: actions-rs/cargo@v1
|
||||||
command: clippy
|
with:
|
||||||
|
command: check
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
name: rustfmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- run: rustup component add rustfmt
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
|
||||||
|
miri:
|
||||||
|
name: miri
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install Miri
|
||||||
|
run: |
|
||||||
|
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
|
||||||
|
echo "Installing latest nightly with Miri: $MIRI_NIGHTLY"
|
||||||
|
rustup set profile minimal
|
||||||
|
rustup default "$MIRI_NIGHTLY"
|
||||||
|
rustup component add miri
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
- name: Run Tests
|
||||||
|
run: cargo miri test
|
||||||
|
|
Loading…
Reference in a new issue