-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First public commit for River project
- Loading branch information
0 parents
commit 573521c
Showing
970 changed files
with
254,455 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,json,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dev-dist | ||
dist | ||
node_modules | ||
docs | ||
storybook-static | ||
|
||
servers/ | ||
contracts/lib/ | ||
|
||
infra/ | ||
|
||
vite.config.ts | ||
|
||
.yarn/* | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
849aff8b3da071a1bd3afbea6be9868827bb0c6f |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
## | ||
## "Code Owners" is an unfortunate name, as we do not encourage "ownership" | ||
## of code per se. | ||
## | ||
## Please add your name here if you would like to be notified any time | ||
## a change is made in a particular file or folder. | ||
## | ||
## We do this to help individuals keep their mental model of the codebase | ||
## up to date, and to make sure everyone who wants to be part of the conversation | ||
## is automagically added to the it. | ||
## | ||
## We do not do this to create dictators, benevolent or otherwise. | ||
## | ||
## IMPORTANT - If you add yourself as a code owner, please take it upon yourself | ||
## to review code at minimum, at the beginning, and end, of each work day. | ||
## Please either comment, approve, request changes, or remove yourself as a reviewer. | ||
## The SLA on reviews is 24 hours. After 24 hours a PR without comments will be | ||
## considered defacto approved and can be committed. However feedback can come | ||
## at any time! We are an asynchronous team of imperfect humans. If anyone, code | ||
## owner or otherwise, comments on your code at any time, please assume the best | ||
## intentions and respond with care and consideration. | ||
## | ||
## To see reviews that are waiting for your attention, | ||
## please visit: https://github.com/HereNotThere/harmony/pulls?q=is%3Apr+is%3Aopen+user-review-requested%3A%40me | ||
## | ||
|
||
/core/ @sergekh2 | ||
/.github/ @mechanical-turk | ||
/infra @mechanical-turk | ||
turbo.json @mechanical-turk | ||
/contracts/src/node-network @mechanical-turk | ||
/core/sdk/src/stream* @erikolsson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' # See documentation for possible values | ||
directory: '/' # Location of package manifests | ||
schedule: | ||
interval: 'weekly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Based on https://github.com/docker/build-push-action | ||
|
||
name: 'Build River Docker Image' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: # A build was manually requested | ||
inputs: | ||
release_version: | ||
description: 'The release version to use for the image (optional)' | ||
required: false # This is no longer required, so that we can promote existing images to `mainnet`, `testnet`, `stable` etc. | ||
additional_tags_csv: | ||
description: 'Comma separated list of tags to apply to the image (optional)' | ||
required: false | ||
|
||
env: | ||
DOCKER_NAMESPACE: herenotthere | ||
GHCR_NAMESPACE: herenotthere | ||
PLATFORMS: linux/amd64,linux/arm64 | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL || secrets.SLACK_CD_WORKFLOW_WEBHOOK_URL }} | ||
|
||
jobs: | ||
build: | ||
name: Build docker image | ||
|
||
runs-on: ubuntu-latest-8-cores | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-aws-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
with: | ||
registry-type: 'public' | ||
|
||
- name: Build and push image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-aws-ecr.outputs.registry }} | ||
#This can be custom alias once requested to aws and approved for public repo | ||
REGISTRY_ALIAS: h5v6m2x1 | ||
ECR_REPOSITORY: river | ||
RELEASE_VERSION: ${{ inputs.release_version }} | ||
ADDITIONAL_TAGS: ${{ inputs.additional_tags_csv }} | ||
working-directory: ./core | ||
run: | | ||
COMMIT_HASH=$(git describe --tags --always --dirty) | ||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
TAGS=($COMMIT_HASH) | ||
# if release version is not provided, we set it to "unset" | ||
if [ -z "$RELEASE_VERSION" ]; then | ||
RELEASE_VERSION="unset" | ||
else | ||
# If this is a release, we also tag the image with the release version. | ||
TAGS+=($RELEASE_VERSION) | ||
fi | ||
# If this is a push to main, we also tag the image as dev, | ||
# But RELEASE_VERSION remains untouched, as `dev` is not a version, but just a tag. | ||
if [ "$BRANCH" == "main" ] && [ "${{ github.event_name }}" == "push" ]; then | ||
TAGS+=(dev) | ||
fi | ||
# Add additional tags if provided | ||
if [ -n "$ADDITIONAL_TAGS" ]; then | ||
IFS=',' read -ra ADDITIONAL_TAGS_ARRAY <<< "$ADDITIONAL_TAGS" | ||
for tag in "${ADDITIONAL_TAGS_ARRAY[@]}"; do | ||
TAGS+=($tag) | ||
done | ||
fi | ||
echo "Building image with the following tags: ${TAGS[@]}" | ||
echo "Commit hash: $COMMIT_HASH" | ||
echo "Branch: $BRANCH" | ||
echo "Release version: $RELEASE_VERSION" | ||
docker build \ | ||
--build-arg GIT_SHA=${{ github.sha }} \ | ||
--build-arg VER_VERSION=$RELEASE_VERSION \ | ||
--build-arg VER_BRANCH=$BRANCH \ | ||
--build-arg VER_COMMIT=$COMMIT_HASH \ | ||
-t river:local-latest \ | ||
. | ||
for tag in "${TAGS[@]}"; do | ||
docker tag river:local-latest $ECR_REGISTRY/$REGISTRY_ALIAS/$ECR_REPOSITORY:$tag | ||
docker push $ECR_REGISTRY/$REGISTRY_ALIAS/$ECR_REPOSITORY:$tag | ||
done | ||
# If action failed, we send a slack notification | ||
- name: Slack notification | ||
if: failure() | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"step": "Build River Docker Image", | ||
"environment": "N/", | ||
"branch": "${{ github.ref }}", | ||
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", | ||
"commit": "${{ github.sha }}", | ||
"actor": "${{ github.actor }}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Based on https://github.com/docker/build-push-action | ||
|
||
name: 'Build River Stress Test Node Docker Image' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/stress-testing/**' | ||
- 'core/**' | ||
workflow_dispatch: | ||
|
||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CD_WORKFLOW_WEBHOOK_URL }} | ||
|
||
jobs: | ||
build: | ||
name: Build docker image | ||
|
||
runs-on: ubuntu-latest-8-cores | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-aws-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
with: | ||
registry-type: 'public' | ||
|
||
- name: Build and push docker image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-aws-ecr.outputs.registry }} | ||
#This can be custom alias once requested to aws and approved for public repo | ||
REGISTRY_ALIAS: h5v6m2x1 | ||
ECR_REPOSITORY: river-stress-test-node | ||
run: | | ||
docker build -t $ECR_REGISTRY/$REGISTRY_ALIAS/$ECR_REPOSITORY:latest . -f ./packages/stress-testing/Dockerfile | ||
docker push $ECR_REGISTRY/$REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
# If action failed, we send a slack notification | ||
- name: Slack notification | ||
if: failure() | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"step": "Build Stress Test Node Docker Image", | ||
"environment": "N/", | ||
"branch": "${{ github.ref }}", | ||
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", | ||
"commit": "${{ github.sha }}", | ||
"actor": "${{ github.actor }}" | ||
} |
Oops, something went wrong.