Repository navigation
feat(install): Homebrew formula + Nix flake (runner validation) #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Brew/Nix smoke | |
| # Validate the Homebrew formula and the Nix flake on real runners (the dev host has | |
| # neither). Each installs the published 0.10.0 standalone binary and asserts | |
| # `clauster --version`. Manual + on changes to the packaging files. Non-required. | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - Formula/clauster.rb | |
| - flake.nix | |
| - flake.lock | |
| - .github/workflows/brew-nix-smoke.yml | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: brew-nix-smoke-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| brew: | |
| name: Homebrew (macos-arm64) | |
| runs-on: macos-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: brew install via a local tap + verify | |
| run: | | |
| set -euo pipefail | |
| # Modern Homebrew refuses a bare local formula path — it must live in a tap. | |
| # Stage our formula into an ephemeral local tap (mirrors real consumption via | |
| # a homebrew-<x> repo) and install from there. | |
| brew tap-new schubydoo/local --no-git | |
| tap_dir="$(brew --repository schubydoo/local)" | |
| mkdir -p "$tap_dir/Formula" | |
| cp ./Formula/clauster.rb "$tap_dir/Formula/clauster.rb" | |
| brew install --formula schubydoo/local/clauster | |
| clauster --version | |
| clauster --version | grep -q '^clauster' | |
| nix: | |
| name: Nix flake (x86_64-linux) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Install Nix, build + run the flake | |
| run: | | |
| set -euo pipefail | |
| # Single-user install (no daemon/systemd needed in CI). | |
| sh <(curl -L https://nixos.org/nix/install) --no-daemon | |
| . "$HOME/.nix-profile/etc/profile.d/nix.sh" | |
| export NIX_CONFIG="experimental-features = nix-command flakes" | |
| nix build .#clauster -L | |
| ./result/bin/clauster --version | |
| ./result/bin/clauster --version | grep -q '^clauster' | |
| nix run .#clauster -- --version | |
| # Emit the generated lockfile so we can commit a reproducible flake.lock | |
| # (the dev host has no nix to `nix flake lock` locally). | |
| - name: Upload flake.lock | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: flake-lock | |
| path: flake.lock | |
| if-no-files-found: error |