Skip to content

Conversation

@cwlbraa
Copy link
Contributor

@cwlbraa cwlbraa commented Jun 6, 2025

This PR removes our Makefile-centric install process and replaces it with a daggerized GHA release process and an install.sh script.

On v* tags, it has GHA use dagger and goreleaser to platform-fanout-build binaries and create a draft GH release. The release operator can then review and publish the release.

The install script finds the most recently published release, downloads the platform-appropriate tarball, checksums, and installs.

The install script also has logic for detecting pre-existing cu system binaries and warning the user to run hash -r to clear command cache.

It also adds a very basic GHA PR check to verify that the project still builds.

Note: this uses a community dagger module for goreleaser. we may find it to be unstable or deleted in the future, but for now it works well enough and the impl looks reasonable to me.

aluzzardi and others added 30 commits May 22, 2025 16:25
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
This reverts commit 6c3017d1a48d2fe0f2914a9395059b7510f7ac6c.
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
… port mapping, entrypoint

Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Andrea Luzzardi <andrea@luzzardi.com>
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
cwlbraa and others added 3 commits June 9, 2025 11:20
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
@cwlbraa cwlbraa changed the title wip: dagger-for-github release pipeline dagger-for-github release pipeline Jun 9, 2025
Signed-off-by: Connor Braa <connor@dagger.io>
@cwlbraa cwlbraa marked this pull request as ready for review June 9, 2025 18:32
@cwlbraa cwlbraa changed the title dagger-for-github release pipeline dagger-for-github release pipeline (replace Makefile with install.sh & add build check to PRs) Jun 9, 2025
@cwlbraa cwlbraa changed the title dagger-for-github release pipeline (replace Makefile with install.sh & add build check to PRs) dagger-for-github release pipeline, replace Makefile with install.sh, add build check to PRs Jun 9, 2025
Co-authored-by: Tibor Vass <tiborvass@users.noreply.github.com>
Signed-off-by: Connor Braa <3478454+cwlbraa@users.noreply.github.com>
Signed-off-by: Connor Braa <connor@dagger.io>
…atform

Signed-off-by: Connor Braa <connor@dagger.io>
local arch=$(detect_arch)
log_info "Detected platform: $os/$arch"

local version=$(get_latest_version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice for this to be an env var, like in Dagger, to be able to specify any version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be added later. right now it's a pain to test that manually as there's 0 tagged releases.

cwlbraa added 3 commits June 9, 2025 12:27
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
@cwlbraa cwlbraa requested review from grouville and tiborvass June 9, 2025 19:34
@grouville
Copy link
Member

grouville commented Jun 9, 2025

@cwlbraa

Testing Summary & Implementation Review

I’ve reviewed and tested the new GoReleaser + Dagger setup locally. Here's a brief summary and exact commands for reproducibility:

Successfully tested:

  • Dagger Setup and Functions:

    curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.18.9 sh
    ./bin/dagger call build export --path ./cu-local
    ./bin/dagger call build-multi-platform export --path ./dist
    ./bin/dagger call release --help
    • Built arm64 Linux binary.
    • Created multi-platform binaries (Linux/Darwin, amd64/arm64).
    • Validated release command parameters.
  • GoReleaser Config (with Docker):

    docker run --rm -v "$(pwd)":/workspace -w /workspace goreleaser/goreleaser:latest check
    docker run --rm -v "$(pwd)":/workspace -w /workspace -e GITHUB_TOKEN=fake-token goreleaser/goreleaser:latest release --snapshot --clean | head -30
    • Config validated, snapshot build successful.
    • Community module works fine.
  • Install Script:

    chmod +x install.sh
    bash install.sh --help
    bash install.sh 2>&1 | head -20
    • Properly detected Docker and platform.
    • Expected failure for fetching non-existent releases.
  • Build Outputs:

    ls -la cu-local dist/
    find dist/ -name "cu"

⚠️ Could not test (requires actual GitHub setup):

  • GitHub Actions execution
  • Real releases
  • Install script fetching real releases

🔍 Implementation Notes:

  • Critical findings:

  • 🚨 Bug: Install script uses bash features (pipefail, local) but specifies POSIX shell (#!/bin/sh). Needs correction:

    # Change to:
    #!/usr/bin/env bash

To test the shell issue:

  ./install.sh --help  # Fails with dash: "Illegal option -o pipefail"
  bash install.sh --help  # Works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.