ci: Improve performance and semantics
This commit is contained in:
parent
e2c7ba5d58
commit
644ded2165
2 changed files with 41 additions and 30 deletions
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: "Build"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- "src/**"
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt install -y libasound2-dev libmp3lame-dev
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
id: rust
|
||||
|
||||
- name: Cache Rust
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
prefix-key: ${{steps.rust.outputs.cachekey}}-rust
|
||||
|
||||
- name: Setup SSH
|
||||
uses: webfactory/ssh-agent@v0.5.3
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.FREE_LIBRESPOT_PRIVATE_KEY }}
|
||||
|
||||
- run: cargo build --release --all-features
|
||||
30
.github/workflows/rust.yml
vendored
30
.github/workflows/rust.yml
vendored
|
|
@ -1,30 +0,0 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
name: "Build project"
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
name: DownOnSpot
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: sudo apt install -y libasound2-dev libmp3lame-dev
|
||||
- uses: webfactory/ssh-agent@v0.5.3
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.FREE_LIBRESPOT_PRIVATE_KEY }}
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
override: true
|
||||
toolchain: nightly
|
||||
- run: cargo build --release --all-features
|
||||
Loading…
Add table
Reference in a new issue