From 793d8986f49ef24f9824b76f41e08b79070c70fe Mon Sep 17 00:00:00 2001 From: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com> Date: Fri, 22 Aug 2025 13:46:12 -0700 Subject: [PATCH] Test ESP32C3 connectivity --- .github/workflows/auto-release.yml | 136 ----------- .github/workflows/ci.yml | 51 ----- .github/workflows/coverity_scan.yml | 138 ----------- .github/workflows/esp32c3-test.yml | 22 ++ .github/workflows/git-secrets.yml | 24 -- .github/workflows/kernel-checks.yml | 69 ------ .github/workflows/kernel-demos.yml | 342 ---------------------------- .github/workflows/unit-tests.yml | 56 ----- 8 files changed, 22 insertions(+), 816 deletions(-) delete mode 100644 .github/workflows/auto-release.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/coverity_scan.yml create mode 100644 .github/workflows/esp32c3-test.yml delete mode 100644 .github/workflows/git-secrets.yml delete mode 100644 .github/workflows/kernel-checks.yml delete mode 100644 .github/workflows/kernel-demos.yml delete mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml deleted file mode 100644 index 2cd6fde6e..000000000 --- a/.github/workflows/auto-release.yml +++ /dev/null @@ -1,136 +0,0 @@ -name: Kernel-Auto-Release - -on: - workflow_dispatch: - inputs: - commit_id: - description: 'Commit ID' - required: true - default: 'HEAD' - version_number: - description: 'Version Number (Ex. 10.4.4)' - required: true - default: '10.4.4' - main_br_version: - description: "Version String for task.h on main branch (leave empty to leave as-is)." - required: false - default: '' - -jobs: - release-packager: - permissions: - id-token: write - name: Release Packager - runs-on: ubuntu-latest - steps: - # Install python 3 - - name: Tool Setup - uses: actions/setup-python@v2 - with: - architecture: x64 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Currently FreeRTOS/.github/scripts houses the release script. Download it for upcoming usage - - name: Checkout FreeRTOS Release Tools - uses: actions/checkout@v4.1.1 - with: - repository: FreeRTOS/FreeRTOS - path: tools - - # Simpler git auth if we use checkout action and forward the repo to release script - - name: Checkout FreeRTOS Kernel - uses: actions/checkout@v4.1.1 - with: - path: local_kernel - fetch-depth: 0 - - - name: Configure git identity - env: - ACTOR: ${{ github.actor }} - run: | - git config --global user.name "$ACTOR" - git config --global user.email "$ACTOR"@users.noreply.github.com - - - name: create a new branch that references commit id - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - COMMIT_ID: ${{ github.event.inputs.commit_id }} - working-directory: ./local_kernel - run: | - git checkout -b "$VERSION_NUMBER" "$COMMIT_ID" - echo "COMMIT_SHA_1=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - name: Update source files with version info - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - MAIN_BR_VERSION_NUMBER: ${{ github.event.inputs.main_br_version }} - COMMIT_SHA_1: ${{ env.COMMIT_SHA_1 }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Install deps and run - pip install -r ./tools/.github/scripts/release-requirements.txt - ./tools/.github/scripts/update_src_version.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit="$COMMIT_SHA_1" --new-kernel-version="$VERSION_NUMBER" --new-kernel-main-br-version="$MAIN_BR_VERSION_NUMBER" - exit $? - - - name : Update version number in manifest.yml - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - working-directory: ./local_kernel - run: | - ./.github/scripts/manifest_updater.py -v "$VERSION_NUMBER" - exit $? - - - name : Commit version number change in manifest.yml - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - working-directory: ./local_kernel - run: | - git add . - git commit -m '[AUTO][RELEASE]: Update version number in manifest.yml' - git push -u origin "$VERSION_NUMBER" - - - name: Generate SBOM - uses: FreeRTOS/CI-CD-Github-Actions/sbom-generator@main - with: - repo_path: ./local_kernel - source_path: ./ - - - name: commit SBOM file - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - working-directory: ./local_kernel - run: | - git add . - git commit -m '[AUTO][RELEASE]: Update SBOM' - git push -u origin "$VERSION_NUMBER" - echo "COMMIT_SHA_2=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - name: Release - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - MAIN_BR_VERSION_NUMBER: ${{ github.event.inputs.main_br_version }} - COMMIT_SHA_2: ${{ env.COMMIT_SHA_2 }} - REPO_OWNER: ${{ github.repository_owner }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Install deps and run - pip install -r ./tools/.github/scripts/release-requirements.txt - ./tools/.github/scripts/release.py "$REPO_OWNER" --kernel-repo-path=local_kernel --kernel-commit="$COMMIT_SHA_2" --new-kernel-version="$VERSION_NUMBER" --new-kernel-main-br-version="$MAIN_BR_VERSION_NUMBER" - exit $? - - - name: Backup Release Asset - uses: FreeRTOS/CI-CD-Github-Actions/artifact-backup@main - with: - # This is dependent on the release script putting this zip file - # in this exact location. - artifact_path: ./FreeRTOS-KernelV${{ github.event.inputs.version_number }}.zip - release_tag: ${{ github.event.inputs.version_number }} - - - name: Cleanup - env: - VERSION_NUMBER: ${{ github.event.inputs.version_number }} - working-directory: ./local_kernel - run: | - # Delete the branch created for Tag by SBOM generator - git push -u origin --delete "$VERSION_NUMBER" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 2765466be..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: CI Checks -on: - push: - branches: ["**"] - pull_request: - branches: [main] - workflow_dispatch: -jobs: - formatting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.1 - - name: Check Formatting of FreeRTOS-Kernel Files - uses: FreeRTOS/CI-CD-Github-Actions/formatting@main - with: - exclude-dirs: portable - - spell-check: - runs-on: ubuntu-latest - steps: - - name: Clone This Repo - uses: actions/checkout@v4.1.1 - - name: Run spellings check - uses: FreeRTOS/CI-CD-Github-Actions/spellings@main - with: - path: ./ - exclude-files: History.txt - - link-verifier: - runs-on: ubuntu-latest - steps: - - name: Clone This Repo - uses: actions/checkout@v4.1.1 - - name: Link Verification - uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main - with: - allowlist-file: '.github/allowed_urls.txt' - - verify-manifest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - fetch-depth: 0 - - - name: Run manifest verifier - uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main - with: - path: ./ - fail-on-incorrect-version: true diff --git a/.github/workflows/coverity_scan.yml b/.github/workflows/coverity_scan.yml deleted file mode 100644 index 0afc8e2e1..000000000 --- a/.github/workflows/coverity_scan.yml +++ /dev/null @@ -1,138 +0,0 @@ -name: Coverity Scan -on: - # Run on every commit to mainline - push: - branches: main - # Allow manual running of the scan - workflow_dispatch: - -env: - bashPass: \033[32;1mPASSED - - bashInfo: \033[33;1mINFO - - bashFail: \033[31;1mFAILED - - bashEnd: \033[0m - -jobs: - Coverity-Scan: - if: ( github.repository == 'FreeRTOS/FreeRTOS-Kernel' ) - name: Coverity Scan - runs-on: ubuntu-latest - steps: - - name: Checkout the Repository - uses: actions/checkout@v4.1.1 - - - env: - stepName: Install Build Essentials - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - sudo apt-get -y update - sudo apt-get -y install build-essential - - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - - - env: - stepName: Install Coverity Build - COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - wget -nv -q -O "$HOME/cov-analysis.tar.gz" https://scan.coverity.com/download/linux64 --post-data="token=${COVERITY_TOKEN}&project=FreeRTOS-Kernel" - - EXPECTED_MD5="e4418004b073140d67390cffba79c3b2" - GENERATED_MD5=$(md5sum "$HOME/cov-analysis.tar.gz" | awk '{print $1}') - - if [ "$GENERATED_MD5" = "$EXPECTED_MD5" ]; then - tar -zxf "$HOME/cov-analysis.tar.gz" --one-top-level=cov_scan -C "$HOME" - echo "cov_scan_path=$HOME/cov_scan/bin" >> $GITHUB_ENV - sudo rm -f "$HOME/cov-analysis.tar.gz" - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }} " - else - echo -e "${{ env.bashFail }} MD5 checksum verification failed for cov-analysis.tar.gz ${{ env.bashEnd }}" - echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" - exit -1 - fi - - - env: - stepName: Coverity Build - COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - COVERITY_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - export PATH="$PATH:${{env.cov_scan_path}}" - cmake -S ./examples/cmake_example/ -B build - cd build - cov-build --dir cov-int make -j - # Move the report out of the build directory - tar czvf ../gcc_freertos_kernel_sample_build.tgz cov-int - - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }} " - - - env: - stepName: Upload Coverity Report for Scan - COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - COVERITY_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - COV_SCAN_UPLOAD_STATUS=$(curl --form token=${COVERITY_TOKEN} \ - --form email=${COVERITY_EMAIL} \ - --form file=@gcc_freertos_kernel_sample_build.tgz \ - --form version="Mainline" \ - --form description="FreeRTOS Kernel Commit Scan" \ - https://scan.coverity.com/builds?project=FreeRTOS-Kernel) - - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }} " - echo "${COV_SCAN_UPLOAD_STATUS}" | grep -q -e 'Build successfully submitted' || echo >&2 "Error submitting build for analysis: ${COV_SCAN_UPLOAD_STATUS}" - - - env: - stepName: Coverity Build for SMP FreeRTOS - COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - COVERITY_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - export PATH="$PATH:${{env.cov_scan_path}}" - cmake -S ./examples/cmake_example/ -B build -DFREERTOS_SMP_EXAMPLE=1 - cd build - cov-build --dir cov-int make -j - # Move the report out of the build directory - tar czvf ../gcc_freertos_kernel_smp_sample_build.tgz cov-int - - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }} " - - - env: - stepName: Upload FreeRTOS SMP Coverity Report for Scan - COVERITY_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - COVERITY_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - COV_SCAN_UPLOAD_STATUS=$(curl --form token=${COVERITY_TOKEN} \ - --form email=${COVERITY_EMAIL} \ - --form file=@gcc_freertos_kernel_smp_sample_build.tgz \ - --form version="Mainline" \ - --form description="FreeRTOS Kernel SMP Commit Scan" \ - https://scan.coverity.com/builds?project=FreeRTOS-Kernel) - - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }} " - echo "${COV_SCAN_UPLOAD_STATUS}" | grep -q -e 'Build successfully submitted' || echo >&2 "Error submitting build for analysis: ${COV_SCAN_UPLOAD_STATUS}" diff --git a/.github/workflows/esp32c3-test.yml b/.github/workflows/esp32c3-test.yml new file mode 100644 index 000000000..7f570d5fa --- /dev/null +++ b/.github/workflows/esp32c3-test.yml @@ -0,0 +1,22 @@ +name: Hardware Runner PenTest Example Jobs + +on: + push: + workflow_dispatch: + +jobs: + esp32c3-execution: + # Specify that you want to run on a hardware runner + runs-on: + - self-hosted + - cirunner-type-vm + - cirunner-size-micro + - cirunner-image-ubuntu-runner-vm + - cirunner-hardware-esp32c3 + + steps: + - name: install usb utils + run: apt update && apt install usbutils + + - name: lsusb + run: lsusb \ No newline at end of file diff --git a/.github/workflows/git-secrets.yml b/.github/workflows/git-secrets.yml deleted file mode 100644 index 81b929cd3..000000000 --- a/.github/workflows/git-secrets.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: git-secrets Check -on: - push: - pull_request: - workflow_dispatch: -jobs: - git-secrets: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: recursive - - name: Checkout awslabs/git-secrets - uses: actions/checkout@v4.1.1 - with: - repository: awslabs/git-secrets - ref: master - path: git-secrets - - name: Install git-secrets - run: cd git-secrets && sudo make install && cd .. - - name: Run git-secrets - run: | - git-secrets --register-aws - git-secrets --scan diff --git a/.github/workflows/kernel-checks.yml b/.github/workflows/kernel-checks.yml deleted file mode 100644 index 05443458c..000000000 --- a/.github/workflows/kernel-checks.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Kernel-Checker - -on: [push, pull_request] - -jobs: - kernel-checker: - name: FreeRTOS Kernel Header Checks - runs-on: ubuntu-latest - steps: - # Install python 3 - - name: Tool Setup - uses: actions/setup-python@v3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # There is shared code, hosted by FreeRTOS/FreeRTOS, with deps needed by header checker - - name: Checkout FreeRTOS Tools - uses: actions/checkout@v4.1.1 - with: - repository: FreeRTOS/FreeRTOS - sparse-checkout: '.github' - ref: main - path: tools - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: inspect - - # Collect all affected files - - name: Collecting changed files - uses: lots0logs/gh-action-get-changed-files@2.2.2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - # Run checks - - env: - bashPass: \033[32;1mPASSED - - bashInfo: \033[33;1mINFO - - bashFail: \033[31;1mFAILED - - bashEnd: \033[0m - stepName: Check File Headers - name: ${{ env.stepName }} - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} Install Dependencies ${{ env.bashEnd }}" - - # Copy the common tools from the FreeRTOS/FreeRTOS repo. - mv tools/.github/scripts/common inspect/.github/scripts - - # Install the necessary python dependencies - pip install -r inspect/.github/scripts/common/requirements.txt - cd inspect - - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - - # Use the python script to check the copyright header of modified files. - .github/scripts/kernel_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json - exitStatus=$? - echo -e "::endgroup::" - - if [ $exitStatus -eq 0 ]; then - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - else - echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" - fi - exit $exitStatus diff --git a/.github/workflows/kernel-demos.yml b/.github/workflows/kernel-demos.yml deleted file mode 100644 index 9371e9cea..000000000 --- a/.github/workflows/kernel-demos.yml +++ /dev/null @@ -1,342 +0,0 @@ -name: FreeRTOS-Kernel Demos -on: [push, pull_request] - -env: - # The bash escape character is \033 - bashPass: \033[32;1mPASSED - - bashInfo: \033[33;1mINFO - - bashFail: \033[31;1mFAILED - - bashEnd: \033[0m - -jobs: - WIN32-MSVC: - name: WIN32 MSVC - runs-on: windows-latest - steps: - - name: Checkout the FreeRTOS/FreeRTOS Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - submodules: 'recursive' - fetch-depth: 1 - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1 - - - name: Build WIN32-MSVC Demo - working-directory: FreeRTOS/Demo/WIN32-MSVC - run: msbuild WIN32.sln -t:rebuild - - - name: Build WIN32-MSVC-Static-Allocation-Only Demo - working-directory: FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only - run: msbuild WIN32.sln -t:rebuild - - WIN32-MingW: - name: WIN32 MingW - runs-on: windows-latest - steps: - - name: Checkout the FreeRTOS/FreeRTOS Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - submodules: 'recursive' - fetch-depth: 1 - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - name: Build WIN32-MingW Demo - working-directory: FreeRTOS/Demo/WIN32-MingW - run: | - gcc --version - make --version - make - - POSIX-GCC: - name: Native GCC - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - ubuntu-latest - runs-on: ${{ matrix.os }} - steps: - - name: Checkout the FreeRTOS/FreeRTOS Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - submodules: 'recursive' - fetch-depth: 1 - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - name: Install GCC - shell: bash - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get -y update - sudo apt-get -y install build-essential - - - name: Build Posix_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/Posix_GCC - run: make -j - - - name: Build Posix_GCC Demo for Coverage Test - shell: bash - working-directory: FreeRTOS/Demo/Posix_GCC - run: make -j COVERAGE_TEST=1 - - CMake-Example: - name: CMake Example with Native GCC - runs-on: ubuntu-latest - steps: - # Checkout user pull request changes - - name: Checkout Repository - uses: actions/checkout@v4.1.1 - - - name: Install GCC - shell: bash - run: | - sudo apt-get -y update - sudo apt-get -y install build-essential - - - name: Build CMake Example Demo - shell: bash - working-directory: examples/cmake_example - run: | - cmake -S . -B build - cmake --build build - - - name: Build CMake SMP Example Demo - shell: bash - working-directory: examples/cmake_example - run: | - cmake -S . -B build -DFREERTOS_SMP_EXAMPLE=1 - cmake --build build - - MSP430-GCC: - name: GNU MSP430 Toolchain - runs-on: ubuntu-latest - steps: - - name: Checkout the FreeRTOS/FreeRTOS Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - submodules: 'recursive' - fetch-depth: 1 - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - env: - stepName: Install MSP430 Toolchain - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - sudo apt update -y - sudo apt install -y p7zip-full - pushd $HOME - curl -L -o msp430-gcc-full-linux-x64-installer-9.3.1.2.7z https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-full-linux-x64-installer-9.3.1.2.7z - - EXPECTED_MD5="2db2f99b4cd5c541ca0389ee20c67527" - GENERATED_MD5=$(md5sum msp430-gcc-full-linux-x64-installer-9.3.1.2.7z | awk '{print $1}') - - if [ "$GENERATED_MD5" = "$EXPECTED_MD5" ]; then - 7z x ./msp430-gcc-full-linux-x64-installer-9.3.1.2.7z - chmod +x ./msp430-gcc-full-linux-x64-installer-9.3.1.2.run - sudo ./msp430-gcc-full-linux-x64-installer-9.3.1.2.run --prefix /usr/bin/msp430-gcc --mode unattended - echo "::endgroup::" - popd - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - else - popd - echo -e "${{ env.bashFail }} MD5 checksum verification failed for msp430-gcc-full-linux-x64-installer-9.3.1.2.7z ${{ env.bashEnd }}" - echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" - exit -1 - fi - - - name: Build msp430_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/msp430_GCC - run: make -j CC=/usr/bin/msp430-gcc/bin/msp430-elf-gcc OPT="-Os -I/usr/bin/msp430-gcc/include -L/usr/bin/msp430-gcc/include" - - MicroBlaze-GCC: - name: GCC MicroBlaze Toolchain - runs-on: ubuntu-latest - steps: - - name: Checkout the FreeRTOS/FreeRTOS Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - fetch-depth: 1 - - - env: - stepName: Fetch Community-Supported-Demos Submodule - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos - # This repository contains the microblaze_instructions.h header file - git clone https://github.com/Xilinx/embeddedsw.git --branch xilinx_v2023.1 - echo "::endgroup::" - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - env: - stepName: Install Dependancies - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - sudo apt update -y - sudo apt upgrade -y - sudo apt install -y build-essential m4 debhelper bison texinfo dejagnu flex - sudo apt install -y autogen gawk libgmp-dev libmpc-dev libmpfr-dev - sudo apt install -y patchutils sharutils zlib1g-dev autoconf2.64 - - pushd $HOME - # Download the mb-gcc toolchain from github - curl -L -o binutils-microblaze.deb https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/binutils-microblaze_2.35-2021-0623+1_amd64.deb; - curl -L -o gcc-microblaze.deb https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/gcc-microblaze_10.2.0-2021-0623+2_amd64.deb; - curl -L -o libnewlib-microblaze-dev.deb https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/libnewlib-microblaze-dev_3.3.0-2021-0623+3_all.deb; - curl -L -o libnewlib-microblaze-doc.deb https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/libnewlib-microblaze-doc_3.3.0-2021-0623+3_all.deb; - curl -L -o libnewlib-microblaze.deb https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/libnewlib-microblaze_3.3.0-2021-0623+3_all.deb; - curl -L -o newlib-source.deb https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/newlib-source_3.3.0-2021-0623+3_all.deb; - popd - - # Install the packages for the toolchain - sudo apt install -y $HOME/binutils-microblaze.deb; - sudo apt install -y $HOME/gcc-microblaze.deb; - sudo apt install -y $HOME/libnewlib-microblaze-dev.deb; - sudo apt install -y $HOME/libnewlib-microblaze-doc.deb; - sudo apt install -y $HOME/libnewlib-microblaze.deb; - sudo apt install -y $HOME/newlib-source.deb; - - # Validate that the toolchain is in the path and can be called - which mb-gcc - mb-gcc --version - - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - - - env: - stepName: Compile Microblaze Port - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - # Compile MicroBlazeV9 Port files to validate they build - mb-gcc -mcpu=v9.5 -c \ - FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c \ - FreeRTOS/Source/portable/GCC/MicroBlazeV9/portasm.S \ - FreeRTOS/Source/portable/GCC/MicroBlazeV9/port_exceptions.c \ - FreeRTOS/Source/tasks.c \ - FreeRTOS/Source/list.c \ - -I embeddedsw/lib/bsp/standalone/src/microblaze \ - -I FreeRTOS/Source/portable/GCC/MicroBlazeV9/ \ - -I FreeRTOS/Source/include \ - -I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src \ - -I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/libsrc/standalone_v5_4/src \ - -I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/include \ - -I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/libsrc/intc_v3_5/src - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - - - ARM-GCC: - name: GNU ARM Toolchain - runs-on: ubuntu-latest - steps: - - name: Checkout the FreeRTOS/FreeRTOS Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - fetch-depth: 1 - - - env: - stepName: Fetch Dependencies - shell: bash - run: | - # ${{ env.stepName }} - echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace - echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - name: Install GNU ARM Toolchain - shell: bash - run: | - sudo apt-get -y update - sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal - - - name: Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC - run: make -j - - - name: Build CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC - run: cmake -S . -B build && make -j -C build all - - - name: Build CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC - run: cmake -S . -B build && make -j -C build all - - - name: Build CORTEX_LM3S102_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/CORTEX_LM3S102_GCC - run: make -j - - - name: Build CORTEX_LM3S811_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/CORTEX_LM3S811_GCC - run: make -j - - - name: Build CORTEX_M0+_RP2040 Demos - shell: bash - working-directory: FreeRTOS/Demo/ThirdParty/Community-Supported-Demos/CORTEX_M0+_RP2040 - run: | - git clone https://github.com/raspberrypi/pico-sdk.git - cmake -B build -DPICO_SDK_PATH=pico-sdk -GNinja - ninja -C build --verbose - - - name: Build CORTEX_MPS2_QEMU_IAR_GCC Demo - shell: bash - working-directory: FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC - run: make -C build/gcc -j diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index bc8aaf69c..000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: CMock Unit Tests -on: [push, pull_request] - -jobs: - run: - runs-on: ubuntu-latest - steps: - - name: Checkout Parent Repository - uses: actions/checkout@v4.1.1 - with: - ref: main - repository: FreeRTOS/FreeRTOS - submodules: 'recursive' - fetch-depth: 1 - - # Checkout user pull request changes - - name: Checkout Pull Request - uses: actions/checkout@v4.1.1 - with: - path: ./FreeRTOS/Source - - - name: Setup Python - uses: actions/setup-python@master - with: - python-version: 3.8 - - - name: Install packages - run: | - sudo apt-get install lcov cflow ruby doxygen build-essential unifdef - - name: Run Unit Tests with ENABLE_SANITIZER=1 - run: | - make -C FreeRTOS/Test/CMock clean - make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted - - name: Run Unit Tests for coverage - run: | - make -C FreeRTOS/Test/CMock clean - make -C FreeRTOS/Test/CMock lcovhtml - lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3.1.0 - with: - files: ${{ github.workspace }}/FreeRTOS/Test/CMock/build/cmock_test.info - root_dir: ${{ github.workspace }}/FreeRTOS/Source - flags: unittests - fail_ci_if_error: false - verbose: false - - name: Archive code coverage data - uses: actions/upload-artifact@v4 - with: - name: coverage-data - path: FreeRTOS/Test/CMock/build/cmock_test* - - name: Archive code coverage html report - uses: actions/upload-artifact@v4 - with: - name: coverage-report - path: FreeRTOS/Test/CMock/build/coverage