This is an automated email from the ASF dual-hosted git repository. sjanc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit bf6225bcdf0f89922449e074216d80db5bd29fbd Author: Szymon Janc <[email protected]> AuthorDate: Tue Oct 13 01:45:45 2026 +0200 ci: Merge build workflows into single workflow Each build and test workflow downloaded all external repositories on its own and long running jobs built everything sequentially. Merge build, test targets, GCC versions, bootloader, applications, mtest applications and unit tests workflows into single workflow. Prepare job installs newt and downloads repositories once and passes them to all Linux jobs as workflow artifact, so those jobs don't run newt upgrade at all. Windows and macOS jobs still set up project on their own. Blinky, bootloader and applications are split into shards built in parallel jobs. Number of jobs running in parallel is limited to fit ASF job concurrency limit per workflow. README is updated to show single badge for merged workflow. Assisted-by: Claude:claude-opus-5-5 --- .github/actions/newt-project-restore/action.yml | 61 ++++ .github/workflows/build.yml | 391 ++++++++++++++++++++++++ .github/workflows/build_all_apps.yml | 72 ----- .github/workflows/build_blinky.yml | 77 ----- .github/workflows/build_bootloader.yml | 68 ----- .github/workflows/build_cc_target.yml | 68 ----- .github/workflows/build_mtest_apps.yml | 73 ----- .github/workflows/build_targets.yml | 87 ------ .github/workflows/newt_test_all.yml | 70 ----- README.md | 24 +- 10 files changed, 454 insertions(+), 537 deletions(-) diff --git a/.github/actions/newt-project-restore/action.yml b/.github/actions/newt-project-restore/action.yml new file mode 100644 index 000000000..e0bfdf539 --- /dev/null +++ b/.github/actions/newt-project-restore/action.yml @@ -0,0 +1,61 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: Restore newt project +description: > + Restore newt and newt project prepared by prepare job of the same + workflow run, so that external repositories are downloaded only once + per run. Project file is replaced with one provided by job. + +inputs: + project: + description: Project file to use (relative to repository root) + required: true + path: + description: Directory to restore project to + required: false + default: build + +runs: + using: composite + steps: + - name: Download project + uses: actions/download-artifact@v8 + with: + name: newt-project + path: ${{ runner.temp }}/newt-project + + - name: Extract project + shell: bash + run: | + mkdir -p "${{ inputs.path }}" + zstd -d -c "$RUNNER_TEMP/newt-project/newt-project.tar.zst" | tar -x -C "${{ inputs.path }}" + rm -rf "$RUNNER_TEMP/newt-project" + mv "${{ inputs.path }}/.newt-bin" "$GITHUB_WORKSPACE/.newt-bin" + echo "$GITHUB_WORKSPACE/.newt-bin" >> "$GITHUB_PATH" + + # Repositories were upgraded by prepare job for tested commit, so + # only project file needs to be updated. + - name: Set up project file + shell: bash + run: | + cp -f "${{ inputs.project }}" "${{ inputs.path }}/project.yml" + sed -i "s/0.0.0/$GITHUB_SHA-commit/g" "${{ inputs.path }}/project.yml" + cd "${{ inputs.path }}" + newt info diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..2c01cb171 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,391 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: Build + +on: + push: + branches: + - master + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + # Downloads external repositories once per run, all Linux jobs use + # project prepared by this job. + prepare: + name: Prepare project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Install newt + uses: ./.github/actions/newt-install + - name: Set up project + uses: ./.github/actions/newt-project + with: + project: .github/project.yml + save-cache: true + - name: Pack project + shell: bash + run: | + cp -r .newt-bin build/.newt-bin + tar -C build -cf - . | zstd -T0 -3 -o newt-project.tar.zst + ls -lh newt-project.tar.zst + - name: Upload project + uses: actions/upload-artifact@v7 + with: + name: newt-project + path: newt-project.tar.zst + compression-level: 0 + retention-days: 1 + + blinky: + name: Build blinky + needs: prepare + strategy: + fail-fast: false + matrix: + shard: [0, 1] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: '15.2.Rel1' + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc-multilib ccache + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project.yml + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: blinky-${{ matrix.shard }} + - name: Build Blinky + shell: bash + env: + SHARD_INDEX: ${{ matrix.shard }} + SHARD_TOTAL: 2 + run: | + cd build + bash ../.github/test_build_blinky.sh + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: blinky-${{ matrix.shard }} + + blinky-other-os: + name: Build blinky + strategy: + fail-fast: false + matrix: + os: [windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: '15.2.Rel1' + - name: Install GNU sed + if: matrix.os == 'macos-latest' + run: | + brew install gnu-sed + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH + - name: Install newt + uses: ./.github/actions/newt-install + - name: Set up project + uses: ./.github/actions/newt-project + with: + project: .github/project.yml + - name: Build Blinky + shell: bash + run: | + cd build + bash ../.github/test_build_blinky.sh + + bootloader: + name: Build bootloader + needs: prepare + strategy: + fail-fast: false + matrix: + shard: [0, 1] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: '15.2.Rel1' + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc-multilib ccache + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project.yml + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: bootloader-${{ matrix.shard }} + - name: Build bootloader + shell: bash + env: + SHARD_INDEX: ${{ matrix.shard }} + SHARD_TOTAL: 2 + run: | + cd build + bash ../.github/test_build_bootloader.sh + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: bootloader-${{ matrix.shard }} + + apps: + name: Build all apps + needs: prepare + strategy: + fail-fast: false + matrix: + shard: [0, 1] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: '15.2.Rel1' + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc-multilib ccache + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project_build_all_apps.yml + - name: Remove project targets + shell: bash + run: rm -rf build/targets + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: apps-${{ matrix.shard }} + - name: Build applications + shell: bash + env: + SHARD_INDEX: ${{ matrix.shard }} + SHARD_TOTAL: 2 + run: | + cd build + bash ../.github/test_build_apps.sh + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: apps-${{ matrix.shard }} + + targets: + name: Build all test targets + needs: prepare + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: '15.2.Rel1' + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project.yml + - name: Remove project targets + shell: bash + run: rm -rf build/targets + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: targets + - name: Build targets + shell: bash + run: | + cp -r .github/targets build/targets + cd build + ls targets | xargs -n1 sh -c 'echo "Testing $0"; newt build -q $0' + rm -rf targets + - name: Build Linux-only targets + shell: bash + run: | + cp -r .github/targets_linux build/targets + cd build + ls targets | xargs -n1 sh -c 'echo "Testing $0"; newt build -q $0' + rm -rf targets + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: targets + + targets-other-os: + name: Build all test targets + strategy: + fail-fast: false + matrix: + os: [windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: '15.2.Rel1' + - name: Install GNU sed + if: matrix.os == 'macos-latest' + run: | + brew install gnu-sed + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH + - name: Install newt + uses: ./.github/actions/newt-install + - name: Set up project + uses: ./.github/actions/newt-project + with: + project: .github/project.yml + - name: Remove project targets + shell: bash + run: rm -rf build/targets + - name: Build targets + shell: bash + run: | + cp -r .github/targets build/targets + cd build + ls targets | xargs -n1 sh -c 'echo "Testing $0"; newt build -q $0' + rm -rf targets + + mtest-apps: + name: Build mtest apps + needs: prepare + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: 15.2.Rel1 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc-multilib ccache + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project_build_mtest_apps.yml + - name: Remove project targets + shell: bash + run: rm -rf build/targets + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: mtest-apps + - name: Build mtest apps + shell: bash + run: | + cd build + bash ../.github/test_build_mtest_apps.sh + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: mtest-apps + + gcc-target: + name: Build GCC test target + needs: prepare + strategy: + fail-fast: false + # Limit number of parallel jobs, ASF policy limits job concurrency + # level per workflow + max-parallel: 2 + matrix: + gcc: ['15.2.Rel1', '14.2.Rel1', '13.2.Rel1', '12.2.Rel1', '11.3.Rel1', '10.3-2021.10', '9-2020-q2', '8-2019-q3'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: carlosperate/[email protected] + with: + release: ${{ matrix.gcc }} + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project_build_cc_target.yml + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: gcc-target-${{ matrix.gcc }} + - name: Build targets + shell: bash + run: | + cd build + newt build @apache-mynewt-core/targets/coverity/btshell_nrf52840_coverity + newt build @apache-mynewt-core/targets/coverity/btshell_nrf52840_coverity2 + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: gcc-target-${{ matrix.gcc }} + + unit-tests: + name: Run unit tests + needs: prepare + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc-multilib ccache + - name: Restore project + uses: ./.github/actions/newt-project-restore + with: + project: .github/project_newt_test_all.yml + - name: Restore ccache + uses: ./.github/actions/ccache-restore + with: + key: unit-tests + - name: Switch to main mcuboot + # This is temporary until next mcuboot release is available + shell: bash + run: | + cd build/repos/mcuboot + git fetch origin main:main + git checkout main + - name: newt test all + run: | + cd build + newt test all + - name: Save ccache + if: always() + uses: ./.github/actions/ccache-save + with: + key: unit-tests diff --git a/.github/workflows/build_all_apps.yml b/.github/workflows/build_all_apps.yml deleted file mode 100644 index 1c510dc9a..000000000 --- a/.github/workflows/build_all_apps.yml +++ /dev/null @@ -1,72 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Apps - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - targets: - name: Build all apps - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - uses: carlosperate/[email protected] - with: - release: '15.2.Rel1' - - name: Install Dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib ccache - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project_build_all_apps.yml - - name: Remove project targets - shell: bash - run: rm -rf build/targets - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: apps - - name: Build applications - shell: bash - run: | - cd build - bash ../.github/test_build_apps.sh - cd .. - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: apps diff --git a/.github/workflows/build_blinky.yml b/.github/workflows/build_blinky.yml deleted file mode 100644 index 673db3ff2..000000000 --- a/.github/workflows/build_blinky.yml +++ /dev/null @@ -1,77 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Blinky - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - blinky: - name: Build blinky - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v7 - - uses: carlosperate/[email protected] - with: - release: '15.2.Rel1' - - name: Install Dependencies - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib ccache - - name: Install GNU sed - if: matrix.os == 'macos-latest' - run: | - brew install gnu-sed - echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project.yml - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: blinky - - name: Build Blinky - shell: bash - run: | - cd build - bash ../.github/test_build_blinky.sh - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: blinky diff --git a/.github/workflows/build_bootloader.yml b/.github/workflows/build_bootloader.yml deleted file mode 100644 index 546ddcd28..000000000 --- a/.github/workflows/build_bootloader.yml +++ /dev/null @@ -1,68 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Bootloader - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - bootloader: - name: Build bootloader - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - uses: carlosperate/[email protected] - with: - release: '15.2.Rel1' - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib ccache - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project.yml - save-cache: true - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: bootloader - - name: Build bootloader - shell: bash - run: | - cd build - bash ../.github/test_build_bootloader.sh - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: bootloader diff --git a/.github/workflows/build_cc_target.yml b/.github/workflows/build_cc_target.yml deleted file mode 100644 index 66f6fc46f..000000000 --- a/.github/workflows/build_cc_target.yml +++ /dev/null @@ -1,68 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: GCC target - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - targets: - name: Build GCC test target - strategy: - fail-fast: false - matrix: - gcc: ['15.2.Rel1', '14.2.Rel1', '13.2.Rel1', '12.2.Rel1', '11.3.Rel1', '10.3-2021.10', '9-2020-q2', '8-2019-q3'] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - uses: carlosperate/[email protected] - with: - release: ${{ matrix.gcc }} - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project_build_cc_target.yml - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: gcc-target-${{ matrix.gcc }} - - name: Build targets - shell: bash - run: | - cd build - newt build @apache-mynewt-core/targets/coverity/btshell_nrf52840_coverity - newt build @apache-mynewt-core/targets/coverity/btshell_nrf52840_coverity2 - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: gcc-target-${{ matrix.gcc }} diff --git a/.github/workflows/build_mtest_apps.yml b/.github/workflows/build_mtest_apps.yml deleted file mode 100644 index 9764a0239..000000000 --- a/.github/workflows/build_mtest_apps.yml +++ /dev/null @@ -1,73 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Build mtest apps - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - targets: - name: Build all apps - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - uses: carlosperate/[email protected] - with: - release: 15.2.Rel1 - - name: Install Dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib ccache - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project_build_mtest_apps.yml - path: build_mtest - - name: Remove project targets - shell: bash - run: rm -rf build_mtest/targets - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: mtest-apps - - name: Build mtest apps - shell: bash - run: | - cd build_mtest - bash ../.github/test_build_mtest_apps.sh - cd .. - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: mtest-apps diff --git a/.github/workflows/build_targets.yml b/.github/workflows/build_targets.yml deleted file mode 100644 index 114cef7f5..000000000 --- a/.github/workflows/build_targets.yml +++ /dev/null @@ -1,87 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Targets - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - targets: - name: Build all test targets - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v7 - - uses: carlosperate/[email protected] - with: - release: '15.2.Rel1' - - name: Install GNU sed - if: matrix.os == 'macos-latest' - run: | - brew install gnu-sed - echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project.yml - - name: Remove project targets - shell: bash - run: rm -rf build/targets - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: targets - - name: Build targets - shell: bash - run: | - cp -r .github/targets build/targets - cd build - ls targets | xargs -n1 sh -c 'echo "Testing $0"; newt build -q $0' - rm -rf targets - cd .. - - name: Build Linux-only targets - shell: bash - if: matrix.os == 'ubuntu-latest' - run: | - cp -r .github/targets_linux build/targets - cd build - ls targets | xargs -n1 sh -c 'echo "Testing $0"; newt build -q $0' - rm -rf targets - cd .. - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: targets diff --git a/.github/workflows/newt_test_all.yml b/.github/workflows/newt_test_all.yml deleted file mode 100644 index f2ef2f13f..000000000 --- a/.github/workflows/newt_test_all.yml +++ /dev/null @@ -1,70 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Unit tests - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - newt_test: - name: Run newt test all - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib ccache - - name: Install newt - uses: ./.github/actions/newt-install - - name: Set up project - uses: ./.github/actions/newt-project - with: - project: .github/project_newt_test_all.yml - - name: Restore ccache - uses: ./.github/actions/ccache-restore - with: - key: unit-tests - - name: Switch to main mcuboot - # This is temporary until next mcuboot release is available - shell: bash - run: | - cd build/repos/mcuboot - git fetch origin main:main - git checkout main - - name: newt test all - run: | - cd build - newt test all - - name: Save ccache - if: always() - uses: ./.github/actions/ccache-save - with: - key: unit-tests diff --git a/README.md b/README.md index b6b86d05f..c23bc8f2d 100644 --- a/README.md +++ b/README.md @@ -23,34 +23,14 @@ ## CI status -<a href="https://github.com/apache/mynewt-core/actions/workflows/build_blinky.yml"> - <img src="https://github.com/apache/mynewt-core/actions/workflows/build_blinky.yml/badge.svg"> -<a/> - -<a href="https://github.com/apache/mynewt-core/actions/workflows/build_targets.yml"> - <img src="https://github.com/apache/mynewt-core/actions/workflows/build_targets.yml/badge.svg"> -<a/> - -<a href="https://github.com/apache/mynewt-core/actions/workflows/build_cc_target.yml"> - <img src="https://github.com/apache/mynewt-core/actions/workflows/build_cc_target.yml/badge.svg"> -<a/> - -<a href="https://github.com/apache/mynewt-core/actions/workflows/build_bootloader.yml"> - <img src="https://github.com/apache/mynewt-core/actions/workflows/build_bootloader.yml/badge.svg"> +<a href="https://github.com/apache/mynewt-core/actions/workflows/build.yml"> + <img src="https://github.com/apache/mynewt-core/actions/workflows/build.yml/badge.svg"> <a/> <a href="https://github.com/apache/mynewt-core/actions/workflows/build_bootloader_main.yml"> <img src="https://github.com/apache/mynewt-core/actions/workflows/build_bootloader_main.yml/badge.svg"> <a/> -<a href="https://github.com/apache/mynewt-core/actions/workflows/build_all_apps.yml"> - <img src="https://github.com/apache/mynewt-core/actions/workflows/build_all_apps.yml/badge.svg"> -<a/> - -<a href="https://github.com/apache/mynewt-core/actions/workflows/newt_test_all.yml"> - <img src="https://github.com/apache/mynewt-core/actions/workflows/newt_test_all.yml/badge.svg"> -<a/> - <!--HW_CI_START--> ## HW CI status 
