Skip to content

Commit

Permalink
Merge pull request #1 from chinglee-iot/202407.00-release
Browse files Browse the repository at this point in the history
202407.00 release yml
  • Loading branch information
chinglee-iot authored Jul 26, 2024
2 parents 5e7ab0d + 165f56d commit 3d124e8
Show file tree
Hide file tree
Showing 100 changed files with 4,983 additions and 2,206 deletions.
1,317 changes: 1,317 additions & 0 deletions .github/.cSpellWords.txt

Large diffs are not rendered by default.

51 changes: 23 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,18 @@ jobs:
spell-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Parent Repo
uses: actions/checkout@v2
with:
ref: main
repository: FreeRTOS/CI-CD-Github-Actions
path: actions
- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run spellings check
uses: FreeRTOS/CI-CD-Github-Actions/spellings@main
with:
ref: ${{ github.event.pull_request.head.sha }}
path: ./NXPRef
- name: Install spell
run: |
sudo apt-get install spell
sudo apt-get install util-linux
- name: Check spelling
run: |
PATH=$PATH:actions/spellings/tools
# Make sure that the portable directory is not included in the spellcheck.
sed -i "s/-iname \\\\\*.\[ch\] -o/-not -path \\\*Middleware\\\\\/NXP\\\* -iname \\\\\*.\[ch\] -o/g" actions/spellings/tools/find-unknown-comment-words
find-unknown-comment-words --directory NXPRef/ --lexicon NXPRef/lexicon.txt
if [ "$?" = "0" ]; then
exit 0
else
exit 1
fi
path: ./

link-verifier:
runs-on: ubuntu-latest
steps:
- name: Clone This Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run link verifier
uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main
with:
Expand All @@ -51,7 +32,7 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Uncrustify
run: sudo apt-get install uncrustify
- name: Run Uncrustify
Expand All @@ -78,9 +59,9 @@ jobs:
git-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Checkout awslabs/git-secrets
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: awslabs/git-secrets
ref: master
Expand All @@ -91,3 +72,17 @@ jobs:
run: |
git-secrets --register-aws
git-secrets --scan
verify-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
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
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Release automation

on:
workflow_dispatch:
inputs:
commit_id:
description: 'Commit ID/branch to tag and create a release for'
required: true
version_number:
description: 'Release Version (Eg, 202012.00-LTS)'
required: true

env:
repository_name: iot-reference-nxp-rt1060
repository_compressed_name: ${{ env.repository_name }}v${{ github.event.inputs.version_number }}
repostiory_zip_name: ${{ env.repository_compressed_name }}.zip

jobs:
tag-commit:
name: Tag commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit_id }}
- name: Configure git identity
run: |
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ github.actor }}@users.noreply.github.com
- name: create a new branch that references commit id
run: git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
- name: Tag Commit and Push to remote
run: |
git tag ${{ github.event.inputs.version_number }} -a -m "Release ${{ github.event.inputs.version_number }}"
git push origin --tags
- name: Verify tag on remote
run: |
git tag -d ${{ github.event.inputs.version_number }}
git remote update
git checkout tags/${{ github.event.inputs.version_number }}
git diff ${{ github.event.inputs.commit_id }} tags/${{ github.event.inputs.version_number }}
create-zip:
needs: tag-commit
name: Create ZIP and verify package for release asset.
runs-on: ubuntu-latest
steps:
- name: Install ZIP tools
run: sudo apt-get install zip unzip
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit_id }}
path: ${{ env.repository_name }}
submodules: recursive
- name: Checkout disabled submodules
run: |
cd ${{ env.repository_name }}
git submodule update --init --checkout --recursive
- name: Create ZIP
run: |
zip -r ${{ env.repostiory_zip_name }} ${{ env.repository_name }} -x "*.git*"
ls ./
- name: Validate created ZIP
run: |
mkdir zip-check
mv ${{ env.repostiory_zip_name }} zip-check
cd zip-check
unzip ${{ env.repostiory_zip_name }} -d ${{ repository_compressed_name }}
ls ${{ repository_compressed_name }}
diff -r -x "*.git*" ${{ env.repository_compressed_name }}/${{ env.repository_name }}/ ../${{ env.repository_name }}/
- name: Create artifact of ZIP
uses: actions/upload-artifact@v2
with:
name: ${{ env.repostiory_zip_name }}
path: zip-check/${{ env.repostiory_zip_name }}
create-release:
needs: create-zip
name: Create Release and Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version_number }}
release_name: ${{ github.event.inputs.version_number }}
body: ${{ github.event.inputs.version_number }} Release
draft: false
prerelease: false
- name: Download ZIP artifact
uses: actions/download-artifact@v2
with:
name: ${{ env.repostiory_zip_name }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.repostiory_zip_name }}
asset_name: ${{ env.repostiory_zip_name }}
asset_content_type: application/zip
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
[submodule "Middleware/FreeRTOS/pkcs11"]
path = Middleware/FreeRTOS/pkcs11
url = https://github.com/amazon-freertos/pkcs11.git
[submodule "Middleware/AWS/ota"]
path = Middleware/AWS/ota
url = https://github.com/aws/ota-for-aws-iot-embedded-sdk
[submodule "Middleware/tinycbor"]
path = Middleware/tinycbor
url = https://github.com/intel/tinycbor.git
Expand All @@ -49,3 +46,9 @@
[submodule "Middleware/FreeRTOS/tests"]
path = Middleware/FreeRTOS/tests
url = https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests.git
[submodule "Middleware/AWS/mqtt-stream"]
path = Middleware/AWS/mqtt-stream
url = https://github.com/aws/aws-iot-core-mqtt-file-streams-embedded-c
[submodule "Middleware/AWS/jobs"]
path = Middleware/AWS/jobs
url = https://github.com/aws/Jobs-for-AWS-IoT-embedded-sdk.git
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<chips chipVendor="NXP"
family="MIMXRT1060"
vendorURL="http://www.nxp.com"
chipURL="">
<chip name="MIMXRT1062xxxxB"
displayName="MIMXRT1062xxxxB"
xml_file="MIMXRT1062_internal.xml"
chipURL=""/>
</chips>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<chips chipVendor="NXP" family="MIMXRT1060">
<chip name="MIMXRT1062xxxxB" flash=""/>
</chips>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE infoList
SYSTEM "crt_infolist.dtd">
<infoList vendor="NXP">
<info name="MIMXRT1062xxxxB" chip="MIMXRT1062xxxxB">
<chip>
<name>MIMXRT1062xxxxB</name>
<family>MIMXRT1060</family>
<vendor>NXP</vendor>
<memory id="Flash"
type="Flash"
size="0"
is_ro="true"
can_program="true"/>
<memory id="RAM" type="RAM" size="1024"/>
<memoryInstance id="SRAM_DTC"
derived_from="RAM"
location="0x20000000"
size="0x00020000"/>
<memoryInstance id="SRAM_ITC"
derived_from="RAM"
location="0x00000000"
size="0x00020000"/>
<memoryInstance id="SRAM_OC2"
derived_from="RAM"
location="0x20200000"
size="0x00080000"/>
<memoryInstance id="SRAM_OC"
derived_from="RAM"
location="0x20280000"
size="0x00040000"/>
</chip>
<processor>
<name gcc_name="cortex-m7">Cortex-M7</name>
<family>Cortex-M</family>
</processor>
</info>
</infoList>
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!-- This is a directory of XML files for a specific processor or a
a set. It contains "links" to other XML files based on lookup
criteria. The file is organized into Boards (target boards),
Chips (processor+ASIC chip definitions), and RTOSes.
The containers for each are per processor family. The processor
families are such as "ARM7", "Cortex-M", etc. Within are the
links per specific item. -->
<!ELEMENT directory (boards*,chips*,rtoses*)>
<!-- 1st is Boards. These are target boards. The name match is
normally from the user specifying the board by name (at
install time or dynamically or via configuration). Board
lookup by mapped register value is only available for a class
of boards, since there is no standards. -->
<!ELEMENT boards (board*)> <!ATTLIST boards
chipVendor CDATA #REQUIRED>
<!-- Board defines a board by name, the chip on it, and optional
description. It also has the link to the XML file with
the details. Note that the board XML file may be a shared
file with more than one board in it, so the consumer must
look for the matching board by name.
If the name has a "*" or "?" in it, those are wildcards
to allow multiple matches.
The chip attribute is used to search for the chip file
(see "chips" below). -->
<!ELEMENT board (EMPTY)> <!ATTLIST board
name CDATA #REQUIRED
xml_file CDATA #REQUIRED
chip CDATA #REQUIRED
description CDATA #IMPLIED>

<!-- Chips define processor chips (processor+ASIC). These include
peripherals, Flash programming information, memory layout,
and vendor information.
If the name has a "*" or "?" in it, those are wildcards
to allow multiple matches. -->
<!ELEMENT chips (chip*)> <!ATTLIST chips
chipVendor CDATA #REQUIRED
family CDATA #IMPLIED>
<!-- Chip defines a chip by name, optionally the exact processor
in it, and an optional description. It also has the link to
the XML file with the details. Note that the chip XML file
may be a shared file with more than one chip in it, so the
consumer must look for the matching chip by name. Note that
default is only filled in for one chip, and that is what will
be selected if nothing requested.
If the name has a "*" or "?" in it, those are wildcards
to allow multiple matches.
The proc attribute may be used to ensure support for the
specific processor in the family. -->
<!ELEMENT chip (EMPTY)> <!ATTLIST chip
name CDATA #REQUIRED
xml_file CDATA #REQUIRED
proc CDATA #IMPLIED
description CDATA #IMPLIED
default (true|false) #IMPLIED>

<!-- Rtoses defines embedded operating systems (and kernels and
the like). RTOS is used loosely, so that even an application
may be represented this way. The rtos data model allows for
both intelligent structure viewing (converting fields into
meaningful data, linked list and array following) and optionally
agent interactions (live debug of a running system).
The RTOS list allows for finding a matching rtos by name
or symbol match.
If the name has a "*" or "?" in it, those are wildcards
to allow multiple matches. -->
<!ELEMENT rtoses (rtos*)> <!ATTLIST rtoses
chipVendor CDATA #REQUIRED>
<!-- Rtos defines an rtos by name, optionally the chip it is
for (e.g. BSP/HAL), optionally the board it is for (e.g.
BSP/HAL), optionally a symbol match (to verify in the current
application), and an optional description. It also has the
link to the XML file with the details. Note that the rtos
XML file may be a shared file with more than one rtos in it,
so the consumer must look for the matching rtos by name.
If the name has a "*" or "?" in it, those are wildcards
to allow multiple matches.
The chip and board may have "*" or "?" for matching as well.
The sym_match attribute allows matching automatically based
on a symbol name in the current application (to load). -->
<!ELEMENT rtos (EMPTY)> <!ATTLIST rtos
name CDATA #REQUIRED
xml_file CDATA #REQUIRED
chip CDATA #REQUIRED
board CDATA #REQUIRED
sym_match CDATA #REQUIRED
description CDATA #IMPLIED>

Loading

0 comments on commit 3d124e8

Please sign in to comment.