Skip to content

fix(podcast): load the newest 300 episodes, newest first #1155

fix(podcast): load the newest 300 episodes, newest first

fix(podcast): load the newest 300 episodes, newest first #1155

Workflow file for this run

name: CI
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
go:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@v7.0.0
with:
go-version-file: go.mod
cache: true
- run: sudo apt-get update && sudo apt-get install -y libasound2-dev libflac-dev libvorbis-dev libogg-dev libmpg123-dev
- name: Install shellcheck
# Keep SHELLCHECK_VERSION equal to the shellcheck line in mise.toml.
env:
SHELLCHECK_VERSION: v0.10.0
SHELLCHECK_SHA256: 6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87
working-directory: ${{ runner.temp }}
run: |
curl -fsSLo shellcheck.tar.xz "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
echo "${SHELLCHECK_SHA256} shellcheck.tar.xz" | sha256sum -c -
tar -xJf shellcheck.tar.xz
sudo install -m 755 "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin/shellcheck
shellcheck --version
- run: make tools
- name: make ci
# shell: bash sets pipefail, so a failure of make ci fails the step.
shell: bash
run: make ci TESTFLAGS=-v 2>&1 | tee "$RUNNER_TEMP/ci.log"
- name: List skipped tests
# make ci ran the tests once with -v. Each package prints its tests
# and then its ok line, so each skip gets the package of that line.
run: >-
awk '/^[[:space:]]*--- SKIP: / { skips[n++] = $3 }
/^ok[[:space:]]/ { for (i = 0; i < n; i++) print $2 " " skips[i]; n = 0 }'
"$RUNNER_TEMP/ci.log"
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-26
goos: darwin
- os: windows-2025
goos: windows
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@v7.0.0
with:
go-version-file: go.mod
- name: Install codec libs (macOS)
if: matrix.goos == 'darwin'
run: |
brew install flac libvorbis libogg mpg123 pkg-config
# Make sure pkg-config resolves the version just poured rather than
# a leftover symlink into an older Cellar directory.
brew link --overwrite flac libvorbis libogg mpg123
pkg-config --libs libmpg123 flac vorbis ogg
- name: Discard cached cgo objects (macOS)
if: matrix.goos == 'darwin'
# cgo records the -L paths pkg-config returned when a package was
# compiled, and Homebrew's paths carry the exact codec version. The
# restored build cache is keyed on go.sum alone, so once the runner
# image moves mpg123 to a new version those cached objects keep
# linking against a Cellar directory that no longer exists. Dropping
# the build cache costs a cold cgo build; the module cache is
# untouched.
run: go clean -cache
- name: Set up MinGW toolchain (Windows)
if: matrix.goos == 'windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
path-type: inherit
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-libogg
mingw-w64-x86_64-libvorbis
mingw-w64-x86_64-flac
mingw-w64-x86_64-mpg123
- name: Test and build (Windows)
if: matrix.goos == 'windows'
shell: msys2 {0}
env:
CGO_ENABLED: "1"
# Some MSYS2 libogg builds ship a libogg-0.dll whose export table is
# missing ogg_stream_iovecin, even though it's present in the static
# libogg.a. Force just that library to link statically.
CGO_LDFLAGS: "-Wl,-Bstatic -logg -Wl,-Bdynamic"
run: |
go test -count=1 ./...
go build -trimpath ./...
- name: Test and build (non-Windows)
if: matrix.goos != 'windows'
run: |
go test -count=1 ./...
go build -trimpath ./...