diff --git a/.env.oft-current b/.env.oft-current new file mode 100644 index 0000000..e9652d6 --- /dev/null +++ b/.env.oft-current @@ -0,0 +1,23 @@ +# 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 + +# shellcheck disable=SC2148,SC2034 + +# The file patterns that specify the relevant parts of the uProtocol Specification +# that this component is supposed to implement +UP_SPEC_FILE_PATTERNS="up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc" + +# The file patterns that specify this component's resources which contain specification items +# that cover the requirements +COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples src tests tools" + +OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS" +OFT_TAGS="" diff --git a/.env.oft-latest b/.env.oft-latest new file mode 100644 index 0000000..ef99f5e --- /dev/null +++ b/.env.oft-latest @@ -0,0 +1,23 @@ +# 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 + +# shellcheck disable=SC2148,SC2034 + +# The file patterns that specify the relevant parts of the latest uProtocol Specification +# that this component is supposed to implement +UP_SPEC_FILE_PATTERNS="up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/README.adoc up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc" + +# The file patterns that specify this component's resources which contain specification items +# that cover the requirements +COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples src tests tools" + +OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS" +OFT_TAGS="_,LanguageLibrary" diff --git a/.github/workflows/current-up-spec-compliance.yaml b/.github/workflows/current-up-spec-compliance.yaml deleted file mode 100644 index 6c9a970..0000000 --- a/.github/workflows/current-up-spec-compliance.yaml +++ /dev/null @@ -1,39 +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 -# *******************************************************************************/ - -# Verifies that this crate covers all requirements of the (currently) implemented -# version of the uProtocol Specification. - -name: Current uP Spec Compliance - -on: - workflow_call: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -env: - RUST_TOOLCHAIN: ${{ vars.RUST_TOOLCHAIN || 'stable' }} - RUSTFLAGS: -Dwarnings - CARGO_TERM_COLOR: always - -jobs: - requirements-tracing: - uses: eclipse-uprotocol/ci-cd/.github/workflows/requirements-tracing.yaml@main - # Do not include the recently revamped L1 API spec with requirements for - # language libraries. - # We also do not use OFT Tags for filtering specitems (yet). - with: - oft-file-patterns: "up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc *.adoc *.md *.rs .github examples src tests tools" diff --git a/.github/workflows/latest-up-spec-compatibility.yaml b/.github/workflows/latest-up-spec-compatibility.yaml index fbcbe13..f164fb2 100644 --- a/.github/workflows/latest-up-spec-compatibility.yaml +++ b/.github/workflows/latest-up-spec-compatibility.yaml @@ -32,7 +32,7 @@ env: CARGO_TERM_COLOR: always jobs: - up-spec-check: + requirements-tracing: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -48,14 +48,20 @@ jobs: git status cd "${{ github.workspace }}" + - name: "Determine OpenFastTrace file patterns from .env file" + uses: xom9ikk/dotenv@v2.3.0 + with: + mode: "oft-latest" + load-mode: strict + # run OpenFastTrace first because the action will always succeed and produce # a tracing report - name: Run OpenFastTrace id: run-oft uses: eclipse-uprotocol/ci-cd/.github/actions/run-oft@main with: - file-patterns: "up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/README.adoc up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc *.adoc *.md *.rs .github examples src tests tools" - tags: "_,LanguageLibrary" + file-patterns: "${{ env.OFT_FILE_PATTERNS }}" + tags: "${{ env.OFT_TAGS_}}" # now try to build and run the tests which may fail if incomaptible changes # have been introduced into the uProtocol Core API diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index dac231d..995a351 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -51,5 +51,7 @@ jobs: coverage: uses: eclipse-uprotocol/ci-cd/.github/workflows/rust-coverage.yaml@main - requirements-tracing: - uses: ./.github/workflows/current-up-spec-compliance.yaml + current-spec-compliance: + uses: eclipse-uprotocol/ci-cd/.github/workflows/requirements-tracing.yaml@main + with: + env-file-suffix: "oft-current" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 85f58b3..d57aedd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,8 +34,10 @@ jobs: coverage: uses: eclipse-uprotocol/ci-cd/.github/workflows/rust-coverage.yaml@main - requirements-tracing: - uses: ./.github/workflows/current-up-spec-compliance.yaml + current-spec-compliance: + uses: eclipse-uprotocol/ci-cd/.github/workflows/requirements-tracing.yaml@main + with: + env-file-suffix: "oft-current" licenses: # This works off the license declarations in dependent packages/crates, so if these declarations are wrong, this report will contain erroneous information @@ -53,7 +55,7 @@ jobs: - check - check-msrv - coverage - - requirements-tracing + - current-spec-compliance - licenses permissions: write-all steps: @@ -61,6 +63,12 @@ jobs: with: submodules: "recursive" + - name: "Determine uProtocol Specification file patterns from .env file" + uses: xom9ikk/dotenv@v2.3.0 + with: + mode: oft-current + load-mode: strict + # License report - we later need the download_url output of the upload step - name: Download license report uses: actions/download-artifact@v4 @@ -133,7 +141,7 @@ jobs: - name: Gather uProtocol Specification documents shell: bash run: | - tar cvz --file up-spec.tar.gz ${{ vars.UP_SPEC_OPEN_FAST_TRACE_FILE_PATTERNS }} + tar cvz --file up-spec.tar.gz ${{ env.UP_SPEC_FILE_PATTERNS }} - name: Upload relevant uProtocol Spec files to release uses: svenstaro/upload-release-action@v2 id: upload_up_spec