From dc38d7a5c18d0c5755cd46ca64d00fa101416695 Mon Sep 17 00:00:00 2001 From: harudagondi Date: Sun, 11 Sep 2022 15:05:17 +0800 Subject: [PATCH 1/3] Update CI to use matrix --- .github/workflows/rust.yml | 78 ++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5774332..32f701c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,13 +1,34 @@ -on: [push, pull_request] +name: CI -name: Continuous integration +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + CARGO_TERM_COLOR: always jobs: - check: - name: check - runs-on: ubuntu-latest + test-with-feature: + name: test-with-feature + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + feature: [mp3, ogg, flac, wav] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-build-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }} - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -15,27 +36,30 @@ jobs: override: true - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + if: runner.os == 'linux' - uses: actions-rs/cargo@v1 with: - command: check - - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features mp3 - - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features ogg - - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features flac + command: test + args: --no-default-features --features ${{ matrix.feature }} test: - name: test - runs-on: ubuntu-latest + name: test-with-feature + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-build-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }} - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -43,21 +67,11 @@ jobs: override: true - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + if: runner.os == 'linux' - uses: actions-rs/cargo@v1 with: command: test - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features mp3 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features ogg - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features flac + args: --no-default-features fmt: name: fmt From 981d50a40a74dffe3b4744a28d6309317fdd6816 Mon Sep 17 00:00:00 2001 From: harudagondi Date: Sun, 11 Sep 2022 15:07:18 +0800 Subject: [PATCH 2/3] change name --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 32f701c..b290f59 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,7 @@ jobs: args: --no-default-features --features ${{ matrix.feature }} test: - name: test-with-feature + name: test strategy: fail-fast: false matrix: From 11983527789ad1a65669a8a9bf05879e55cc0651 Mon Sep 17 00:00:00 2001 From: harudagondi Date: Sun, 11 Sep 2022 15:07:39 +0800 Subject: [PATCH 3/3] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 259de97..9561d60 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Bevy Oddio -[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-main-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) ![Crates.io](https://img.shields.io/crates/d/bevy_oddio) ![Crates.io](https://img.shields.io/crates/l/bevy_oddio) ![Crates.io](https://img.shields.io/crates/v/bevy_oddio) ![docs.rs](https://img.shields.io/docsrs/bevy_oddio) +[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-main-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) ![Crates.io](https://img.shields.io/crates/d/bevy_oddio) ![Crates.io](https://img.shields.io/crates/l/bevy_oddio) ![Crates.io](https://img.shields.io/crates/v/bevy_oddio) ![docs.rs](https://img.shields.io/docsrs/bevy_oddio) [![CI](https://github.com/harudagondi/bevy_oddio/actions/workflows/rust.yml/badge.svg)](https://github.com/harudagondi/bevy_oddio/actions/workflows/rust.yml) A third party Bevy plugin that integrates [`oddio`] into [Bevy].