From ed03b78a2c8525d5d0d901dc77ec1fd07f82133b Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Tue, 5 May 2026 10:06:46 +0000 Subject: [PATCH 1/3] ci: migrate to goreleaser Gen 2 (PLA-455) Add .goreleaser.yaml with five build entries (photon, photon-migration, photon-openapi, photon-snapshot-loader, photon-snapshotter), each with explicit --bin flags targeting x86_64-unknown-linux-gnu only. Drops the ubuntu-24.04 matrix from the Gen 1 workflow. Add goreleaser-config-check.yaml workflow to validate the config on PRs. GCS upload, cosigning, and GitHub Release publishing are injected by ci/goreleaser-patch.yaml in Binaries-ci. Artifacts will be uploaded to nomad-triton-test/photon/v/ replacing the old nomad-triton-test/photon-indexer// path. Co-Authored-By: Claude Sonnet 4.6 --- .../workflows/goreleaser-config-check.yaml | 26 ++++++ .goreleaser.yaml | 93 +++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 .github/workflows/goreleaser-config-check.yaml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/goreleaser-config-check.yaml b/.github/workflows/goreleaser-config-check.yaml new file mode 100644 index 00000000..497b7b68 --- /dev/null +++ b/.github/workflows/goreleaser-config-check.yaml @@ -0,0 +1,26 @@ +--- +name: GoReleaser config check +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + paths: + - .goreleaser.yaml + workflow_dispatch: + +jobs: + goreleaser-check: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - uses: goreleaser/goreleaser-action@v6 + with: + install-only: true + + - name: goreleaser check + run: goreleaser check diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..b69339fa --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,93 @@ +# .goreleaser.yaml for rpcpool/photon +# +# This file must be committed to the root of the photon source repo. +# GCS upload, cosigning, and GitHub Release publishing are injected via +# ci/goreleaser-patch.yaml in Binaries-ci at build time. +# +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json + +version: 2 + +builds: + - id: photon + builder: rust + binary: photon + targets: + - x86_64-unknown-linux-gnu + flags: + - --release + - --bin=photon + + - id: photon-migration + builder: rust + binary: photon-migration + targets: + - x86_64-unknown-linux-gnu + flags: + - --release + - --bin=photon-migration + + - id: photon-openapi + builder: rust + binary: photon-openapi + targets: + - x86_64-unknown-linux-gnu + flags: + - --release + - --bin=photon-openapi + + - id: photon-snapshot-loader + builder: rust + binary: photon-snapshot-loader + targets: + - x86_64-unknown-linux-gnu + flags: + - --release + - --bin=photon-snapshot-loader + + - id: photon-snapshotter + builder: rust + binary: photon-snapshotter + targets: + - x86_64-unknown-linux-gnu + flags: + - --release + - --bin=photon-snapshotter + +archives: + - id: photon + ids: [photon] + name_template: photon-linux-amd64 + formats: [binary] + + - id: photon-migration + ids: [photon-migration] + name_template: photon-migration-linux-amd64 + formats: [binary] + + - id: photon-openapi + ids: [photon-openapi] + name_template: photon-openapi-linux-amd64 + formats: [binary] + + - id: photon-snapshot-loader + ids: [photon-snapshot-loader] + name_template: photon-snapshot-loader-linux-amd64 + formats: [binary] + + - id: photon-snapshotter + ids: [photon-snapshotter] + name_template: photon-snapshotter-linux-amd64 + formats: [binary] + +release: + github: + owner: rpcpool + name: photon + draft: true + header: | + rust {{ .Env.RUST_VERSION }} + +changelog: + sort: asc + use: github From 285106fbb2a95f8640f1d3231e383ce31b4b5e39 Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Tue, 5 May 2026 11:23:06 +0000 Subject: [PATCH 2/3] add rust toolchain file --- rust-toolchain.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..2ca2cb16 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "stable" +components = ["rustfmt", "rustc-dev", "clippy", "cargo"] From 2103c682958b77975652fa4cd96cb53450cfcaaf Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Tue, 5 May 2026 11:32:32 +0000 Subject: [PATCH 3/3] fix: add SSL includes --- .goreleaser.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b69339fa..384da0d3 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -17,6 +17,10 @@ builds: flags: - --release - --bin=photon + env: + - OPENSSL_INCLUDE_DIR=/usr/include + - OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu + - CFLAGS_x86_64_unknown_linux_gnu=-isystem /usr/include/x86_64-linux-gnu - id: photon-migration builder: rust @@ -26,6 +30,10 @@ builds: flags: - --release - --bin=photon-migration + env: + - OPENSSL_INCLUDE_DIR=/usr/include + - OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu + - CFLAGS_x86_64_unknown_linux_gnu=-isystem /usr/include/x86_64-linux-gnu - id: photon-openapi builder: rust @@ -35,6 +43,10 @@ builds: flags: - --release - --bin=photon-openapi + env: + - OPENSSL_INCLUDE_DIR=/usr/include + - OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu + - CFLAGS_x86_64_unknown_linux_gnu=-isystem /usr/include/x86_64-linux-gnu - id: photon-snapshot-loader builder: rust @@ -44,6 +56,10 @@ builds: flags: - --release - --bin=photon-snapshot-loader + env: + - OPENSSL_INCLUDE_DIR=/usr/include + - OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu + - CFLAGS_x86_64_unknown_linux_gnu=-isystem /usr/include/x86_64-linux-gnu - id: photon-snapshotter builder: rust @@ -53,6 +69,10 @@ builds: flags: - --release - --bin=photon-snapshotter + env: + - OPENSSL_INCLUDE_DIR=/usr/include + - OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu + - CFLAGS_x86_64_unknown_linux_gnu=-isystem /usr/include/x86_64-linux-gnu archives: - id: photon