diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 882f41f..993f3a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: with: components: clippy - # clippy 需要真正编译代码,因此要装 ffmpeg / slint 的系统依赖 + # clippy 需要真正编译代码,因此要装 ffmpeg / slint / rodio 所需系统依赖 - name: Install system dependencies run: | sudo apt-get update @@ -51,11 +51,14 @@ jobs: pkg-config \ libavcodec-dev libavformat-dev libavutil-dev \ libavfilter-dev libavdevice-dev libswscale-dev libswresample-dev \ - libfontconfig1-dev + libfontconfig1-dev \ + libasound2-dev # 缓存依赖编译结果,加速后续 CI - name: Cache cargo uses: Swatinem/rust-cache@v2 + # 不用 --all-targets:项目没有测试,且它会额外以 test 模式编译 bin, + # 导致仅被 main 使用的代码被误判为 dead_code。默认只编译 lib + bin 即可。 - name: Run clippy - run: cargo clippy --all-targets -- -D warnings + run: cargo clippy -- -D warnings