Skip to content

Commit

Permalink
Fix macos build (#442)
Browse files Browse the repository at this point in the history
* Fix macos build

* Upd version

* Fix psycopg

* Revert "Fix psycopg"

This reverts commit b1e1ec3.

* Add libpq

* Add brew link

* Set version v2.2.1
  • Loading branch information
evgeny-stakewise authored Dec 23, 2024
1 parent ec6cfa4 commit 70920fe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256;
- OS: macos-12
- OS: macos-13
PYTHON_VERSION: 3.10.14
BUILD_CMD: |
export PYTHONHASHSEED=42
Expand Down Expand Up @@ -102,12 +102,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install build dependencies
- name: Install build dependencies for Linux
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y build-essential curl libpq-dev postgresql-client
if: matrix.os == 'linux-arm-runner'

- name: Install build dependencies for MacOS
run: |
brew install libpq
brew link --force libpq
if: matrix.os == 'macos-13'

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.PYTHON_VERSION }}
Expand Down Expand Up @@ -162,7 +168,7 @@ jobs:
/tmp/artifacts/ubuntu-20.04/operator-${{ steps.get_version.outputs.VERSION }}-linux-amd64.sha256
/tmp/artifacts/linux-arm-runner/operator-${{ steps.get_version.outputs.VERSION }}-linux-arm64.tar.gz
/tmp/artifacts/linux-arm-runner/operator-${{ steps.get_version.outputs.VERSION }}-linux-arm64.sha256
/tmp/artifacts/macos-12/operator-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
/tmp/artifacts/macos-12/operator-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.sha256
/tmp/artifacts/macos-13/operator-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
/tmp/artifacts/macos-13/operator-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.sha256
/tmp/artifacts/windows-latest/operator-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
/tmp/artifacts/windows-latest/operator-${{ steps.get_version.outputs.VERSION }}-windows-amd64.sha256
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ Head to [Usage](#usage) to launch your operator service.
Pull the latest docker operator docker image:

```bash
docker pull europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.0
docker pull europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.1
```

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

```bash
docker build --pull -t europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.0 .
docker build --pull -t europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.1 .
```

You will execute Operator Service commands using the format below (note the use of flags are optional):
Expand All @@ -170,7 +170,7 @@ You will execute Operator Service commands using the format below (note the use
docker run --rm -ti \
-u $(id -u):$(id -g) \
-v ~/.stakewise/:/data \
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.0 \
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.1 \
src/main.py COMMAND \
--flagA=123 \
--flagB=xyz
Expand Down Expand Up @@ -393,7 +393,7 @@ below:
docker run --restart on-failure:10 \
-u $(id -u):$(id -g) \
-v ~/.stakewise/:/data \
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.0 \
europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:v2.2.1 \
src/main.py start \
--vault=0x3320ad928c20187602a2b2c04eeaa813fa899468 \
--data-dir=/data \
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "v3-operator"
version = "v2.2.0"
version = "v2.2.1"
description = "StakeWise operator service for registering vault validators"
authors = ["StakeWise Labs <info@stakewise.io>"]
package-mode = false
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ http_copy() {
github_release() {
owner_repo=$1
version=$2
test -z "$version" && version="v2.2.0"
test -z "$version" && version="v2.2.1"
giturl="https://github.com/${owner_repo}/releases/${version}"
json=$(http_copy "$giturl" "Accept:application/json")
test -z "$json" && return 1
Expand Down

0 comments on commit 70920fe

Please sign in to comment.