Update deps #22
Workflow file for this run
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
name: Rust | |
on: | |
push: | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install linux libs | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends pkg-config build-essential gcc-multilib libudev-dev libjack-jackd2-dev libjack-jackd2-0 libasound2-dev alsa | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: clippy | |
run: cargo clippy --all-targets -- -D clippy::all | |
- name: test | |
run: cargo test | |
build_and_release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
name: Build and Release | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-apple-darwin | |
- x86_64-pc-windows-msvc | |
- x86_64-unknown-linux-gnu | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
name: games-linux.tar.gz | |
- target: x86_64-apple-darwin | |
os: macOS-latest | |
name: games-mac.tar.gz | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
name: games-windows.zip | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Install linux deps | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends pkg-config build-essential gcc-multilib libudev-dev libjack-jackd2-dev libjack-jackd2-0 libasound2-dev alsa | |
- name: build | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Prepare build artifacts [Windows] | |
if: matrix.os == 'windows-latest' | |
run: | | |
cd target/${{ matrix.target }}/release | |
strip usfx_test.exe | |
7z a ../../../${{ matrix.name }} usfx_test.exe | |
cd - | |
- name: Prepare build artifacts [-nix] | |
if: matrix.os != 'windows-latest' | |
run: | | |
cd target/${{ matrix.target }}/release | |
strip usfx_test | |
tar cvf ../../../${{ matrix.name }} usfx_test | |
cd - | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ matrix.name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |