forked from Salzian/bevy_fmod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Salzian:main' into main
- Loading branch information
Showing
3 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: 'Install platform dependencies' | ||
description: 'Installs platform dependencies for the current OS' | ||
inputs: | ||
os: | ||
description: 'The OS to install dependencies for' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- if: ${{ inputs.os == 'ubuntu-latest' }} | ||
name: Install ubuntu dependencies | ||
shell: bash | ||
run: sudo apt install -y libasound2-dev libudev-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Setup Cache' | ||
description: 'Sets up caching for Rust projects' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Cache for Registry and Build Artifacts | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,79 @@ | ||
name: CI | ||
name: Rust CI Workflow | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
concurrency: | ||
group: ${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ windows-latest, macos-latest, ubuntu-latest ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install platform dependencies | ||
uses: ./.github/actions/install-platform-dependencies | ||
with: | ||
os: ${{ matrix.os }} | ||
|
||
- name: Setup cache | ||
uses: ./.github/actions/setup-cache-action | ||
|
||
- name: Compile project | ||
run: cargo build | ||
|
||
# This job is currently disabled because it requires the FMOD libraries to be present. | ||
# We will revisit this once we actually have any tests. | ||
#test: | ||
|
||
# needs: build | ||
|
||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# os: [ windows-latest, macos-latest, ubuntu-latest ] | ||
|
||
# runs-on: ${{ matrix.os }} | ||
|
||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
# - name: Setup cache | ||
# uses: ./.github/actions/setup-cache-action | ||
|
||
# - if: matrix.os == 'ubuntu-latest' | ||
# name: (Ubuntu) Install platform dependencies | ||
# run: sudo apt install -y libasound2-dev libudev-dev | ||
|
||
# - name: Execute tests | ||
# run: cargo test | ||
|
||
lint: | ||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Build the project | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install platform dependencies | ||
uses: ./.github/actions/install-platform-dependencies | ||
with: | ||
os: ubuntu-latest | ||
|
||
- name: Setup cache | ||
uses: ./.github/actions/setup-cache-action | ||
|
||
- name: Lint with clippy | ||
run: cargo clippy -- -D warnings |