Skip to content

Count with an if, everywhere #14

Count with an if, everywhere

Count with an if, everywhere #14

Workflow file for this run

name: core
# The engine, the console tool and the tests on every push, on all three platforms,
# without Slint — so without a Rust toolchain and without the 7–25 minute cargo build.
# full.yml builds the UI. A change to takt4_core that breaks src/ui/ is therefore only
# caught by full.yml's weekly run or a manual dispatch; run one before a milestone.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
name: ${{ matrix.preset }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
# The hosted Windows images (windows-latest and windows-2025 alike, as of the
# 2026-08-24 image) ship Visual Studio 2026 only. The preset names no
# generator, so CMake picks whatever Visual Studio is installed.
- os: windows-latest
preset: windows-core
cli: build/windows-core/bin/Release/takt4-cli.exe
- os: macos-latest
preset: macos-core
cli: build/macos-core/bin/takt4-cli
- os: ubuntu-24.04
preset: linux-core
cli: build/linux-core/bin/takt4-cli
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Install Linux packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libasound2-dev libjack-jackd2-dev
# The hosted images ship CMake and Ninja that satisfy the requirements in
# README.md. Record what was actually used.
- name: Toolchain versions
run: |
cmake --version
ninja --version || true
- name: Configure
run: cmake --preset ${{ matrix.preset }}
- name: Build
run: cmake --build --preset ${{ matrix.preset }} --parallel
- name: Test
run: ctest --preset ${{ matrix.preset }}
# The Windows and Linux runners have no audio devices; the macOS runner exposes
# virtual CoreAudio ones, which the [hardware] test above opens. This proves the
# console tool starts, brings PortAudio up with the expected host APIs, and copes
# with an empty device list.
- name: Console tool
run: |
${{ matrix.cli }} --version
${{ matrix.cli }} devices
# Proves takt4_core stands without Slint or a Rust toolchain.
- name: Slint was not fetched
run: test ! -e build/${{ matrix.preset }}/_deps/slint-src