-
Notifications
You must be signed in to change notification settings - Fork 281
Extended CI suite #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Extended CI suite #385
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,7 +12,33 @@ env: | |||||||||||||||||
| RUST_FEATURES: "rodio-backend,lyric-finder,media-control,image,notify,clipboard" | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| rust-ci: | ||||||||||||||||||
| msrv: | ||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm seeing if the solutions in this discussion to reuse matrices can be applied in a simple way here. Notable possible problem is that they don't use the same matrices as it is right now.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought you only need to move to be in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I originally wanted to to have them as separate jobs in order to report these separately - at the end of the day, if it doesn't build in the current compiler that's a hard error, but breaking MSRV is salvageable, if anything by bumping the MSRV. But we can do that, we would just have to check the log if it does break
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, one needs to check the action's logs if CI run fails anyway. |
||||||||||||||||||
| if: github.event.pull_request.draft != true | ||||||||||||||||||
| strategy: | ||||||||||||||||||
| fail-fast: false | ||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that being a |
||||||||||||||||||
| matrix: | ||||||||||||||||||
| os: [macOS-latest, windows-latest, ubuntu-latest] | ||||||||||||||||||
| include: | ||||||||||||||||||
| - os: ubuntu-latest | ||||||||||||||||||
| OS_SPECIFIC_FEATURES: ",daemon, sixel" | ||||||||||||||||||
| - os: macOS-latest | ||||||||||||||||||
| OS_SPECIFIC_FEATURES: ",sixel" | ||||||||||||||||||
|
Comment on lines
+23
to
+26
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - run: sudo apt-get update && sudo apt-get install libssl-dev libasound2-dev libdbus-1-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||||||||||||||||||
| if: ${{ runner.os == 'Linux'}} | ||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||
|
|
||||||||||||||||||
| - uses: taiki-e/install-action@v2 | ||||||||||||||||||
| with: | ||||||||||||||||||
| tool: cargo-hack | ||||||||||||||||||
|
|
||||||||||||||||||
| - uses: Swatinem/rust-cache@v2 | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: cargo hack check --rust-version --package spotify_player --all-targets --profile ci --features "${{ env.RUST_FEATURES }} ${{ matrix.OS_SPECIFIC_FEATURES }}" | ||||||||||||||||||
|
|
||||||||||||||||||
| rust-ci: | ||||||||||||||||||
| if: github.event.pull_request.draft != true | ||||||||||||||||||
|
|
||||||||||||||||||
| strategy: | ||||||||||||||||||
|
|
@@ -22,6 +48,11 @@ jobs: | |||||||||||||||||
| include: | ||||||||||||||||||
| - os: ubuntu-latest | ||||||||||||||||||
| toolchain: beta | ||||||||||||||||||
| OS_SPECIFIC_FEATURES: ",daemon, sixel" | ||||||||||||||||||
| - os: ubuntu-latest | ||||||||||||||||||
| OS_SPECIFIC_FEATURES: ",daemon, sixel" | ||||||||||||||||||
| - os: macOS-latest | ||||||||||||||||||
| OS_SPECIFIC_FEATURES: ",sixel" | ||||||||||||||||||
LucasFA marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||
|
|
||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
@@ -40,25 +71,17 @@ jobs: | |||||||||||||||||
| toolchain: ${{ matrix.toolchain }} | ||||||||||||||||||
| components: clippy, rustfmt | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Cache cargo deps | ||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||
| with: | ||||||||||||||||||
| path: | | ||||||||||||||||||
| ~/.cargo/registry/index/ | ||||||||||||||||||
| ~/.cargo/registry/cache/ | ||||||||||||||||||
| ~/.cargo/git/db/ | ||||||||||||||||||
| key: ${{ runner.os }}-rustc-${{ steps.install_toolchain.outputs.cachekey }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||
| restore-keys: ${{ runner.os }}-rustc-${{ steps.install_toolchain.outputs.cachekey }} | ||||||||||||||||||
| - uses: Swatinem/rust-cache@v2 | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Cargo format | ||||||||||||||||||
| run: cargo fmt --all -- --check | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Cargo test | ||||||||||||||||||
| run: cargo test --no-default-features --features ${{ env.RUST_FEATURES }} | ||||||||||||||||||
| - name: Cargo clippy without features | ||||||||||||||||||
| run: cargo clippy --no-default-features --profile ci -- -D warnings | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Cargo clippy with all features | ||||||||||||||||||
| run: cargo clippy --no-default-features --features ${{ env.RUST_FEATURES }} -- -D warnings | ||||||||||||||||||
| run: cargo clippy --no-default-features --profile ci --features "${{ env.RUST_FEATURES }} ${{ matrix.OS_SPECIFIC_FEATURES }}" -- -D warnings | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Cargo clippy without features | ||||||||||||||||||
| run: cargo clippy --no-default-features -- -D warnings | ||||||||||||||||||
| - name: Cargo test | ||||||||||||||||||
| run: cargo test --no-default-features --profile ci --features "${{ env.RUST_FEATURES }} ${{ matrix.OS_SPECIFIC_FEATURES }}" | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| name = "lyric_finder" | ||
| version = "0.1.5" | ||
| edition = "2021" | ||
| rust-version.workspace = true | ||
| license = "MIT" | ||
| description = "A lyric finder library" | ||
| authors = ["Thang Pham <[email protected]>"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ name = "spotify_player" | |
| version = "0.16.3" | ||
| authors = ["Thang Pham <[email protected]>"] | ||
| edition = "2021" | ||
| rust-version.workspace = true | ||
| license = "MIT" | ||
| description = "A Spotify player in the terminal with full feature parity" | ||
| repository = "https://github.com/aome510/spotify-player" | ||
|
|
@@ -71,14 +72,17 @@ jackaudio-backend = ["streaming", "librespot-playback/jackaudio-backend"] | |
| rodiojack-backend = ["streaming", "librespot-playback/rodiojack-backend"] | ||
| sdl-backend = ["streaming", "librespot-playback/sdl-backend"] | ||
| gstreamer-backend = ["streaming", "librespot-playback/gstreamer-backend"] | ||
|
|
||
| streaming = ["librespot-playback", "librespot-connect"] | ||
| lyric-finder = ["lyric_finder"] | ||
| media-control = ["souvlaki", "winit", "windows"] | ||
|
|
||
| image = ["viuer", "dep:image"] | ||
| sixel = ["image", "viuer/sixel"] | ||
| daemon = ["daemonize", "streaming"] | ||
|
|
||
| lyric-finder = ["lyric_finder"] | ||
| notify = ["notify-rust"] | ||
| clipboard = ["copypasta"] | ||
| daemon = ["daemonize", "streaming"] | ||
|
|
||
| default = ["rodio-backend", "media-control", "clipboard"] | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize once you surround the arguments with quotes, spaces can be used instead of commas. See my below suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then you also need to update this variable to use spaces