diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 42c1de9af8..98455f1125 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # Copyright (c) 2021 Li-Pro.Net # SPDX-License-Identifier: Apache-2.0 @@ -53,16 +53,17 @@ jobs: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: workspace/bridle - name: Install packages run: | + sudo add-apt-repository -y -u ppa:tiac-systems/doxygen sudo apt-get install -y ninja-build doxygen mscgen graphviz - name: Restore PIP Cache - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-doc-pip @@ -80,6 +81,7 @@ jobs: west init -l bridle west update west zephyr-export + west bridle-export - name: Install documentation dependencies working-directory: workspace @@ -90,7 +92,7 @@ jobs: - name: Build documentation working-directory: workspace run: | - cmake -B build -GNinja -DSPHINXOPTS_EXTRA="-W" bridle/doc + cmake -B build -GNinja bridle/doc ninja -C build build-all - name: Archive documentation @@ -103,22 +105,28 @@ jobs: mkdir doc && cd doc archive="doc_build_${GITHUB_RUN_ID}.tgz" tar -C ../html -zcf ${archive} . - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "publish2 development PR-${{ github.event.number }} ${archive}" > \ - "monitor_${GITHUB_RUN_ID}.txt" - echo "${{ github.event.number }}" > pr.txt - else + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then # basename will work for both branches and tags branch=$(basename "${{ github.ref }}") - if [[ "${branch}" == "main" ]]; then - echo "publish2 approved latest ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" + echo "publish2 preview REF-${branch} ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" + else + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "publish2 development PR-${{ github.event.number }} ${archive}" > \ + "monitor_${GITHUB_RUN_ID}.txt" + echo "${{ github.event.number }}" > pr.txt else - echo "publish2 approved ${branch} ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" + # basename will work for both branches and tags + branch=$(basename "${{ github.ref }}") + if [[ "${branch}" == "main" ]]; then + echo "publish2 approved latest ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" + else + echo "publish2 approved ${branch} ${archive}" > "monitor_${GITHUB_RUN_ID}.txt" + fi fi fi - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: doc path: workspace/build/doc diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 263f019bff..23d4690a61 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # Copyright (c) 2021 Li-Pro.Net # SPDX-License-Identifier: Apache-2.0 @@ -17,7 +17,7 @@ jobs: steps: - name: Download artifact - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v6 with: script: | var artifacts = await github.actions.listWorkflowRunArtifacts({ diff --git a/.github/workflows/doc-remove.yml b/.github/workflows/doc-remove.yml index 4f23cf3aac..4bfef7b4b4 100644 --- a/.github/workflows/doc-remove.yml +++ b/.github/workflows/doc-remove.yml @@ -1,10 +1,11 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # Copyright (c) 2021 Li-Pro.Net # SPDX-License-Identifier: Apache-2.0 name: Documentation Remove on: + workflow_dispatch: # And manually on button click pull_request: types: [closed] branches: @@ -28,11 +29,19 @@ jobs: - name: Create documentation removing monitor run: | mkdir doc && cd doc - echo "remove development PR-${{ github.event.number }}" > \ - "monitor_${GITHUB_RUN_ID}.txt" + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + # basename will work for both branches and tags + branch=$(basename "${{ github.ref }}") + echo "remove preview REF-${branch}" > "monitor_${GITHUB_RUN_ID}.txt" + else + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "remove development PR-${{ github.event.number }}" > \ + "monitor_${GITHUB_RUN_ID}.txt" + fi + fi - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: doc path: doc diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 98b6caf60a..4beab1a762 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # Copyright (c) 2021 Li-Pro.Net # SPDX-License-Identifier: Apache-2.0 @@ -11,6 +11,6 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: actions/labeler@v2.1.1 + - uses: actions/labeler@v4 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/qa-compliance.yml b/.github/workflows/qa-compliance.yml index 84cfd12a09..fc803b6a2d 100644 --- a/.github/workflows/qa-compliance.yml +++ b/.github/workflows/qa-compliance.yml @@ -1,9 +1,10 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # SPDX-License-Identifier: Apache-2.0 name: QA Compliance Check on: + workflow_dispatch: # And manually on button click pull_request: types: [opened, synchronize, reopened] @@ -18,14 +19,14 @@ jobs: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: workspace/bridle ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Restore PIP Cache - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-doc-pip @@ -82,7 +83,7 @@ jobs: continue-on-error: true - name: Upload results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: compliance.xml path: workspace/bridle/compliance.xml diff --git a/.github/workflows/qa-integration.yml b/.github/workflows/qa-integration.yml index 85c1118bf0..51f14bbb2c 100644 --- a/.github/workflows/qa-integration.yml +++ b/.github/workflows/qa-integration.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # Copyright (c) 2021 Li-Pro.Net # SPDX-License-Identifier: Apache-2.0 @@ -55,7 +55,7 @@ jobs: rm -rf "${{ github.workspace }}/workspace" - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: workspace/bridle submodules: recursive @@ -74,6 +74,7 @@ jobs: west init -l bridle west update west zephyr-export + west bridle-export - name: Install build and test dependencies working-directory: workspace @@ -95,19 +96,27 @@ jobs: # too high and most of the core tests are already performed by # Zephyr in any case: # - # --testcase-root zephyr/tests/arch/arm \ - # --testcase-root zephyr/tests/kernel \ + # --testsuite-root zephyr/tests/kernel \ + # --testsuite-root zephyr/tests/arch/arm \ + # + # Disabled in the meantime because the execution results + # in the + # twister report XML file: + # + # --testsuite-root bridle/tests/drivers/watchdog \ # export ZEPHYR_BASE="$(pwd)/zephyr" + export BRIDLE_BASE="$(pwd)/bridle" ./zephyr/scripts/twister --verbose --jobs 4 --inline-logs \ --enable-size-report --platform-reports \ --device-testing --hardware-map ${HARDWARE_MAP} \ - --extra-args SHIELD=loopback_test_tmph \ + --extra-args SHIELD="loopback_test_tmph" \ --board-root bridle/boards \ --testcase-root bridle/tests/bridle \ + --testcase-root zephyr/tests/crypto/rand32 \ + --testcase-root zephyr/tests/drivers/entropy \ --testcase-root zephyr/tests/drivers/watchdog \ --testcase-root zephyr/tests/drivers/counter \ - --testcase-root zephyr/tests/drivers/entropy \ --testcase-root zephyr/tests/drivers/hwinfo \ --testcase-root zephyr/tests/drivers/gpio \ --testcase-root zephyr/tests/drivers/spi \ @@ -115,14 +124,14 @@ jobs: continue-on-error: true - name: Upload results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: twister_report.xml path: workspace/twister-out/twister_report.xml continue-on-error: true - name: Convert integration test reports to annotations - uses: mikepenz/action-junit-report@v2.4.2 + uses: mikepenz/action-junit-report@v3 with: check_name: twister-report (${{ matrix.board }}) report_paths: "**/twister-out/twister_report.xml" diff --git a/.github/workflows/qa-licenses.yml b/.github/workflows/qa-licenses.yml index 1f9d0a48dc..d321d8efeb 100644 --- a/.github/workflows/qa-licenses.yml +++ b/.github/workflows/qa-licenses.yml @@ -1,9 +1,10 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # SPDX-License-Identifier: Apache-2.0 name: QA License Check on: + workflow_dispatch: # And manually on button click pull_request: types: [opened, synchronize, reopened] @@ -14,16 +15,16 @@ jobs: steps: - name: Checkout the code - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Scan the code - uses: zephyrproject-rtos/action_scancode@v3 + uses: zephyrproject-rtos/action_scancode@v4 id: scancode with: directory-to-scan: 'scan/' - name: Upload results - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: scancode path: ./artifacts diff --git a/.github/workflows/qa-manifest.yml b/.github/workflows/qa-manifest.yml index 2ed93aa586..65669f5fcb 100644 --- a/.github/workflows/qa-manifest.yml +++ b/.github/workflows/qa-manifest.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # Copyright (c) 2021 Li-Pro.Net # SPDX-License-Identifier: Apache-2.0 @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout the code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: workspace/bridle ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3becec0e3c..17f33b0a26 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 TiaC Systems +# Copyright (c) 2021-2022 TiaC Systems # SPDX-License-Identifier: Apache-2.0 name: Mark Stale Issues and Pull Requests @@ -18,7 +18,7 @@ jobs: if: github.repository == 'tiacsys/bridle' steps: - - uses: actions/stale@v3 + - uses: actions/stale@v6 with: days-before-stale: 90 days-before-close: 30