Skip to content

Commit 9fd7800

Browse files
authored
Prepare release CI (#345)
1 parent 5c41566 commit 9fd7800

File tree

4 files changed

+24
-69
lines changed

4 files changed

+24
-69
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
env:
17-
RUST_VERSION: '1.85.1'
17+
RUST_VERSION: '1.87.0'
1818
# Deny warnings in CI
1919
RUSTFLAGS: "-D warnings -C debuginfo=0"
2020
# Prevent Github API rate limiting
@@ -72,6 +72,8 @@ jobs:
7272
${{ env.IMAGE_NAME }}:${{ env.VERSION }}${{ env.VERSION_SUFFIX}}-${{ matrix.target.docker-arch }}
7373
build-args: |
7474
RUST_VERSION=${{ env.RUST_VERSION }}
75+
PROFILE={{ matrix.profile }}
76+
FEATURES=portable
7577
7678
docker-multiarch-manifest:
7779
name: docker-multiarch-manifest

.github/workflows/release.yml

Lines changed: 18 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: Setup release pipeline
21
name: Release Suite
32

43
on:
@@ -11,12 +10,8 @@ concurrency:
1110
cancel-in-progress: true
1211

1312
env:
14-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
15-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
1613
REPO_NAME: ${{ github.repository_owner }}/anchor
1714
IMAGE_NAME: ${{ github.repository_owner }}/anchor
18-
# Enable self-hosted runners for the sigp repo only.
19-
SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/anchor' }}
2015

2116
jobs:
2217
extract-version:
@@ -29,20 +24,20 @@ jobs:
2924
arch: [aarch64-unknown-linux-gnu,
3025
x86_64-unknown-linux-gnu,
3126
x86_64-apple-darwin,
32-
x86_64-windows]
27+
aarch64-apple-darwin]
3328

3429
include:
3530
- arch: aarch64-unknown-linux-gnu
36-
runner: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-22.04' }}
31+
runner: 'ubuntu-24.04'
3732
profile: maxperf
3833
- arch: x86_64-unknown-linux-gnu
39-
runner: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-22.04' }}
34+
runner: 'ubuntu-24.04'
4035
profile: maxperf
4136
- arch: x86_64-apple-darwin
4237
runner: macos-13
4338
profile: maxperf
44-
- arch: x86_64-windows
45-
runner: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
39+
- arch: aarch64-apple-darwin
40+
runner: macos-14
4641
profile: maxperf
4742

4843
runs-on: ${{ matrix.runner }}
@@ -51,22 +46,8 @@ jobs:
5146
- name: Checkout sources
5247
uses: actions/checkout@v4
5348
- name: Get latest version of stable Rust
54-
if: env.SELF_HOSTED_RUNNERS == 'false'
5549
run: rustup update stable
5650

57-
# ==============================
58-
# Windows dependencies
59-
# ==============================
60-
61-
- uses: KyleMayes/install-llvm-action@v1
62-
if: env.SELF_HOSTED_RUNNERS == 'false' && startsWith(matrix.arch, 'x86_64-windows')
63-
with:
64-
version: "17.0"
65-
directory: ${{ runner.temp }}/llvm
66-
- name: Set LIBCLANG_PATH
67-
if: startsWith(matrix.arch, 'x86_64-windows')
68-
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
69-
7051
# ==============================
7152
# Builds
7253
# ==============================
@@ -89,14 +70,13 @@ jobs:
8970

9071
- name: Build Anchor for x86_64-apple-darwin
9172
if: matrix.arch == 'x86_64-apple-darwin'
92-
run: cargo install --path anchor --force --locked --profile ${{ matrix.profile }}
73+
run: cargo install --path anchor --force --locked --features portable --profile ${{ matrix.profile }}
9374

94-
- name: Build Anchor for Windows
95-
if: matrix.arch == 'x86_64-windows'
96-
run: cargo install --path anchor --force --locked --profile ${{ matrix.profile }}
75+
- name: Build Anchor for aarch64-apple-darwin
76+
if: matrix.arch == 'aarch64-apple-darwin'
77+
run: cargo install --path anchor --force --locked --features portable --profile ${{ matrix.profile }}
9778

9879
- name: Configure GPG and create artifacts
99-
if: startsWith(matrix.arch, 'x86_64-windows') != true
10080
env:
10181
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
10282
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
@@ -115,20 +95,6 @@ jobs:
11595
done
11696
mv *tar.gz* ..
11797
118-
- name: Configure GPG and create artifacts Windows
119-
if: startsWith(matrix.arch, 'x86_64-windows')
120-
env:
121-
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
122-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
123-
run: |
124-
echo $env:GPG_SIGNING_KEY | gpg --batch --import
125-
mkdir artifacts
126-
move $env:USERPROFILE/.cargo/bin/anchor.exe ./artifacts
127-
cd artifacts
128-
tar -czf anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz anchor.exe
129-
gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
130-
move *tar.gz* ..
131-
13298
# =======================================================================
13399
# Upload artifacts
134100
# This is required to share artifacts between different jobs
@@ -151,7 +117,7 @@ jobs:
151117
draft-release:
152118
name: Draft Release
153119
needs: [build, extract-version]
154-
runs-on: ubuntu-22.04
120+
runs-on: ubuntu-24.04
155121
env:
156122
VERSION: ${{ needs.extract-version.outputs.VERSION }}
157123
steps:
@@ -187,13 +153,12 @@ jobs:
187153
# The formatting here is borrowed from OpenEthereum: https://github.com/openethereum/openethereum/blob/main/.github/workflows/build.yml
188154
run: |
189155
body=$(cat <<- "ENDBODY"
190-
<Rick and Morty character>
156+
<Boat type>
191157
192158
## Testing Checklist (DELETE ME)
193159
194-
- [ ] Run on synced Holesky Sigma Prime nodes.
195-
- [ ] Run on synced Canary (mainnet) Sigma Prime nodes.
196-
- [ ] Resync a Holesky node.
160+
- [ ] Run on synced Anchor Interop Sigma Prime nodes.
161+
- [ ] Resync a Hoodi node.
197162
- [ ] Resync a mainnet node.
198163
199164
## Release Checklist (DELETE ME)
@@ -208,19 +173,6 @@ jobs:
208173
209174
Add a summary.
210175
211-
## Update Priority
212-
213-
This table provides priorities for which classes of users should update particular components.
214-
215-
|User Class |Beacon Node | Validator Client|
216-
--- | --- | ---
217-
|Staking Users| <TODO> | <TODO> |
218-
|Non-Staking Users| <TODO>|---|
219-
220-
*See [Update
221-
Priorities](https://anchor-book.sigmaprime.io/installation-priorities.html)
222-
more information about this table.*
223-
224176
## All Changes
225177
226178
${{ steps.changelog.outputs.CHANGELOG }}
@@ -233,13 +185,13 @@ jobs:
233185
234186
| System | Architecture | Binary | PGP Signature |
235187
|:---:|:---:|:---:|:---|
236-
| <img src="https://simpleicons.org/icons/apple.svg" style="width: 32px;"/> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) |
237-
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
238-
| <img src="https://simpleicons.org/icons/raspberrypi.svg" style="width: 32px;"/> | aarch64 | [anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
239-
| <img src="https://upload.wikimedia.org/wikipedia/commons/c/c4/Windows_logo_-_2021_%28Black%29.svg" style="width: 32px;"/> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-windows.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-windows.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-windows.tar.gz.asc) |
188+
| <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> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) |
189+
| <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 | [anchor-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) |
190+
| <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 | [anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
191+
| <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 | [anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
240192
| | | | |
241193
| **System** | **Option** | - | **Resource** |
242-
| <img src="https://simpleicons.org/icons/docker.svg" style="width: 32px;"/> | 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 }}) |
194+
| <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 }}) |
243195
ENDBODY
244196
)
245197
assets=(./anchor-*.tar.gz*/anchor-*.tar.gz*)

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ install:
4545
#
4646
# The resulting binaries will be created in the `target/` directory.
4747
build-x86_64:
48-
cross build --target x86_64-unknown-linux-gnu --features "$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
48+
cross build --bin anchor --target x86_64-unknown-linux-gnu --features "portable,$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
4949
build-aarch64:
50-
cross build --target aarch64-unknown-linux-gnu --features "$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
50+
cross build --bin anchor --target aarch64-unknown-linux-gnu --features "portable,$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
5151

5252
# Create a `.tar.gz` containing a binary for a specific target.
5353
define tarball_release_binary

anchor/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.1.0"
44
edition = { workspace = true }
55
authors = ["Sigma Prime <contact@sigmaprime.io>"]
66
rust-version = "1.85.0"
7+
default-run = "anchor"
78

89
[features]
910
# Compiles the BLS crypto code so that the binary is portable across machines.

0 commit comments

Comments
 (0)