Skip to content

Use tabular numbers for track numbers and duration #126

Use tabular numbers for track numbers and duration

Use tabular numbers for track numbers and duration #126

Workflow file for this run

name: "Build"
on: "push"
jobs:
build:
# We deliberate use a somewhat older version here to ensure compatibility
# with it. But also not too old that we have to use ancient software.
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@v4.1.0"
with:
submodules: true
- id: "nix-cache"
name: "Cache Nix"
uses: "actions/cache@v4.0.2"
with:
path: "/tmp/nixcache"
key: "nix-${{ hashFiles('flake.*') }}"
- name: "Cache PureScript"
uses: "actions/cache@v4.0.2"
with:
path: "app/.spago"
key: "spago-${{ hashFiles('app/spago.yaml', 'app/spago.lock', 'flake.lock') }}"
restore-keys: "spago-"
- name: "Cache Rust"
uses: "actions/cache@v4.0.2"
with:
path: |
target
~/.cargo
~/.rustup
# Rustup can be incompatible across versions, so if we update the
# Nixpkgs snapshot and get a newer rustup, we should *not* reuse the
# cache.
key: "rust-${{ hashFiles('flake.*') }}-${{ hashFiles('Cargo.lock', 'rust-toolchain') }}"
restore-keys: "rust-${{ hashFiles('flake.*') }}-"
- name: "Install Nix"
uses: "cachix/install-nix-action@v26"
with:
nix_path: "nixpkgs=channel:nixos-unstable"
install_url: "https://releases.nixos.org/nix/nix-2.17.0/install"
- name: "Import Nix store cache"
if: "steps.nix-cache.outputs.cache-hit == 'true'"
run: "nix-store --import < /tmp/nixcache"
- name: "Install system dependencies"
run: |
# Updating man-db after installing a package takes a long time, and we
# don't need man-db anyway on CI, remove it.
sudo apt purge man-db
# Install libsystemd, because we want to link against the system one,
# not the one from Nixpkgs.
sudo apt update
sudo apt install libasound2-dev libsystemd-dev
# Trigger Rustup to download and install the Rust toolchain.
nix develop --command cargo --version
- name: "Build server"
run: "nix develop --command cargo build"
- name: "Test server"
run: "nix develop --command cargo test"
- name: "Build app"
run: "nix develop --command make -C app"
- name: "Build docs"
run: "nix develop --command mkdocs build"
- name: "Export Nix store cache"
if: "steps.nix-cache.outputs.cache-hit != 'true'"
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache"