Skip to content

Commit b42b462

Browse files
Fix release binary builds (Windows, Linux, macOS) (#730)
* Fix Windows release build: install poetry via pipx, fix matrix.OS casing * Bump v4.1.13.dev1 * Revert pipx, fix windows path explicitly * Bump v4.1.13.dev2 * Try another path * Bump v4.1.13.dev3 * Try 3 * Bump v4.1.13.dev4 * Install rust on windows * Bump v4.1.13.dev5 * Add rust toolchain * Bump v4.1.13.dev6 * Drop tomli, use stdlib tomllib * Bump v4.1.13.dev7 * Fix lint * Ignore disputed pyjwt vuln PYSEC-2025-183 in pip-audit * Bump base image to python:3.12.13-slim-bookworm * Bump v4.1.13 * Bump v4.1.13 everywhere * Revert "Bump base image to python:3.12.13-slim-bookworm" This reverts commit 9da28a4. * Revert "Ignore disputed pyjwt vuln PYSEC-2025-183 in pip-audit" This reverts commit 54e928a.
1 parent 22632ba commit b42b462

7 files changed

Lines changed: 23 additions & 80 deletions

File tree

.github/workflows/release.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,18 @@ jobs:
145145
- name: Checkout code
146146
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
147147

148-
- name: Install build dependencies for Linux
148+
- name: Install build dependencies for Linux arm
149149
run: |
150150
sudo apt-get update
151151
sudo apt-get install --no-install-recommends -y build-essential curl libpq-dev postgresql-client
152-
if: matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'ubuntu-22.04-arm'
152+
if: matrix.OS == 'ubuntu-24.04-arm' || matrix.OS == 'ubuntu-22.04-arm'
153153

154154
- name: Install build dependencies for MacOS
155155
run: |
156156
brew install libpq
157157
brew link --force libpq
158158
brew install openssl@3.0
159-
if: matrix.os == 'macos-14'
159+
if: matrix.OS == 'macos-14'
160160

161161
- name: Set up python
162162
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -168,6 +168,17 @@ jobs:
168168
with:
169169
version: "1.8.3"
170170

171+
- name: Fix Poetry PATH (Windows)
172+
if: matrix.OS == 'windows-latest'
173+
run: echo "$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
174+
shell: pwsh
175+
176+
- name: Install Rust toolchain (Windows)
177+
if: matrix.OS == 'windows-latest'
178+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
179+
with:
180+
toolchain: stable
181+
171182
- name: Install dependencies
172183
run: poetry install --with build --without dev --no-interaction --no-root
173184
env:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ operator COMMAND --flagA=123 --flagB=xyz
9898
Pull the latest docker Operator docker image:
9999

100100
```bash
101-
docker pull europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v4.1.12
101+
docker pull europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v4.1.13
102102
```
103103

104104
You can also build the docker image from source by cloning this repo and executing the following command from within
105105
the `v3-operator` folder:
106106

107107
```bash
108-
docker build --pull -t europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v4.1.12 .
108+
docker build --pull -t europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v4.1.13 .
109109
```
110110

111111
You will execute Operator Service commands using the format below (note the use of flags are optional):
@@ -114,7 +114,7 @@ You will execute Operator Service commands using the format below (note the use
114114
docker run --rm -ti \
115115
-u $(id -u):$(id -g) \
116116
-v ~/.stakewise/:/data \
117-
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v4.1.12 \
117+
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v4.1.13 \
118118
src/main.py COMMAND \
119119
--flagA=123 \
120120
--flagB=xyz

operator.spec

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- mode: python ; coding: utf-8 -*-
2-
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata
2+
from PyInstaller.utils.hooks import collect_data_files, copy_metadata
33
from sys import platform
44

55
datas = [
@@ -22,16 +22,6 @@ hiddenimports = [
2222
'multiaddr.codecs.domain',
2323
]
2424

25-
# tomli
26-
hiddenimports += [
27-
'ddc459050edb75a05942__mypyc', # MacOS
28-
'7bce59c0a152c0e01f70__mypyc', # Ubuntu-22 (both arm and amd64)
29-
'9deb819a160db3cef497__mypyc', # Ubuntu-24 arm
30-
'3c22db458360489351e4__mypyc', # Windows
31-
'__future__'
32-
]
33-
hiddenimports += collect_submodules('tomli')
34-
3525
a = Analysis(
3626
['src/main.py'],
3727
pathex=[],

poetry.lock

Lines changed: 1 addition & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "v3-operator"
3-
version = "v4.1.12"
3+
version = "v4.1.13"
44
description = "StakeWise operator service for registering vault validators"
55
authors = ["StakeWise Labs <info@stakewise.io>"]
66
package-mode = false
@@ -13,7 +13,6 @@ sw-utils = {git = "https://github.com/stakewise/sw-utils.git", rev = "v0.12.12"}
1313
staking-deposit = { git = "https://github.com/ethereum/staking-deposit-cli.git", rev = "v2.8.0" }
1414
pycryptodomex = "3.19.1"
1515
click = "==8.2.1"
16-
tomli = "~2"
1716
eciespy = "==0.4.3"
1817
prometheus-client = "==0.17.1"
1918
psycopg2 = "==2.9.9"

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ http_copy() {
288288
github_release() {
289289
owner_repo=$1
290290
version=$2
291-
test -z "$version" && version="v4.1.12"
291+
test -z "$version" && version="v4.1.13"
292292
giturl="https://github.com/${owner_repo}/releases/${version}"
293293
json=$(http_copy "$giturl" "Accept:application/json")
294294
test -z "$json" && return 1

src/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
import tomllib
12
from pathlib import Path
23

3-
import tomli
4-
54

65
def _get_project_meta() -> dict:
76
toml_path = Path(__file__).parents[1].joinpath('pyproject.toml')
87

98
with toml_path.open(mode='rb') as pyproject:
10-
return tomli.load(pyproject)['tool']['poetry']
9+
return tomllib.load(pyproject)['tool']['poetry']
1110

1211

1312
__version__ = _get_project_meta()['version']

0 commit comments

Comments
 (0)