Skip to content

Only refresh outdated players when media collection changes #27

Only refresh outdated players when media collection changes

Only refresh outdated players when media collection changes #27

Workflow file for this run

on:
- push
- pull_request
name: Main
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
rust-target: x86_64-pc-windows-msvc
artifact-name: win64
artifact-file: madamiru.exe
tar: false
- os: windows-latest
rust-target: i686-pc-windows-msvc
artifact-name: win32
artifact-file: madamiru.exe
tar: false
- os: ubuntu-20.04
rust-target: x86_64-unknown-linux-gnu
artifact-name: linux
artifact-file: madamiru
tar: true
- os: macos-13
rust-target: x86_64-apple-darwin
artifact-name: mac
artifact-file: madamiru
tar: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mtkennerly/dunamai-action@v1
with:
env-var: MADAMIRU_VERSION
args: --style semver
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable-${{ matrix.rust-target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.rust-target }}
- if: ${{ matrix.os == 'ubuntu-20.04' }}
run: sudo apt-get update && sudo apt-get install -y gcc libxcb-composite0-dev libgtk-3-dev
- if: ${{ matrix.artifact-name == 'win32' }}
uses: blinemedical/setup-gstreamer@v1
with:
version: '1.22.12'
arch: 'x86'
- if: ${{ matrix.artifact-name != 'win32' }}
uses: blinemedical/setup-gstreamer@v1
with:
version: '1.22.12'
- run: cargo build --release
- if: ${{ matrix.tar }}
run: |
cd target/release
tar --create --gzip --file=madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}.tar.gz ${{ matrix.artifact-file }}
- if: ${{ matrix.tar }}
uses: actions/upload-artifact@v4
with:
name: madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}
path: target/release/madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}.tar.gz
- if: ${{ !matrix.tar }}
uses: actions/upload-artifact@v4
with:
name: madamiru-v${{ env.MADAMIRU_VERSION }}-${{ matrix.artifact-name }}
path: target/release/${{ matrix.artifact-file }}
test:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y gcc libxcb-composite0-dev libgtk-3-dev
- uses: blinemedical/setup-gstreamer@v1
with:
version: '1.22.12'
- run: cargo test
lint:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y gcc libxcb-composite0-dev libgtk-3-dev
- uses: blinemedical/setup-gstreamer@v1
with:
version: '1.22.12'
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace -- --deny warnings