From c3bef51d158d94a4a8ddbd5fb4ce3b9399e4103c Mon Sep 17 00:00:00 2001 From: Patil Date: Fri, 19 Dec 2025 14:30:04 +0530 Subject: [PATCH 1/2] Setup initial workflow with gcc build --- .../workflows/build_and_test_host_gcc12.yml | 39 +++++++++ .github/workflows/copyright.yml | 24 ------ .github/workflows/docs-cleanup.yml | 29 ------- .github/workflows/format.yml | 26 ------ .github/workflows/gitlint.yml | 31 ------- .github/workflows/release_verification.yml | 80 +++++++++++++++++++ .../workflows/{docs.yml => test_and_docs.yml} | 17 +++- 7 files changed, 132 insertions(+), 114 deletions(-) create mode 100644 .github/workflows/build_and_test_host_gcc12.yml delete mode 100644 .github/workflows/copyright.yml delete mode 100644 .github/workflows/docs-cleanup.yml delete mode 100644 .github/workflows/format.yml delete mode 100644 .github/workflows/gitlint.yml create mode 100644 .github/workflows/release_verification.yml rename .github/workflows/{docs.yml => test_and_docs.yml} (76%) diff --git a/.github/workflows/build_and_test_host_gcc12.yml b/.github/workflows/build_and_test_host_gcc12.yml new file mode 100644 index 0000000..e379946 --- /dev/null +++ b/.github/workflows/build_and_test_host_gcc12.yml @@ -0,0 +1,39 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +# Workflow configuration for S-CORE CI - Bazel Build & Test logging +# This workflow runs Bazel build and test when triggered by specific pull request events. + +name: Bazel Build & Test logging (with host toolchain GCC12.2) +on: + pull_request: + types: [opened, reopened, synchronize] + push: + branches: + - main + merge_group: + types: [checks_requested] +jobs: + build_and_test_gcc_host_gcc12: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.9.1 + - name: Bazel build logging targets + run: | + bazel build //score/... + - name: Bazel test logging targets + run: | + bazel test //score/... diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml deleted file mode 100644 index 08ef376..0000000 --- a/.github/workflows/copyright.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Copyright checks -on: - pull_request: - types: [opened, reopened, synchronize] - merge_group: - types: [checks_requested] -jobs: - copyright-check: - uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@main - with: - bazel-target: "run //:copyright.check" diff --git a/.github/workflows/docs-cleanup.yml b/.github/workflows/docs-cleanup.yml deleted file mode 100644 index cfa4ae2..0000000 --- a/.github/workflows/docs-cleanup.yml +++ /dev/null @@ -1,29 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Documentation Cleanup - -permissions: - contents: write - pages: write - id-token: write - -on: - schedule: - - cron: '0 0 * * *' # Runs every day at midnight UTC - -jobs: - docs-cleanup: - uses: eclipse-score/cicd-workflows/.github/workflows/docs-cleanup.yml@main - secrets: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index 620d697..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,26 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Formatting checks - -on: - pull_request: - types: [opened, reopened, synchronize] - merge_group: - types: [checks_requested] - -jobs: - formatting-check: - uses: eclipse-score/cicd-workflows/.github/workflows/format.yml@main - with: - bazel-target: "test //:format.check" # optional, this is the default diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml deleted file mode 100644 index 90487ed..0000000 --- a/.github/workflows/gitlint.yml +++ /dev/null @@ -1,31 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Gitlint check -on: - pull_request: - types: [opened, synchronize, reopened] -jobs: - lint-commits: - name: check-commit-messages - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Run Gitlint Action - if: ${{ github.event_name == 'pull_request' }} - uses: ./.github/actions/gitlint - with: - pr-number: ${{ github.event.number }} diff --git a/.github/workflows/release_verification.yml b/.github/workflows/release_verification.yml new file mode 100644 index 0000000..4895eb0 --- /dev/null +++ b/.github/workflows/release_verification.yml @@ -0,0 +1,80 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +# Workflow configuration for S-CORE CI - Release Check +# This workflow runs Bazel build and test when triggered by tag creation. + +name: Bazel Build & Test logging (with host toolchain GCC12.2) +on: + push: + tags: + - 'v*' # Triggers on version tags like v1.0.0 + - 'release-*' # Triggers on release tags like release-1.0.0 + +permissions: + contents: write + +jobs: + build_host: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.9.1 + - name: Bazel build logging targets + run: | + bazel build --config bl-x86_64-linux -- //score/... + build_target: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.9.1 + - name: Setup QNX License + env: + SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }} + run: | + mkdir -p /opt/score_qnx/license + echo "${SCORE_QNX_LICENSE}" | base64 --decode > /opt/score_qnx/license/licenses + - name: Bazel build logging targets + env: + SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} + SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} + run: | + bazel build --config bl-x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ + //score/... + - name: Cleanup QNX License + if: always() + run: rm -rf /opt/score_qnx + test_host: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.9.1 + - name: Bazel test logging targets + run: | + bazel test --config bl-x86_64-linux //score/... + release_verification: + runs-on: ubuntu-latest + needs: [build_host, build_target, test_host] + if: always() && (needs.build_host.result == 'failure' || needs.build_target.result == 'failure' || needs.test_host.result == 'failure') + steps: + - name: Remove release and tag (if exists) + uses: nikhilbadyal/ghaction-rm-releases@v0.7.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_PATTERN: ${{ github.ref_name }} diff --git a/.github/workflows/docs.yml b/.github/workflows/test_and_docs.yml similarity index 76% rename from .github/workflows/docs.yml rename to .github/workflows/test_and_docs.yml index 24bd399..8771cb0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/test_and_docs.yml @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -name: Documentation +name: Tests, Verify and Build Docs permissions: contents: write @@ -29,15 +29,24 @@ on: types: [checks_requested] jobs: - build-docs: + docs-verify: + uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@main + permissions: + pull-requests: write + contents: read + with: + bazel-docs-verify-target: "//:docs_check" + + # TODO skipping tests as we don't integrate test results in docs anyways + + docs-build: + needs: [docs-verify] uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@main permissions: contents: write pages: write pull-requests: write id-token: write - with: - # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix") bazel-target: "//:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" retention-days: 3 From ea1aac50dd0fe3055a7944510abc4133c62ae812 Mon Sep 17 00:00:00 2001 From: Patil Date: Fri, 19 Dec 2025 15:47:29 +0530 Subject: [PATCH 2/2] Remove release_verification.yml from workflow --- .github/workflows/release_verification.yml | 80 ---------------------- 1 file changed, 80 deletions(-) delete mode 100644 .github/workflows/release_verification.yml diff --git a/.github/workflows/release_verification.yml b/.github/workflows/release_verification.yml deleted file mode 100644 index 4895eb0..0000000 --- a/.github/workflows/release_verification.yml +++ /dev/null @@ -1,80 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -# Workflow configuration for S-CORE CI - Release Check -# This workflow runs Bazel build and test when triggered by tag creation. - -name: Bazel Build & Test logging (with host toolchain GCC12.2) -on: - push: - tags: - - 'v*' # Triggers on version tags like v1.0.0 - - 'release-*' # Triggers on release tags like release-1.0.0 - -permissions: - contents: write - -jobs: - build_host: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4.2.2 - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.9.1 - - name: Bazel build logging targets - run: | - bazel build --config bl-x86_64-linux -- //score/... - build_target: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4.2.2 - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.9.1 - - name: Setup QNX License - env: - SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }} - run: | - mkdir -p /opt/score_qnx/license - echo "${SCORE_QNX_LICENSE}" | base64 --decode > /opt/score_qnx/license/licenses - - name: Bazel build logging targets - env: - SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} - SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} - run: | - bazel build --config bl-x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ - //score/... - - name: Cleanup QNX License - if: always() - run: rm -rf /opt/score_qnx - test_host: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4.2.2 - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.9.1 - - name: Bazel test logging targets - run: | - bazel test --config bl-x86_64-linux //score/... - release_verification: - runs-on: ubuntu-latest - needs: [build_host, build_target, test_host] - if: always() && (needs.build_host.result == 'failure' || needs.build_target.result == 'failure' || needs.test_host.result == 'failure') - steps: - - name: Remove release and tag (if exists) - uses: nikhilbadyal/ghaction-rm-releases@v0.7.0 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_PATTERN: ${{ github.ref_name }}