mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-04 19:14:47 +00:00
feat(ci): run experimental features in diff ci (#1410)
* feat(ci): run experimental features in diff ci * chore(ci): add EXPERIMENTAL flag * chore(makefile): make compilation cleaner * fix(rln-relay): remove onchain_rln flag * fix(makefile): remove experimental_rln flag Co-authored-by: Lorenzo Delgado <lorenzo@status.im>
This commit is contained in:
parent
a4970d2625
commit
63fe1351f5
41
.github/workflows/test2-experimental-ignore.yml
vendored
Normal file
41
.github/workflows/test2-experimental-ignore.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: test2-experimental
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'waku/v1/**'
|
||||||
|
- 'tests/all_tests_v1.nim'
|
||||||
|
- 'tests/v1/**'
|
||||||
|
|
||||||
|
- 'waku/whisper/**'
|
||||||
|
- 'tests/whisper/**'
|
||||||
|
- 'tests/all_tests_whisper.nim'
|
||||||
|
|
||||||
|
- 'ci/**'
|
||||||
|
- 'metrics/**'
|
||||||
|
- 'docs/**'
|
||||||
|
- '**.md'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- 'ci/**'
|
||||||
|
- 'metrics/**'
|
||||||
|
- 'docs/**'
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
name: ${{ github.workflow }}-${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- run: 'echo "No test required"'
|
71
.github/workflows/test2-experimental.yml
vendored
Normal file
71
.github/workflows/test2-experimental.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
name: test2-experimental
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- 'waku/v1/**'
|
||||||
|
- 'tests/all_tests_v1.nim'
|
||||||
|
- 'tests/v1/**'
|
||||||
|
|
||||||
|
- 'waku/whisper/**'
|
||||||
|
- 'tests/whisper/**'
|
||||||
|
- 'tests/all_tests_whisper.nim'
|
||||||
|
|
||||||
|
- 'ci/**'
|
||||||
|
- 'metrics/**'
|
||||||
|
- 'docs/**'
|
||||||
|
- '**.md'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'ci/**'
|
||||||
|
- 'metrics/**'
|
||||||
|
- 'docs/**'
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
env:
|
||||||
|
- NPROC: 2
|
||||||
|
MAKEFLAGS: "-j${NPROC}"
|
||||||
|
NIMFLAGS: "--parallelBuild:${NPROC}"
|
||||||
|
EXPERIMENTAL: "true"
|
||||||
|
platform: [ubuntu-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
env: ${{ matrix.env }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
|
||||||
|
name: ${{ github.workflow }}-${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# We need to do this because of how github cache works
|
||||||
|
# I am not sure we can move the cache file, so if we do not do this
|
||||||
|
# make update breaks because the cached compiler is there where the submodules
|
||||||
|
# are meant to go.
|
||||||
|
- name: Submodules
|
||||||
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
|
- name: Cache nim
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: vendor/nimbus-build-system/vendor/Nim/bin
|
||||||
|
key: ${{ runner.os }}-${{ matrix.env.NPROC }}-nim-${{ hashFiles('.gitmodules') }}
|
||||||
|
|
||||||
|
- name: Update dependencies
|
||||||
|
run: make V=1 update
|
||||||
|
|
||||||
|
- name: Build V2 binaries
|
||||||
|
run: make LOG_LEVEL=TRACE v2
|
||||||
|
|
||||||
|
- name: Run V2 Tests
|
||||||
|
run: make test2
|
19
Makefile
19
Makefile
@ -204,26 +204,19 @@ docs: | build deps
|
|||||||
|
|
||||||
## RLN
|
## RLN
|
||||||
|
|
||||||
# control rln code compilation
|
# Experimental flag for all experimental features
|
||||||
ifeq ($(RLN), true)
|
ifeq ($(EXPERIMENTAL), true)
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:rln
|
$(eval RLN := true)
|
||||||
else ifeq ($(CI), true)
|
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:rln
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# control compilation of rln tests that require on chain interaction
|
# control rln code compilation
|
||||||
ifeq ($(ONCHAIN_RLN), true)
|
ifeq ($(RLN), true)
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:onchain_rln
|
NIM_PARAMS := $(NIM_PARAMS) -d:rln
|
||||||
else ifeq ($(CI), true)
|
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:onchain_rln
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rlnlib:
|
rlnlib:
|
||||||
ifeq ($(RLN), true)
|
ifeq ($(RLN), true)
|
||||||
cargo build --manifest-path vendor/zerokit/rln/Cargo.toml --release
|
cargo build --manifest-path vendor/zerokit/rln/Cargo.toml --release
|
||||||
# Enable zerokit rln in CI
|
|
||||||
else ifeq ($(CI), true)
|
|
||||||
cargo build --manifest-path vendor/zerokit/rln/Cargo.toml --release
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# clean the rln build (forces recompile of old crates on next build)
|
# clean the rln build (forces recompile of old crates on next build)
|
||||||
|
@ -61,9 +61,8 @@ import
|
|||||||
when defined(rln):
|
when defined(rln):
|
||||||
import
|
import
|
||||||
./v2/test_waku_rln_relay,
|
./v2/test_waku_rln_relay,
|
||||||
./v2/test_wakunode_rln_relay
|
./v2/test_wakunode_rln_relay,
|
||||||
when defined(onchain_rln):
|
./v2/test_waku_rln_relay_onchain
|
||||||
import ./v2/test_waku_rln_relay_onchain
|
|
||||||
|
|
||||||
when defined(waku_exp_store_resume):
|
when defined(waku_exp_store_resume):
|
||||||
# TODO: Review store resume test cases (#1282)
|
# TODO: Review store resume test cases (#1282)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user