loop_wave: convert to mono, pcm16u and 22050hz before looping the wave #187
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: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' # Monthly | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-2019] | |
rust: [stable, beta] | |
configuration: [release] | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
filename: gchimp | |
filename-compiled: gchimp-native | |
label: Ubuntu | |
- os: windows-2019 | |
target: x86_64-pc-windows-msvc | |
filename: gchimp.exe | |
filename-compiled: gchimp-native.exe | |
label: Windows | |
- native-package: gchimp-native | |
- configuration: release | |
release-flag: '--release' | |
name: ${{ matrix.rust }} - ${{ matrix.label }} - ${{ matrix.configuration }} | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
- if: job.container | |
run: chown -R $(id -u):$(id -g) . | |
- name: Install Rust | |
uses: actions-rs/[email protected] | |
with: | |
profile: minimal | |
override: true | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
- uses: Swatinem/[email protected] | |
- name: Build | |
uses: actions-rs/[email protected] | |
with: | |
command: build | |
args: --target ${{ matrix.target }} ${{ matrix.release-flag }} --package ${{ matrix.native-package }} | |
- name: Preparing upload | |
run: | | |
mv gchimp _gchimp | |
mkdir gchimp | |
cp target/${{ matrix.target }}/${{ matrix.configuration }}/${{ matrix.filename-compiled }} gchimp/${{ matrix.filename }} | |
cp -r dist gchimp/ | |
mv gchimp/dist/config.toml gchimp/config.toml | |
- uses: actions/[email protected] | |
if: matrix.rust == 'stable' | |
with: | |
name: gchimp-${{ runner.os }} | |
path: gchimp | |
- name: Prepare Release | |
if: startsWith(github.ref, 'refs/tags/') && matrix.rust == 'stable' && matrix.configuration == 'release' && !matrix.cross | |
run: | | |
7z a gchimp-${{ runner.os }}.7z gchimp | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') && matrix.rust == 'stable' && matrix.configuration == 'release' && !matrix.cross | |
with: | |
files: gchimp-${{ runner.os }}.7z |