diff --git a/.github/workflows/build_all_apps.yml b/.github/workflows/build_all_apps.yml deleted file mode 100644 index 5fea050909..0000000000 --- a/.github/workflows/build_all_apps.yml +++ /dev/null @@ -1,69 +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 check - -on: [push, pull_request] - -jobs: - targets: - name: Build all apps - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 'stable' - - uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78 - with: - release: '12.2.Rel1' - - name: Install Dependencies - shell: bash - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib - - name: Install newt - shell: bash - run: | - go version - go install mynewt.apache.org/newt/newt@latest - - name: Setup project - shell: bash - run: | - newt new build - cp -f .github/project_build_all_apps.yml build/project.yml - cd build - newt upgrade --shallow=1 - git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA - sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml - newt upgrade --shallow=1 - rm -rf targets - cd .. - - name: Build applications - shell: bash - if: matrix.os == 'ubuntu-latest' - run: | - cd build - bash ../.github/test_build_apps.sh - cd .. diff --git a/.github/workflows/build_blinky.yml b/.github/workflows/build_blinky.yml deleted file mode 100644 index 70898cb6ac..0000000000 --- a/.github/workflows/build_blinky.yml +++ /dev/null @@ -1,69 +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 check - -on: [push, pull_request] - -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@v3 - - uses: actions/setup-go@v3 - with: - go-version: 'stable' - - uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78 - with: - release: '12.2.Rel1' - - name: Install Dependencies - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib - - 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 - run: | - go version - go install mynewt.apache.org/newt/newt@latest - - name: Setup Blinky project - shell: bash - run: | - newt new build - cp -f .github/project.yml build/project.yml - cd build - newt upgrade --shallow=1 - git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA - sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml - newt upgrade --shallow=1 - cd .. - - name: Build Blinky - shell: bash - run: | - cd build - bash ../.github/test_build_blinky.sh diff --git a/.github/workflows/build_bootloader.yml b/.github/workflows/build_bootloader.yml deleted file mode 100644 index 9dc33e36ee..0000000000 --- a/.github/workflows/build_bootloader.yml +++ /dev/null @@ -1,69 +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 check - -on: [push, pull_request] - -jobs: - bootloader: - name: Build bootloader - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 'stable' - - uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78 - with: - release: '12.2.Rel1' - - name: Install Dependencies - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib - - 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 - run: | - go version - go install mynewt.apache.org/newt/newt@latest - - name: Setup project - shell: bash - run: | - newt new build - cp -f .github/project.yml build/project.yml - cd build - newt upgrade --shallow=1 - git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA - sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml - newt upgrade --shallow=1 - cd .. - - name: Build bootloader - shell: bash - run: | - cd build - bash ../.github/test_build_bootloader.sh diff --git a/.github/workflows/build_cc_target.yml b/.github/workflows/build_cc_target.yml deleted file mode 100644 index 88fe1a1a14..0000000000 --- a/.github/workflows/build_cc_target.yml +++ /dev/null @@ -1,62 +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 check - -on: [push, pull_request] - -jobs: - targets: - name: Build GCC test target - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - gcc: ['13.2.Rel1', '12.2.Rel1', '11.3.Rel1', '10.3-2021.10', '9-2020-q2', '8-2019-q3'] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 'stable' - - uses: carlosperate/arm-none-eabi-gcc-action@v1.8.1 - with: - release: ${{ matrix.gcc }} - - name: Install newt - shell: bash - run: | - go version - go install mynewt.apache.org/newt/newt@latest - - name: Setup project - shell: bash - run: | - newt new build - cp -f .github/project_build_cc_target.yml build/project.yml - cd build - newt upgrade --shallow=1 - git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA - sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml - newt upgrade --shallow=1 - cd .. - - name: Build targets - shell: bash - run: | - cd build - newt build -j 1 @apache-mynewt-core/targets/coverity/btshell_nrf52840_coverity - newt build -j 1 @apache-mynewt-core/targets/coverity/btshell_nrf52840_coverity2 diff --git a/.github/workflows/build_targets.yml b/.github/workflows/build_targets.yml deleted file mode 100644 index 1b660b3486..0000000000 --- a/.github/workflows/build_targets.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: Build check - -on: [push, pull_request] - -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@v3 - - uses: actions/setup-go@v3 - with: - go-version: 'stable' - - uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78 - with: - release: '12.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 - run: | - go version - go install mynewt.apache.org/newt/newt@latest - - name: Setup project - shell: bash - run: | - newt new build - cp -f .github/project.yml build/project.yml - cd build - newt upgrade --shallow=1 - git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA - sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml - newt upgrade --shallow=1 - rm -rf targets - cd .. - - 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 .. diff --git a/.github/workflows/check_compliance.yml b/.github/workflows/check_compliance.yml deleted file mode 100644 index 886c300a96..0000000000 --- a/.github/workflows/check_compliance.yml +++ /dev/null @@ -1,71 +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: Compliance check - -on: [pull_request] - -jobs: - style_check: - name: Coding style - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y uncrustify - - name: check style - run: | - .github/check_style.py - - license_check: - name: Licensing - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install Dependencies - run: | - wget https://dlcdn.apache.org//creadur/apache-rat-0.16.1/apache-rat-0.16.1-bin.tar.gz - tar zxf apache-rat-0.16.1-bin.tar.gz apache-rat-0.16.1/apache-rat-0.16.1.jar - mv apache-rat-0.16.1/apache-rat-0.16.1.jar apache-rat.jar - - name: check licensing - run: | - .github/check_license.py - - doxygen_check: - name: Doxygen Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install Dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - name: Check Doxygen - shell: bash - run: | - .github/check_doxygen.py diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index c084f29d81..0000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,45 +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: "Pull Request Labeler" -on: - - pull_request_target - -jobs: - labeler: - permissions: - contents: read - pull-requests: write - issues: write - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Assign labels based on paths - uses: actions/labeler@v5 - with: - sync-labels: true - configuration-path: .github/labeler_cfg.yml - - - name: Assign labels based on the PR's size - uses: codelytv/pr-size-labeler@v1.10.0 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ignore_file_deletions: true diff --git a/.github/workflows/newt_test_all.yml b/.github/workflows/newt_test_all.yml index 655bbce988..0f13835168 100644 --- a/.github/workflows/newt_test_all.yml +++ b/.github/workflows/newt_test_all.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13] + os: [macos-13] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -61,5 +61,6 @@ jobs: cd .. - name: newt test all run: | - cd build - newt test all + cd build/repos/apache-mynewt-core + chmod +x test.sh + test.sh diff --git a/kernel/os/selftest/src/testcases/os_mutex_test_case_1.c b/kernel/os/selftest/src/testcases/os_mutex_test_case_1.c index c83911c9cb..22ac3bc1d3 100644 --- a/kernel/os/selftest/src/testcases/os_mutex_test_case_1.c +++ b/kernel/os/selftest/src/testcases/os_mutex_test_case_1.c @@ -42,5 +42,5 @@ TEST_CASE_TASK(os_mutex_test_case_1) taskpool_alloc_assert(mutex_task3_handler, MYNEWT_VAL(OS_MAIN_TASK_PRIO) + 4); - taskpool_wait_assert(200); + taskpool_wait_assert(400); } diff --git a/kernel/os/selftest/src/testcases/os_mutex_test_case_2.c b/kernel/os/selftest/src/testcases/os_mutex_test_case_2.c index 7a00de57ad..ce10d1325e 100644 --- a/kernel/os/selftest/src/testcases/os_mutex_test_case_2.c +++ b/kernel/os/selftest/src/testcases/os_mutex_test_case_2.c @@ -39,5 +39,5 @@ TEST_CASE_TASK(os_mutex_test_case_2) taskpool_alloc_assert(mutex_task4_handler, MYNEWT_VAL(OS_MAIN_TASK_PRIO) + 5); - taskpool_wait_assert(200); + taskpool_wait_assert(400); } diff --git a/test.sh b/test.sh new file mode 100755 index 0000000000..0bb077d4d6 --- /dev/null +++ b/test.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +cd ../.. + +for ((i=0; i<1000; i++)) do + if ! newt test @apache-mynewt-core/kernel/os/selftest + then + exit 1 + fi +done