Skip to content

Commit

Permalink
Merge branch 'master' into chore/update-libp2p-repo-path
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-clius authored Mar 12, 2024
2 parents 36dc95a + a1b3e09 commit 6141ed3
Show file tree
Hide file tree
Showing 455 changed files with 27,251 additions and 10,762 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
/LICENSE*
/tests
/metrics
/nimcache
librln*
**/vendor/*
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bump_dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bump dependencies
about: Bump vendor dependencies for release
title: 'Bump vendor dependencies for release 0.0.0'
labels: dependencies
assignees: ''

---

<!-- Add appropriate release number to title! -->

Update `nwaku` "vendor" dependencies.

### Items to bump
- [ ] dnsclient.nim ( update to the latest tag version )
- [ ] nim-bearssl
- [ ] nimbus-build-system
- [ ] nim-chronicles
- [ ] nim-chronos
- [ ] nim-confutils
- [ ] nimcrypto
- [ ] nim-dnsdisc
- [ ] nim-eth
- [ ] nim-faststreams
- [ ] nim-http-utils
- [ ] nim-json-rpc
- [ ] nim-json-serialization
- [ ] nim-libbacktrace
- [ ] nim-libp2p ( update to the unstable branch )
- [ ] nim-metrics
- [ ] nim-nat-traversal
- [ ] nim-presto
- [ ] nim-regex ( update to the latest tag version )
- [ ] nim-secp256k1
- [ ] nim-serialization
- [ ] nim-sqlite3-abi ( update to the latest tag version )
- [ ] nim-stew
- [ ] nim-stint
- [ ] nim-taskpools
- [ ] nim-testutils
- [ ] nim-toml-serialization
- [ ] nim-unicodedb
- [ ] nim-unittest2
- [ ] nim-web3
- [ ] nim-websock
- [ ] nim-zlib
- [ ] zerokit ( this should be kept in version `v0.3.4` )
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/prepare_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Prepare release
about: Execute tasks for the creation and publishing of a new release
title: 'Prepare release 0.0.0'
labels: release
assignees: ''

---

<!--
Add appropriate release number to title!
For detailed info on the release process refer to https://github.com/waku-org/nwaku/blob/master/docs/contributors/release-process.md
-->

### Items to complete
- [ ] create release branch
- [ ] assign release candidate tag
- [ ] validate release candidate
- [ ] generate and edit releases notes
- [ ] open PR and merge release notes to master
- [ ] cherry-pick release notes to the release branch
- [ ] assign release tag to the cherry-picked release notes commit
- [ ] create GitHub release
- [ ] deploy the release to DockerHub
- [ ] deploy release to `wakuv2.prod` fleet
- [ ] announce the release
130 changes: 0 additions & 130 deletions .github/workflows/ci-experimental.yml

This file was deleted.

31 changes: 25 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
env:
NPROC: 2
MAKEFLAGS: "-j${NPROC}"
NIMFLAGS: "--parallelBuild:${NPROC}"
NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none"

jobs:
changes: # changes detection
Expand All @@ -33,6 +33,7 @@ jobs:
- 'vendor/**'
- 'Makefile'
- 'waku.nimble'
- 'library/**'
v2:
- 'waku/**'
Expand All @@ -54,11 +55,12 @@ jobs:
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }}
strategy:
matrix:
rln_version : [1, 2]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

name: build-${{ matrix.os }}
name: build-${{ matrix.os }}-rln-v${{ matrix.rln_version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -77,18 +79,19 @@ jobs:
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}

- name: Build binaries
run: make V=1 QUICK_AND_DIRTY_COMPILER=1 all tools
run: make RLN_V${{matrix.rln_version}}=true V=1 QUICK_AND_DIRTY_COMPILER=1 all tools

test:
needs: changes
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }}
strategy:
matrix:
rln_version : [1, 2]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

name: test-${{ matrix.os }}
name: test-${{ matrix.os }}-rln-v${{ matrix.rln_version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -114,13 +117,29 @@ jobs:
fi
if [ ${{ runner.os }} == "Linux" ]; then
sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:9.6-alpine
sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:15.4-alpine3.18
fi
make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 test testwakunode2
make RLN_V${{matrix.rln_version}}=true V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 POSTGRES=1 test testwakunode2
build-docker-image:
needs: changes
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' || needs.changes.outputs.docker == 'true' }}
uses: waku-org/nwaku/.github/workflows/container-image.yml@master
secrets: inherit

js-waku-node:
needs: build-docker-image
uses: waku-org/js-waku/.github/workflows/test-node.yml@master
with:
nim_wakunode_image: ${{ needs.build-docker-image.outputs.image }}
test_type: node
debug: waku*

js-waku-node-optional:
needs: build-docker-image
uses: waku-org/js-waku/.github/workflows/test-node.yml@master
with:
nim_wakunode_image: ${{ needs.build-docker-image.outputs.image }}
test_type: node-optional
debug: waku*
35 changes: 23 additions & 12 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: container-image-build
on:
workflow_call:
inputs:
experimental:
type: boolean
image_tag:
type: string
default: ${{ github.event.number }}
outputs:
image:
description: The resulting image link
value: ${{ jobs.build-docker-image.outputs.image }}

env:
NPROC: 2
Expand All @@ -15,11 +20,14 @@ jobs:
build-docker-image:
strategy:
matrix:
rln_v2: [true, false]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

name: docker-build-${{ matrix.os }}
name: docker-build-${{ matrix.os }}-rln-v2-${{ matrix.rln_v2 }}
outputs:
image: ${{ steps.build.outputs.image }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -40,32 +48,35 @@ jobs:
- name: Build binaries
id: build
run: |
EXPERIMENTAL=${{ inputs.experimental }}
make -j${NPROC} V=1 QUICK_AND_DIRTY_COMPILER=1 NIMFLAGS="-d:disableMarchNative" wakunode2 EXPERIMENTAL=${EXPERIMENTAL}
make RLN_V2=${{matrix.rln_v2}} -j${NPROC} V=1 QUICK_AND_DIRTY_COMPILER=1 NIMFLAGS="-d:disableMarchNative -d:postgres" wakunode2
TAG=$([ "${PR_NUMBER}" == "" ] && echo "master" || echo "${PR_NUMBER}")
TAG=$([ "${EXPERIMENTAL}" == "true" ] && echo "${TAG}-experimental" || echo "${TAG}")
IMAGE=quay.io/wakuorg/nwaku-pr:${TAG}
SHORT_REF=$(git rev-parse --short HEAD)
TAG=$([ "${PR_NUMBER}" == "" ] && echo "${SHORT_REF}" || echo "${PR_NUMBER}")
IMAGE=quay.io/wakuorg/nwaku-pr:${TAG}-rln-v2-${{matrix.rln_v2}}
echo "image=${IMAGE}" >> $GITHUB_OUTPUT
echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
docker login -u ${QUAY_USER} -p ${QUAY_PASSWORD} quay.io
docker build -t ${IMAGE} -f docker/binaries/Dockerfile.bn.amd64 --label quay.expires-after=7d .
docker build -t ${IMAGE} -f docker/binaries/Dockerfile.bn.amd64 --label quay.expires-after=30d .
docker push ${IMAGE}
env:
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
QUAY_USER: ${{ secrets.QUAY_USER }}
PR_NUMBER: ${{ github.event.number }}
PR_NUMBER: ${{ inputs.image_tag}}

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
if: ${{ github.event_name == 'pull_request' }}
with:
message: |
You can find the ${{ inputs.experimental && '**experimental**' || ''}} image built from this PR at
You can find the image built from this PR at
```
${{steps.build.outputs.image}}
```
comment_tag: execution${{ inputs.experimental && '**experimental**' || ''}}
Built from ${{ steps.build.outputs.commit_hash }}
comment_tag: execution
Loading

0 comments on commit 6141ed3

Please sign in to comment.