diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 091bfcfcd..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Test - -on: - pull_request: - paths-ignore: - - 'docs/**' - - '**.md' - push: - branches: - - master - paths-ignore: - - 'docs/**' - - '**.md' - -jobs: - test: - strategy: - matrix: - env: - - NPROC: 2 - MAKEFLAGS: "-j${NPROC}" - NIMFLAGS: "--parallelBuild:${NPROC}" - platform: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.platform }} - env: ${{ matrix.env }} - timeout-minutes: 60 - - name: ${{ matrix.platform }} - ${{ matrix.env.NPROC }} processes - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - # 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@v1 - 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 V1 binaries - run: make LOG_LEVEL=TRACE v1 - - - name: Build V2 binaries - run: make LOG_LEVEL=TRACE v2 - - - name: Run V1 Tests - run: make test1 - - - name: Run V2 Tests - run: make test2 - - # windows: - # strategy: - # matrix: - # env: - # - NPROC: 2 - # MAKEFLAGS: "-j${NPROC}" - # ARCH_OVERRIDE: "%PLATFORM%" - # runs-on: windows-latest - # env: ${{ matrix.env }} - # timeout-minutes: 90 - - # name: windows - ${{ matrix.env.NPROC }} processes - - # steps: - # - uses: eine/setup-msys2@v2 - # with: - # msystem: MSYS - # update: true - - # - name: Checkout code - # uses: actions/checkout@v2 - - # # 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@v1 - # with: - # path: vendor/nimbus-build-system/vendor/Nim/bin - # key: ${{ runner.os }}-${{ matrix.env.NPROC }}-nim-${{ hashFiles('.gitmodules') }} - - # - name: Update dependencies - # run: mingw32-make CI_CACHE=NimBinaries update - - # - name: Fetch DLLs - # run: mingw32-make fetch-dlls - - # - name: Build V1 Binaries - # run: mingw32-make LOG_LEVEL=TRACE v1 - - # - name: Build V2 Binaries - # run: mingw32-make LOG_LEVEL=TRACE v2 - - # - name: Test Binaries - # run: | - # build\wakunode1.exe --help - # build\wakunode2.exe --help - - # - name: Run V1 Tests - # run: mingw32-make test1 - - # - name: Run V2 Tests - # run: mingw32-make test2 diff --git a/.github/workflows/test1-ignore.yml b/.github/workflows/test1-ignore.yml new file mode 100644 index 000000000..cb456cf11 --- /dev/null +++ b/.github/workflows/test1-ignore.yml @@ -0,0 +1,37 @@ +name: test1 + +on: + pull_request: + paths: + - 'waku/v2/**' + - 'tests/all_tests_v2.nim' + - 'tests/v2/**' + + - '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"' \ No newline at end of file diff --git a/.github/workflows/test1.yml b/.github/workflows/test1.yml new file mode 100644 index 000000000..3e58face6 --- /dev/null +++ b/.github/workflows/test1.yml @@ -0,0 +1,66 @@ +name: test1 + +on: + pull_request: + paths-ignore: + - 'waku/v2/**' + - 'tests/all_tests_v2.nim' + - 'tests/v2/**' + + - '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}" + 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 V1 binaries + run: make LOG_LEVEL=TRACE v1 + + - name: Run V1 Tests + run: make test1 diff --git a/.github/workflows/test2-ignore.yml b/.github/workflows/test2-ignore.yml new file mode 100644 index 000000000..5484d1956 --- /dev/null +++ b/.github/workflows/test2-ignore.yml @@ -0,0 +1,41 @@ +name: test2 + +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"' diff --git a/.github/workflows/test2.yml b/.github/workflows/test2.yml new file mode 100644 index 000000000..d093d373a --- /dev/null +++ b/.github/workflows/test2.yml @@ -0,0 +1,70 @@ +name: test2 + +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}" + 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 diff --git a/ci/Jenkinsfile.prs b/ci/Jenkinsfile.prs index 8177ecf50..2f3926dc4 100644 --- a/ci/Jenkinsfile.prs +++ b/ci/Jenkinsfile.prs @@ -136,6 +136,9 @@ def versionWasChanged(version) { if (changes =~ "(?m)^(Makefile|waku.nimble|config.nims|vendor|ci|shell.nix).*") { return true } + if (version == 'v2' && changes =~ "(?m)^(apps|tools)/.*") { + return true + } if (changes =~ "(?m)^(waku|tests|examples)/(${version}|common)/.*") { return true } diff --git a/examples/v1/example b/examples/v1/example deleted file mode 100755 index f6d39ce04..000000000 Binary files a/examples/v1/example and /dev/null differ