Skip to content

Tracks: enable the Pencil tool to draw MIDI regions (#154) #430

Tracks: enable the Pencil tool to draw MIDI regions (#154)

Tracks: enable the Pencil tool to draw MIDI regions (#154) #430

Workflow file for this run

# Roadmap Phase 0: CI for macOS, Windows, Linux + wasm. Every job runs `cargo xtask check`
# (fmt, clippy -D warnings, tests, rt-check, cargo-deny, wasm-check); `bench` checks the
# lightweight targets on macOS and Windows (`cargo xtask bench`).
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
check:
name: xtask check (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Linux audio/windowing dev packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libasound2-dev libjack-jackd2-dev \
libxkbcommon-dev libwayland-dev libxcb-render0-dev libxcb-shape0-dev \
libxcb-xfixes0-dev libgtk-3-dev
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
# `cargo xtask check` runs miri on the engine's `unsafe` code (the triple buffer).
- name: Install nightly miri
run: rustup toolchain install nightly --profile minimal --component miri,rust-src
- name: cargo xtask check
run: cargo xtask check
# The pure Wayland build (no X11); see README "Wayland without X11".
- name: cargo check without X11
if: runner.os == 'Linux'
run: cargo check -p prowave-app --no-default-features
# The lightweight targets of LINUX-MACOS-LIGHTWEIGHT.md (startup, memory, binary size, 24-track
# DSP load) on a release build, plus pictures of the layout at several window sizes (a 13-inch
# MacBook Air among them) to look at in the run's artifacts. Linux is left out: its build
# servers have no GPU, so startup would measure a software renderer.
bench:
name: lightweight targets (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: cargo xtask bench
# The runners have no GPU, so startup and memory measure a software renderer: they are
# reported (as annotations on the run's page) but only the DSP load and binary size fail
# the job. On a real computer `cargo xtask bench` enforces all five.
env:
PROWAVE_BENCH_WINDOW_ADVISORY: "1"
run: cargo xtask bench
- name: Layout pictures
if: always()
shell: bash
run: |
exe=target/release/prowave
[ -x "$exe" ] || exe=target/release/prowave.exe
"$exe" --layout-shots layout-shots || echo "::warning::no window could be opened for the layout pictures"
ls -l layout-shots || true
- uses: actions/upload-artifact@v4
if: always()
with:
name: layout-shots-${{ runner.os }}
path: layout-shots/
if-no-files-found: warn
wasm:
name: wasm32 build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: cargo xtask wasm-check
run: cargo xtask wasm-check
release-build:
name: release build (${{ matrix.target }})
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: windows-latest, target: x86_64-pc-windows-msvc }
- { os: macos-latest, target: aarch64-apple-darwin }
- { os: macos-latest, target: x86_64-apple-darwin }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Linux audio/windowing dev packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libasound2-dev libxkbcommon-dev libwayland-dev \
libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release --target ${{ matrix.target }} -p prowave-app
- uses: actions/upload-artifact@v4
with:
name: prowave-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/prowave
target/${{ matrix.target }}/release/prowave.exe
if-no-files-found: error