From b4bb94a73cb7d73048aadfafe81a1dcf8358131e Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Dec 2024 16:47:51 +0100 Subject: [PATCH 1/6] fix: Add CI status and change build-check to ci Align zenoh-pico with the rest of the zenoh ecosystem in terms of CI, - rename build-check.yml to ci.yml - Include CI status check to ci.yml --- .github/workflows/{build-check.yaml => ci.yml} | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) rename .github/workflows/{build-check.yaml => ci.yml} (91%) diff --git a/.github/workflows/build-check.yaml b/.github/workflows/ci.yml similarity index 91% rename from .github/workflows/build-check.yaml rename to .github/workflows/ci.yml index f9881bbcb..dd2b02153 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ # Contributors: # ZettaScale Zenoh Team, # -name: build-check +name: CI on: push: @@ -304,3 +304,17 @@ jobs: with: config: '.markdownlint.yaml' globs: '**/README.md' + + # NOTE: In GitHub repository settings, the "Require status checks to pass + # before merging" branch protection rule ensures that commits are only merged + # from branches where specific status checks have passed. These checks are + # specified manually as a list of workflow job names. Thus we use this extra + # job to signal whether all CI checks have passed. + ci: + name: CI status checks + runs-on: ubuntu-latest + needs: [run_tests, check_format, c99_build, raweth_build, zenoh_build, modular_build, unstable_build, st_build, fragment_test, attachment_test, memory_leak_test, no_router, markdown_lint] + if: always() + steps: + - name: Check whether all jobs pass + run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' From 9b5ac436cf76969f508875e4fa2ccc8a8d972a01 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Dec 2024 16:51:58 +0100 Subject: [PATCH 2/6] chore: fix test name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd2b02153..5b06271c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -282,7 +282,7 @@ jobs: if: always() run: kill ${{ steps.run-zenoh.outputs.zenohd-pid }} - no_routeur: + no_router: name: Test examples without router runs-on: ubuntu-latest steps: From 27696d5d98b63c98ce95be28db77f23746bbe792 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Dec 2024 17:30:14 +0100 Subject: [PATCH 3/6] fix: experiment with reusable workflow --- .github/workflows/build-shared.yaml | 5 +---- .github/workflows/ci.yml | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-shared.yaml b/.github/workflows/build-shared.yaml index bc07b2a7c..902479231 100644 --- a/.github/workflows/build-shared.yaml +++ b/.github/workflows/build-shared.yaml @@ -14,10 +14,7 @@ name: build-shared on: - push: - branches: [ '**' ] - pull_request: - branches: [ '**' ] + workflow_call: jobs: build: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b06271c6..6fd8af48b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -305,6 +305,10 @@ jobs: config: '.markdownlint.yaml' globs: '**/README.md' + build_shared: + name: Build shared libs + uses: ./.github/workflows/build-shared.yaml + # NOTE: In GitHub repository settings, the "Require status checks to pass # before merging" branch protection rule ensures that commits are only merged # from branches where specific status checks have passed. These checks are From 325f90ea0f339b44082916ffe65d7a41e1ea5b0e Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Tue, 17 Dec 2024 17:50:33 +0100 Subject: [PATCH 4/6] fix: make integration and build-static reusable --- .github/workflows/build-static.yaml | 5 +---- .github/workflows/ci.yml | 12 +++++++++++- .github/workflows/integration.yaml | 7 +------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-static.yaml b/.github/workflows/build-static.yaml index 4b853c7a7..bfb13e433 100644 --- a/.github/workflows/build-static.yaml +++ b/.github/workflows/build-static.yaml @@ -14,10 +14,7 @@ name: build-static on: - push: - branches: [ '**' ] - pull_request: - branches: [ '**' ] + workflow_call: jobs: build: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fd8af48b..732096204 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ on: branches: ["**"] pull_request: branches: ["**"] + schedule: + - cron: "0 6 * * 1-5" jobs: run_tests: @@ -309,6 +311,14 @@ jobs: name: Build shared libs uses: ./.github/workflows/build-shared.yaml + build_static: + name: Build shared libs + uses: ./.github/workflows/build-static.yaml + + integration: + name: Run integration tests + uses: ./.github/workflows/integration.yaml + # NOTE: In GitHub repository settings, the "Require status checks to pass # before merging" branch protection rule ensures that commits are only merged # from branches where specific status checks have passed. These checks are @@ -317,7 +327,7 @@ jobs: ci: name: CI status checks runs-on: ubuntu-latest - needs: [run_tests, check_format, c99_build, raweth_build, zenoh_build, modular_build, unstable_build, st_build, fragment_test, attachment_test, memory_leak_test, no_router, markdown_lint] + needs: [run_tests, check_format, c99_build, raweth_build, zenoh_build, modular_build, unstable_build, st_build, fragment_test, attachment_test, memory_leak_test, no_router, markdown_lint, build_shared, build_static, integration] if: always() steps: - name: Check whether all jobs pass diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 8b938a042..021674289 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -14,12 +14,7 @@ name: integration on: - push: - branches: ["**"] - pull_request: - branches: ["**"] - schedule: - - cron: "0 6 * * 1-5" + workflow_call: jobs: build: From c83ae5765869c6b4828092da76a03d9a9010dc50 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Wed, 18 Dec 2024 09:46:34 +0100 Subject: [PATCH 5/6] fix: make multicast tests reusable --- .github/workflows/ci.yml | 6 +++++- .github/workflows/multicast.yaml | 7 +------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 732096204..8c952ec2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -319,6 +319,10 @@ jobs: name: Run integration tests uses: ./.github/workflows/integration.yaml + multicast: + name: Run multicast tests + uses: ./.github/workflows/multicast.yaml + # NOTE: In GitHub repository settings, the "Require status checks to pass # before merging" branch protection rule ensures that commits are only merged # from branches where specific status checks have passed. These checks are @@ -327,7 +331,7 @@ jobs: ci: name: CI status checks runs-on: ubuntu-latest - needs: [run_tests, check_format, c99_build, raweth_build, zenoh_build, modular_build, unstable_build, st_build, fragment_test, attachment_test, memory_leak_test, no_router, markdown_lint, build_shared, build_static, integration] + needs: [run_tests, check_format, c99_build, raweth_build, zenoh_build, modular_build, unstable_build, st_build, fragment_test, attachment_test, memory_leak_test, no_router, markdown_lint, build_shared, build_static, integration, multicast] if: always() steps: - name: Check whether all jobs pass diff --git a/.github/workflows/multicast.yaml b/.github/workflows/multicast.yaml index 3686a7ee0..1fe0fa96e 100644 --- a/.github/workflows/multicast.yaml +++ b/.github/workflows/multicast.yaml @@ -14,12 +14,7 @@ name: multicast on: - push: - branches: ["**"] - pull_request: - branches: ["**"] - schedule: - - cron: "0 6 * * 1-5" + workflow_call: jobs: build: From f074018aada41c11ef7a4658213aad62384b9e15 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Wed, 18 Dec 2024 11:54:58 +0100 Subject: [PATCH 6/6] fix: typo in job name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c952ec2c..fbd6ca374 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -312,7 +312,7 @@ jobs: uses: ./.github/workflows/build-shared.yaml build_static: - name: Build shared libs + name: Build static libs uses: ./.github/workflows/build-static.yaml integration: