Skip to content

Let --audio-format take an ordered list of preferred formats #166

Let --audio-format take an ordered list of preferred formats

Let --audio-format take an ordered list of preferred formats #166

Workflow file for this run

name: CI
# Every branch `push` as well as `pull_request` on purpose. The artifacts the build produces
# exist so a change can be tried on a Pi or a Mac without building it there, and that only works
# if every branch push produces them -- not just the ones that have a pull request open. The
# cost is that a PR raised from a branch in this repo builds twice.
#
# Except tags, which belong to release.yml. Both workflows call build.yml, and the `concurrency`
# group below is keyed by workflow name, so nothing would collapse the pair: a `v*` push would
# otherwise run the matrix twice over and report two statuses for one tag.
#
# The `branches` filter is what excludes them, and the rule behind it cuts both ways. A `push`
# naming only branch filters does not fire for tags at all -- that is the whole of how a tag is
# left to release.yml -- and the mirror of that rule is a trap worth naming: a `push` naming only
# `tags` or `tags-ignore` does not fire for *branches*, so `tags-ignore: '**'` reads like
# "everything except tags" and means "nothing at all".
#
# `'**'` and not `'*'`, because only the doubled form matches a `/`, and the branches here carry
# two apiece. `'*'` would be this same bug wearing a better disguise: main would build and no
# task branch would.
on:
push:
branches:
- '**'
pull_request:
# A superseded push has nothing left to say. This does not collapse the push/PR pair above:
# those carry different refs, and so land in different groups.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
# Named rather than left to default, because the default is `bash -e` with no pipefail.
# build.yml restates this for itself, a called workflow inheriting none of it.
shell: bash
jobs:
# A gate rather than a claim: the scripts under scripts/ are asserted to be shellcheck-clean,
# and an assertion nothing enforces is one that stops being true. shellcheck ships on the
# Ubuntu images, so this costs a runner-minute.
#
# Stays here rather than moving into build.yml with the rest, and the asymmetry is worth being
# honest about now that build_macos_pkg.sh shapes a released artifact: what this job adds is
# *lint*, and a tag push runs release.yml alone, so it is lint that a tag does not get. What a
# tag does get is four of them being run -- smoke_test.sh on every publishing build,
# build_arm32.sh on the cross-compiled 32-bit ARM leg, build_armv6_container.sh throughout
# build-armv6.yml, and build_macos_pkg.sh on the macOS leg, whose .pkg is then installed and
# its receipt asserted -- so a release is gated on the scripts working whether or not it is
# gated on their style.
shellcheck:
name: shellcheck
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Lint the shell scripts
run: shellcheck scripts/*.sh
# The matrix itself lives in build.yml, which release.yml calls too, so a change to how these
# five legs build reaches both paths rather than one of them.
#
# There is a sixth archive and it is deliberately not here. build-armv6.yml builds linux-armv6
# inside an emulated Raspbian container -- 23 minutes against the two or three these legs take
# -- so it carries its own triggers rather than running on every push: `main` after a merge, a
# narrow path filter on pull requests, and a dispatch. release.yml calls it beside build.yml and
# blocks the release on both, so what a tag is gated on is a superset of this. That file's
# header sets the trade out in full.
build:
uses: ./.github/workflows/build.yml