Skip to content

Commit 5bcbe44

Browse files
committed
Merge remote-tracking branch 'mahhouk/unstable' into repro
2 parents c5849a0 + 12c0574 commit 5bcbe44

File tree

128 files changed

+1219
-1362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1219
-1362
lines changed
Lines changed: 37 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
name: release-reproducible
1+
name: docker-reproducible
22

33
on:
44
push:
5+
branches:
6+
- unstable
7+
- stable
58
tags:
69
- v*
7-
workflow_dispatch:
8-
inputs:
9-
dry_run:
10-
description: >-
11-
Enable dry run mode (builds images but skips push to registry)
12-
type: boolean
13-
default: false
10+
workflow_dispatch: # allows manual triggering for testing purposes and skips publishing an image
1411

1512
env:
1613
DOCKER_REPRODUCIBLE_IMAGE_NAME: >-
@@ -21,11 +18,24 @@ env:
2118
jobs:
2219
extract-version:
2320
name: extract version
24-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-22.04
2522
steps:
2623
- name: Extract version
27-
run: >-
28-
echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
24+
run: |
25+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
26+
# It's a tag (e.g., v1.2.3)
27+
VERSION="${GITHUB_REF#refs/tags/}"
28+
elif [[ "${{ github.ref }}" == refs/heads/stable ]]; then
29+
# stable branch -> latest
30+
VERSION="latest"
31+
elif [[ "${{ github.ref }}" == refs/heads/unstable ]]; then
32+
# unstable branch -> latest-unstable
33+
VERSION="latest-unstable"
34+
else
35+
# For manual triggers from other branches and will not publish any image
36+
VERSION="test-build"
37+
fi
38+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
2939
id: extract_version
3040
outputs:
3141
VERSION: ${{ steps.extract_version.outputs.VERSION }}
@@ -40,11 +50,11 @@ jobs:
4050
- arch: amd64
4151
rust_target: x86_64-unknown-linux-gnu
4252
platform: linux/amd64
43-
runner: ubuntu-latest
53+
runner: ubuntu-22.04
4454
- arch: arm64
4555
rust_target: aarch64-unknown-linux-gnu
4656
platform: linux/arm64
47-
runner: ubuntu-24.04-arm
57+
runner: ubuntu-22.04-arm
4858
runs-on: ${{ matrix.runner }}
4959
steps:
5060
- uses: actions/checkout@v4
@@ -56,7 +66,7 @@ jobs:
5666

5767
- name: Verify reproducible builds (${{ matrix.arch }})
5868
run: |
59-
echo "🔄 Verifying reproducible builds for ${{ matrix.arch }}..."
69+
echo "Verifying reproducible builds for ${{ matrix.arch }}..."
6070
6171
# Build first image
6272
echo "=== Building first verification image ==="
@@ -92,10 +102,10 @@ jobs:
92102
echo "Build 2 SHA256: $(sha256sum lighthouse-2-${{ matrix.arch }})"
93103
94104
if cmp lighthouse-1-${{ matrix.arch }} lighthouse-2-${{ matrix.arch }}; then
95-
echo "Reproducible build verified for ${{ matrix.arch }}"
105+
echo "Reproducible build verified for ${{ matrix.arch }}"
96106
else
97-
echo "Reproducible build FAILED for ${{ matrix.arch }}"
98-
echo "🚨 BLOCKING RELEASE: Builds are not reproducible!"
107+
echo "Reproducible build FAILED for ${{ matrix.arch }}"
108+
echo "BLOCKING RELEASE: Builds are not reproducible!"
99109
echo "First 10 differences:"
100110
cmp -l lighthouse-1-${{ matrix.arch }} lighthouse-2-${{ matrix.arch }} | head -10
101111
exit 1
@@ -110,24 +120,24 @@ jobs:
110120
FINAL_TAG="${{ env.DOCKER_REPRODUCIBLE_IMAGE_NAME }}:${VERSION}-${{ matrix.arch }}"
111121
docker tag lighthouse-verify-2-${{ matrix.arch }} "$FINAL_TAG"
112122
113-
echo "Image ready for publishing: $FINAL_TAG"
123+
echo "Image ready for publishing: $FINAL_TAG"
114124
115125
- name: Log in to Docker Hub
116-
if: ${{ github.event.inputs.dry_run != 'true' }}
126+
if: ${{ github.event_name != 'workflow_dispatch' }}
117127
uses: docker/login-action@v3
118128
with:
119129
username: ${{ env.DOCKER_USERNAME }}
120130
password: ${{ env.DOCKER_PASSWORD }}
121131

122132
- name: Push verified image (${{ matrix.arch }})
123-
if: ${{ github.event.inputs.dry_run != 'true' }}
133+
if: ${{ github.event_name != 'workflow_dispatch' }}
124134
run: |
125135
VERSION=${{ needs.extract-version.outputs.VERSION }}
126136
IMAGE_TAG="${{ env.DOCKER_REPRODUCIBLE_IMAGE_NAME }}:${VERSION}-${{ matrix.arch }}"
127137
128-
echo "📤 Pushing verified reproducible image: $IMAGE_TAG"
138+
echo "Pushing verified reproducible image: $IMAGE_TAG"
129139
docker push "$IMAGE_TAG"
130-
echo "Successfully pushed $IMAGE_TAG"
140+
echo "Successfully pushed $IMAGE_TAG"
131141
132142
- name: Clean up local images
133143
run: |
@@ -145,9 +155,9 @@ jobs:
145155
146156
create-manifest:
147157
name: create multi-arch manifest
148-
runs-on: ubuntu-latest
158+
runs-on: ubuntu-22.04
149159
needs: [extract-version, verify-and-build]
150-
if: ${{ github.event.inputs.dry_run != 'true' }}
160+
if: ${{ github.event_name != 'workflow_dispatch' }}
151161
steps:
152162
- name: Log in to Docker Hub
153163
uses: docker/login-action@v3
@@ -160,88 +170,14 @@ jobs:
160170
IMAGE_NAME=${{ env.DOCKER_REPRODUCIBLE_IMAGE_NAME }}
161171
VERSION=${{ needs.extract-version.outputs.VERSION }}
162172
163-
echo "🔗 Creating multi-arch manifest for $IMAGE_NAME:$VERSION"
173+
echo "Creating multi-arch manifest for $IMAGE_NAME:$VERSION"
164174
165-
# Create manifest for version tag
175+
# Create manifest for the version tag
166176
docker manifest create \
167177
${IMAGE_NAME}:${VERSION} \
168178
${IMAGE_NAME}:${VERSION}-amd64 \
169179
${IMAGE_NAME}:${VERSION}-arm64
170180
171181
docker manifest push ${IMAGE_NAME}:${VERSION}
172182
173-
# Create manifest for latest tag
174-
docker manifest create \
175-
${IMAGE_NAME}:latest \
176-
${IMAGE_NAME}:${VERSION}-amd64 \
177-
${IMAGE_NAME}:${VERSION}-arm64
178-
179-
docker manifest push ${IMAGE_NAME}:latest
180-
181-
echo "✅ Multi-arch manifests published:"
182-
echo " - ${IMAGE_NAME}:${VERSION}"
183-
echo " - ${IMAGE_NAME}:latest"
184-
185-
release-summary:
186-
name: release summary
187-
runs-on: ubuntu-latest
188-
needs: [extract-version, verify-and-build, create-manifest]
189-
if: always()
190-
steps:
191-
- name: Report release results
192-
run: |
193-
VERSION=${{ needs.extract-version.outputs.VERSION }}
194-
IMAGE_NAME=${{ env.DOCKER_REPRODUCIBLE_IMAGE_NAME }}
195-
196-
echo "## 🚀 Reproducible Release Summary for ${VERSION}"
197-
echo ""
198-
199-
if [[ "${{ needs.verify-and-build.result }}" == "success" ]]; then
200-
echo "✅ **Reproducibility Verification & Build**: SUCCESS"
201-
echo "- All architectures produce identical binaries"
202-
echo "- Images built and ready for publishing"
203-
else
204-
echo "❌ **Reproducibility Verification & Build**: FAILED"
205-
echo "- Builds are not reproducible OR build failed"
206-
echo "- Release was blocked"
207-
fi
208-
209-
echo ""
210-
if [[ "${{ github.event.inputs.dry_run }}" == "true" ]]; then
211-
echo "🧪 **Mode**: DRY RUN"
212-
echo "- Images were built and verified but NOT pushed"
213-
echo "- Ready for real release"
214-
elif [[ "${{ needs.create-manifest.result }}" == "success" ]]; then
215-
echo "✅ **Publication**: SUCCESS"
216-
echo "- Images published to Docker Hub"
217-
echo "- Multi-arch manifests created"
218-
echo ""
219-
echo "### 📦 Published Images"
220-
echo "- \`${IMAGE_NAME}:${VERSION}\`"
221-
echo "- \`${IMAGE_NAME}:latest\`"
222-
echo ""
223-
echo "### 🏗️ Architectures"
224-
echo "- linux/amd64 (\`${IMAGE_NAME}:${VERSION}-amd64\`)"
225-
echo "- linux/arm64 (\`${IMAGE_NAME}:${VERSION}-arm64\`)"
226-
else
227-
echo "❌ **Publication**: FAILED"
228-
echo "- Images were verified but failed to publish"
229-
fi
230-
231-
echo ""
232-
if [[ "${{ needs.verify-and-build.result }}" == "success" ]] && [[ "${{ needs.create-manifest.result }}" == "success" ]] && [[ "${{ github.event.inputs.dry_run }}" != "true" ]]; then
233-
echo "🎉 **Overall**: Secure release completed successfully!"
234-
echo ""
235-
echo "### 🔒 Security Guarantees"
236-
echo "- ✅ Reproducible builds verified"
237-
echo "- ✅ Identical binaries across architectures"
238-
echo "- ✅ No build artifacts tampering"
239-
echo "- ✅ Deterministic build process"
240-
elif [[ "${{ github.event.inputs.dry_run }}" == "true" ]]; then
241-
echo "🧪 **Overall**: Dry run completed successfully!"
242-
echo "- Reproducibility verified ✅"
243-
echo "- Ready for real release ✅"
244-
else
245-
echo "🚨 **Overall**: Release failed or incomplete"
246-
echo "- Check logs above for details"
247-
fi
183+
echo "Published: ${IMAGE_NAME}:${VERSION}"

.github/workflows/local-testnet.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
dockerfile-ubuntu:
17-
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
17+
runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
1818
steps:
1919
- uses: actions/checkout@v5
2020

@@ -31,7 +31,7 @@ jobs:
3131
retention-days: 3
3232

3333
run-local-testnet:
34-
runs-on: ubuntu-22.04
34+
runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
3535
needs: dockerfile-ubuntu
3636
steps:
3737
- uses: actions/checkout@v5
@@ -89,7 +89,7 @@ jobs:
8989
${{ steps.assertoor_test_result.outputs.failed_test_details }}
9090
EOF
9191
)
92-
92+
9393
echo "Test Result: $test_result"
9494
echo "$test_status"
9595
if ! [ "$test_result" == "success" ]; then
@@ -100,7 +100,7 @@ jobs:
100100
101101
doppelganger-protection-success-test:
102102
needs: dockerfile-ubuntu
103-
runs-on: ubuntu-22.04
103+
runs-on: ubuntu-latest
104104
steps:
105105
- uses: actions/checkout@v5
106106

@@ -136,7 +136,7 @@ jobs:
136136

137137
doppelganger-protection-failure-test:
138138
needs: dockerfile-ubuntu
139-
runs-on: ubuntu-22.04
139+
runs-on: ubuntu-latest
140140
steps:
141141
- uses: actions/checkout@v5
142142

@@ -173,7 +173,7 @@ jobs:
173173
# Tests checkpoint syncing to a live network (current fork) and a running devnet (usually next scheduled fork)
174174
checkpoint-sync-test:
175175
name: checkpoint-sync-test-${{ matrix.network }}
176-
runs-on: ubuntu-latest
176+
runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
177177
needs: dockerfile-ubuntu
178178
if: contains(github.event.pull_request.labels.*.name, 'syncing')
179179
continue-on-error: true
@@ -216,7 +216,7 @@ jobs:
216216
# Test syncing from genesis on a local testnet. Aims to cover forward syncing both short and long distances.
217217
genesis-sync-test:
218218
name: genesis-sync-test-${{ matrix.fork }}-${{ matrix.offline_secs }}s
219-
runs-on: ubuntu-latest
219+
runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
220220
needs: dockerfile-ubuntu
221221
strategy:
222222
matrix:
@@ -259,7 +259,7 @@ jobs:
259259
# a PR is safe to merge. New jobs should be added here.
260260
local-testnet-success:
261261
name: local-testnet-success
262-
runs-on: ubuntu-latest
262+
runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
263263
needs: [
264264
'dockerfile-ubuntu',
265265
'run-local-testnet',
@@ -272,4 +272,4 @@ jobs:
272272
- name: Check that success job is dependent on all others
273273
run: |
274274
exclude_jobs='checkpoint-sync-test'
275-
./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success "$exclude_jobs"
275+
./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success "$exclude_jobs"

.github/workflows/release.yml

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
matrix:
3333
arch: [aarch64-unknown-linux-gnu,
3434
x86_64-unknown-linux-gnu,
35-
aarch64-apple-darwin,
36-
x86_64-windows]
35+
aarch64-apple-darwin]
3736
include:
3837
- arch: aarch64-unknown-linux-gnu
3938
runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
@@ -44,9 +43,6 @@ jobs:
4443
- arch: aarch64-apple-darwin
4544
runner: macos-14
4645
profile: maxperf
47-
- arch: x86_64-windows
48-
runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
49-
profile: maxperf
5046

5147
runs-on: ${{ matrix.runner }}
5248
needs: extract-version
@@ -57,19 +53,6 @@ jobs:
5753
if: env.SELF_HOSTED_RUNNERS == 'false'
5854
run: rustup update stable
5955

60-
# ==============================
61-
# Windows dependencies
62-
# ==============================
63-
64-
- uses: KyleMayes/install-llvm-action@v1
65-
if: env.SELF_HOSTED_RUNNERS == 'false' && startsWith(matrix.arch, 'x86_64-windows')
66-
with:
67-
version: "17.0"
68-
directory: ${{ runner.temp }}/llvm
69-
- name: Set LIBCLANG_PATH
70-
if: startsWith(matrix.arch, 'x86_64-windows')
71-
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
72-
7356
# ==============================
7457
# Builds
7558
# ==============================
@@ -94,12 +77,7 @@ jobs:
9477
if: matrix.arch == 'aarch64-apple-darwin'
9578
run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
9679

97-
- name: Build Lighthouse for Windows
98-
if: matrix.arch == 'x86_64-windows'
99-
run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
100-
10180
- name: Configure GPG and create artifacts
102-
if: startsWith(matrix.arch, 'x86_64-windows') != true
10381
env:
10482
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
10583
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
@@ -118,20 +96,6 @@ jobs:
11896
done
11997
mv *tar.gz* ..
12098
121-
- name: Configure GPG and create artifacts Windows
122-
if: startsWith(matrix.arch, 'x86_64-windows')
123-
env:
124-
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
125-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
126-
run: |
127-
echo $env:GPG_SIGNING_KEY | gpg --batch --import
128-
mkdir artifacts
129-
move $env:USERPROFILE/.cargo/bin/lighthouse.exe ./artifacts
130-
cd artifacts
131-
tar -czf lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz lighthouse.exe
132-
gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
133-
move *tar.gz* ..
134-
13599
# =======================================================================
136100
# Upload artifacts
137101
# This is required to share artifacts between different jobs
@@ -239,7 +203,6 @@ jobs:
239203
| <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cdn.simpleicons.org/apple/white" > <source media="(prefers-color-scheme: light)" srcset="https://cdn.simpleicons.org/apple" ><img src="https://cdn.simpleicons.org/apple" width="32" alt="Apple logo"> </picture> | aarch64 | [lighthouse-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) |
240204
| <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cdn.simpleicons.org/linux/white" > <source media="(prefers-color-scheme: light)" srcset="https://cdn.simpleicons.org/linux/black" ><img src="https://cdn.simpleicons.org/linux" width="32" alt="Linux logo"> </picture> | x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
241205
| <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cdn.simpleicons.org/raspberrypi/white" > <source media="(prefers-color-scheme: light)" srcset="https://cdn.simpleicons.org/raspberrypi/black" > <img src="https://cdn.simpleicons.org/raspberrypi" width="32" alt="Raspberrypi logo"> </picture> | aarch64 | [lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
242-
| <picture> <source media="(prefers-color-scheme: dark)" srcset="https://upload.wikimedia.org/wikipedia/commons/8/87/Windows_logo_-_2021.svg"> <source media="(prefers-color-scheme: light)" srcset="https://upload.wikimedia.org/wikipedia/commons/c/c4/Windows_logo_-_2021_%28Black%29.svg"> <img src="https://upload.wikimedia.org/wikipedia/commons/c/c4/Windows_logo_-_2021_%28Black%29.svg" width="32" alt="Windows logo"> </picture> | x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz.asc) |
243206
| | | | |
244207
| **System** | **Option** | - | **Resource** |
245208
| <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cdn.simpleicons.org/docker/white" > <source media="(prefers-color-scheme: light)" srcset="https://cdn.simpleicons.org/docker/black" > <img src="https://cdn.simpleicons.org/docker/black" width="32" alt="Docker logo"></picture> | Docker | [${{ env.VERSION }}](https://hub.docker.com/r/${{ env.IMAGE_NAME }}/tags?page=1&ordering=last_updated&name=${{ env.VERSION }}) | [${{ env.IMAGE_NAME }}](https://hub.docker.com/r/${{ env.IMAGE_NAME }}) |

0 commit comments

Comments
 (0)