Skip to content

Commit

Permalink
GitHub CI: Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jul 29, 2023
1 parent 6272644 commit 6c08ab8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ env:
RUST_BACKTRACE: short

jobs:
build-and-test:
run:
runs-on: ubuntu-latest

steps:
- name: Install ALSA and Jack dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y \
libasound2-dev \
libjack-jackd2-dev \
run: >-
sudo apt-get update &&
sudo apt-get install -y
libasound2-dev
libjack-jackd2-dev
libudev-dev
- name: Install Rust toolchain
Expand All @@ -44,9 +44,16 @@ jobs:

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# The cache should not be shared between different workflows and jobs.
shared-key: ${{ github.workflow }}-${{ github.job }}

- name: Build tests
run: cargo test --locked --all-targets --all-features --no-run
run: >-
cargo test --locked --all-targets --all-features
--no-run
- name: Run tests
run: cargo test --locked --all-targets --all-features -- --nocapture --quiet
run: >-
cargo test --locked --all-targets --all-features
-- --nocapture --quiet
15 changes: 9 additions & 6 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ env:
CARGO_TERM_COLOR: always

jobs:
pre-commit:
run:
runs-on: ubuntu-latest

steps:
- name: Install ALSA and Jack dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y \
libasound2-dev \
libjack-jackd2-dev \
run: >-
sudo apt-get update &&
sudo apt-get install -y
libasound2-dev
libjack-jackd2-dev
libudev-dev
- name: Setup Python
Expand All @@ -49,6 +49,9 @@ jobs:

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# The cache should not be shared between different workflows and jobs.
shared-key: ${{ github.workflow }}-${{ github.job }}

- name: Detect code style issues (push)
uses: pre-commit/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/security-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
workflow_dispatch:

jobs:
security-audit:
run:
runs-on: ubuntu-latest

steps:
Expand All @@ -31,6 +31,9 @@ jobs:

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# The cache should not be shared between different workflows and jobs.
shared-key: ${{ github.workflow }}-${{ github.job }}

- name: Run security audit
run: cargo audit --deny unsound --deny yanked

0 comments on commit 6c08ab8

Please sign in to comment.