Skip to content

Commit

Permalink
Merge pull request #4666 from harmony-one/dev
Browse files Browse the repository at this point in the history
Release Candidate ( main <- dev ) v2024.2.0
  • Loading branch information
sophoah authored Aug 30, 2024
2 parents b3aebb6 + 4e50bbc commit 787fc7b
Show file tree
Hide file tree
Showing 116 changed files with 2,825 additions and 1,717 deletions.
17 changes: 15 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
*
!scripts/docker
harmony_db*
bin
cache
.DS_Store
*.log
log-*
tmp_log
*.rlp
**/*.rlp
.hmykey
db-127.0.0.1-*
db*
.dht
.dht-*
explorer_storage_*
10 changes: 6 additions & 4 deletions .github/workflows/ci-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Manual release harmony (need tag)

on:
on:
workflow_dispatch:
inputs:
tag:
decription: 'tag value to create the release'
tag:
description: 'tag value to create the release'
required: true

jobs:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
run: |
mv $GITHUB_WORKSPACE/harmony-amd64 ./scripts/docker/harmony
working-directory: harmony

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -170,6 +170,8 @@ jobs:
context: ./harmony/scripts/docker
file: ./harmony/scripts/docker/Dockerfile
push: true
build-args: |
BUILD_BRANCH=${{ github.ref_name }}
tags: |
harmonyone/harmony:${{ github.event.inputs.tag }}
harmonyone/harmony:${{ env.build_version }}-${{ env.build_release }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
run: |
mv $GITHUB_WORKSPACE/harmony-amd64 ./scripts/docker/harmony
working-directory: harmony

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -171,6 +171,8 @@ jobs:
with:
context: ./harmony/scripts/docker
file: ./harmony/scripts/docker/Dockerfile
build-args: |
BUILD_BRANCH=${{ github.ref_name }}
push: true
tags: |
harmonyone/harmony:latest
Expand Down
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ os: linux
dist: jammy
language: go
go:
- 1.19.5
- 1.22.5
go_import_path: github.com/harmony-one/harmony
cache:
directories:
Expand All @@ -14,21 +14,22 @@ env:
- TEST="bash ./scripts/travis_rosetta_checker.sh"

# upgrade docker to latest stable version
addons:
apt:
sources:
- sourceline: deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable
packages:
- docker.io
before_install:
- echo "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce

install:
# default working directory with source code is automatically set to
# /home/travis/gopath/src/github.com/harmony-one/harmony
# https://docs.travis-ci.com/user/languages/go/#go-import-path
- echo $TRAVIS_PULL_REQUEST_BRANCH
#TODO: return back to master
- TEST_REPO_BRANCH="feature/go1.22"
- git clone https://github.com/harmony-one/mcl.git $GOPATH/src/github.com/harmony-one/mcl
- git clone https://github.com/harmony-one/bls.git $GOPATH/src/github.com/harmony-one/bls
- git clone https://github.com/harmony-one/harmony-test.git $GOPATH/src/github.com/harmony-one/harmony-test
#TODO: return back harmony instead of personal fork
- git clone --branch $TEST_REPO_BRANCH https://github.com/harmony-one/harmony-test.git $GOPATH/src/github.com/harmony-one/harmony-test
- (cd $GOPATH/src/github.com/harmony-one/mcl; make -j4)
- (cd $GOPATH/src/github.com/harmony-one/bls; make BLS_SWAP_G=1 -j4)
# - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

ARG TARGETARCH
ARG GOLANG_VERSION="1.19"
ARG GOLANG_VERSION="1.22.5"

SHELL ["/bin/bash", "-c"]

Expand Down
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,25 @@ help:
@echo "test-rosetta - run the rosetta tests"
@echo "test-rosetta-attach - attach onto the rosetta testing docker container for inspection"
@echo "linux_static - static build the harmony binary & bootnode along with the MCL & BLS libs (for linux)"
@echo "linux_static_quick - static build the harmony binary & bootnode more quickly without recompiling dependencies (for linux)"
@echo "rpm_init - prepare the RPM build environment by creating directories, copying files, and generating the spec file and source tarball"
@echo "rpm_build - build an RPM package for x86_64 architecture using the spec file (<RPMBUILD>/SPECS/harmony.spec)"
@echo "rpm - build a harmony RPM pacakge"
@echo "rpmpub_dev - publish harmony RPM package to development repo"
@echo "rpmpub_prod - publish harmony RPM package to production repo"
@echo "deb_init - initialize a Debian package for Harmony, setting up necessary files and configurations in the package structure."
@echo "deb_build - build a Debian package from the <HOME>/debbuild directory"
@echo "deb - build a harmony Debian pacakge"
@echo "debpub_dev - publish harmony Debian package to development repo"
@echo "debpub_prod - publish harmony Debian package to production repo"
@echo "go-vet - run Go vet to examine Go source code in the current project for potential issues"
@echo "go-test - run all Go tests with vet checks and the race detector enabled"
@echo "docker - build a Docker image for Harmony using the project root directory's Dockerfile, pulling the latest base image"
@echo "travis_go_checker - run the Travis Go checker script to validate Go code in the project"
@echo "travis_rpc_checker - run the Travis RPC checker script, defaulting the test branch to 'master' unless overridden by TEST_REPO_BRANCH"
@echo "travis_rosetta_checker - run the Travis Rosetta checker script, defaulting the test branch to 'master' unless overridden by TEST_REPO_BRANCH"
@echo "debug_external - cleans up environment, rebuilds the binary, and deploys with external nodes"
@echo "build_localnet_validator - imports validator keys, funds validator accounts, waits for the epoch, and creates external validators on a local network"

libs:
make -C $(TOP)/mcl -j8
Expand All @@ -57,6 +70,9 @@ trace-pointer:

debug:
rm -rf .dht-127.0.0.1*
# uncomment the following lines to enable debug logging for libp2p, it produces a lot of logs, so disabled by default
#export GOLOG_LOG_LEVEL=debug
#export GOLOG_OUTPUT=stdout
bash ./test/debug.sh

debug-kill:
Expand Down Expand Up @@ -105,6 +121,9 @@ linux_static:
make -C $(TOP)/bls minimised_static BLS_SWAP_G=1 -j8
bash ./scripts/go_executable_build.sh -s

linux_static_quick:
bash ./scripts/go_executable_build.sh -s

deb_init:
rm -rf $(DEBBUILD)
mkdir -p $(DEBBUILD)/$(PKGNAME)-$(VERSION)-$(RELEASE)/{etc/systemd/system,usr/sbin,etc/sysctl.d,etc/harmony}
Expand Down Expand Up @@ -170,13 +189,20 @@ travis_go_checker:
bash ./scripts/travis_go_checker.sh

travis_rpc_checker:
# value from command line will override this value, use point test to non-default
TEST_REPO_BRANCH='master'
bash ./scripts/travis_rpc_checker.sh

travis_rosetta_checker:
# value from command line will override this value, use point test to non-default
TEST_REPO_BRANCH='master'
bash ./scripts/travis_rosetta_checker.sh

debug_external: clean
bash test/debug-external.sh

build_localnet_validator:
bash test/build-localnet-validator.sh

protofiles:
bash ./scripts/gogenerate.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ http://api.hmny.io/

## Requirements

### **Go 1.19**
### **Go 1.22.5**
### **GMP and OpenSSL**

On macOS:
Expand Down
2 changes: 1 addition & 1 deletion api/proto/message/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package message
package harmonymessage

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion api/proto/message/gen.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run --platform linux/amd64 -v ${PWD}:/tmp ${PROTOC_IMAGE} /tmp/message.proto
docker run --platform linux/amd64 -v ${PWD}:/tmp ${PROTOC_IMAGE} /tmp/harmonymessage.proto
Loading

0 comments on commit 787fc7b

Please sign in to comment.