mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
enable compatibility with git action + create autorelease action
This commit is contained in:
parent
eb6196cff5
commit
0f30b68ead
3 changed files with 18 additions and 15 deletions
10
.github/scripts/kernel_checker.py
vendored
10
.github/scripts/kernel_checker.py
vendored
|
@ -29,7 +29,9 @@ KERNEL_IGNORED_EXTENSIONS = [
|
|||
'.sh'
|
||||
]
|
||||
|
||||
KERNEL_IGNORED_PATTERNS = [r'.*\.git.*']
|
||||
KERNEL_IGNORED_PATTERNS = [
|
||||
r'.*\.git.*'
|
||||
]
|
||||
|
||||
KERNEL_HEADER = [
|
||||
'/*\n',
|
||||
|
@ -62,15 +64,15 @@ KERNEL_HEADER = [
|
|||
|
||||
def main():
|
||||
parser = HeaderChecker.configArgParser()
|
||||
args = parser.parse_args()
|
||||
|
||||
# Configure the checks then run
|
||||
checker = HeaderChecker(KERNEL_HEADER)
|
||||
checker.ignoreExtension(*KERNEL_IGNORED_EXTENSIONS)
|
||||
checker.ignorePattern(*KERNEL_IGNORED_PATTERNS)
|
||||
|
||||
checker.ignoreFile(os.path.split(__file__)[-1])
|
||||
|
||||
n_failed = 0
|
||||
return n_failed
|
||||
return checker.processArgs(args)
|
||||
|
||||
if __name__ == '__main__':
|
||||
exit(main())
|
||||
|
|
|
@ -26,18 +26,19 @@ jobs:
|
|||
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@v2
|
||||
with:
|
||||
repository: dachalco/FreeRTOS # TODO: This is only for my debugging. Before merging upstream this should be updated
|
||||
ref: autorelease/enhancements
|
||||
repository: FreeRTOS/FreeRTOS
|
||||
path: tools
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Simpler git auth if we use checkout action and forward the repo to release script
|
||||
- name: Checkout FreeRTOS Kernel
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: local_kernel
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
|
@ -45,9 +46,9 @@ jobs:
|
|||
git config --global user.name ${{ github.actor }}
|
||||
git config --global user.email ${{ github.actor }}@users.noreply.github.com
|
||||
|
||||
# Run the release script
|
||||
# Install deps and run
|
||||
pip install -r ./tools/.github/scripts/release-requirements.txt
|
||||
./tools/.github/scripts/release.py dachalco --kernel-repo-path=local_kernel --kernel-commit=${{ github.event.inputs.commit_id }} --new-kernel-version=${{ github.event.inputs.version_number }}
|
||||
./tools/.github/scripts/release.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ github.event.inputs.commit_id }} --new-kernel-version=${{ github.event.inputs.version_number }}
|
||||
exit $?
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,10 +1,10 @@
|
|||
name: FreeRTOS-Header-Checker
|
||||
name: Kernel-Checker
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
header-checker:
|
||||
name: File Header Checks
|
||||
kernel-checker:
|
||||
name: FreeRTOS Kernel Header Checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Install python 3
|
||||
|
@ -40,8 +40,8 @@ jobs:
|
|||
# Run checks
|
||||
- name: Check File Headers
|
||||
run: |
|
||||
mv tools/.github/scripts/common inspect/.github/scripts
|
||||
cd inspect
|
||||
export PYTHONPATH=../tools/.github/scripts:${PYTHONPATH}
|
||||
.github/scripts/kernel_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
|
||||
exit $?
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue