Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CMake builds. Added Linux stub port for now to allow cross compilation #35

Merged
merged 8 commits into from
Oct 28, 2022
39 changes: 39 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @FreeRTOS/pr-bar-raiser

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
# *.c FreeRTOS/pr-bar-raiser

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
# *.go docs@example.com

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
# /build/logs/ @doctocat

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
# docs/* docs@example.com

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
# apps/ @octocat

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository and any of its
# subdirectories.
# /docs/ @doctocat


4 changes: 4 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
70 changes: 70 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Contribution guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, code, or
documentation, we welcome our community to be involved in this project.

Please read through this document before submitting any issues or pull requests to ensure we are able to help you and all members of the community as effectively as possible.

## Code of conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.


## Security issue notifications
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.


## Submitting a bugs/feature request
Have a bug to report or feature to request? Follow these steps:
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/), [FreeRTOS-Plus-FAT issue tracker](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-FAT/issues?utf8=%E2%9C%93&q=is%3Aissue) and [FreeRTOS GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
2. If your search turns up empty, create a new topic in the [forums](https://forums.freertos.org/) and work with the community to help clarify issues or refine the idea. Include as many of the details listed below.
3. Once the community has had time to discuss and digest, we welcome you to create an [issue](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-FAT/issues) to report bugs or suggest features.

When creating a new topic on the forums or filing an issue, please include as many relevant details as possible. Examples include:

* A clear description of the situation — what you observe, what you expect, and your view on how the two differ.
* A reproducible test case or sequence of steps.
* The version of our code being used.
* Any modifications you've made relevant to the bug.
* Details of your environment or deployment. Highlight anything unusual.


## Contributing via pull request
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *master* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

To send us a pull request, please:

1. Fork the repository.
2. Modify the source; focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Follow the [coding style guide](https://www.freertos.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

## Coding style
* Please ensure that your code complies to the [FreeRTOS coding style guidelines](https://www.freertos.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).


## Getting your pull request merged
All pull requests must be approved by our review team before it can be merged in. We appreciate your patience while pull requests are reviewed. The time it takes to review will depend on complexity and consideration of wider implications.


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), tackling open 'help wanted' issues is a great place to start.


## Licensing
The FreeRTOS-Plus-FAT library is released under the MIT open source license, the text of which can be found [here](https://github.com/FreeRTOS/FreeRTOS-Plus-FAT/blob/master/LICENSE.md)

Additional license files can be found in the folders containing any supplementary libraries licensed by their respective copyright owners where applicable.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Bug report
about: Create a report to help us improve FreeRTOS-Plus-FAT. This should only be used
for confirmed bugs. If you suspect something it is best to first discuss it on the
FreeRTOS forums linked below.
title: "[BUG]"
labels: bug
assignees: ''

---

**Describe the bug**
A concise description of what the bug is. If possible, that is the code is not proprietary, please upload the code in a [GitHub fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) such that we can reproduce the bug.

**Target**
- Development board: [e.g. HiFive11 RevB]
- Instruction Set Architecture: [e.g. RV32IMAC]
- IDE and version: [e.g. Freedom Studio 4.12.0.2019-08-2]
- Toolchain and version: [e.g. riscv64-unknown-elf-gcc-8.3.0-2019.08.0]

**Host**
- Host OS: [e.g. MacOS]
- Version: [e.g. Mojave 10.14.6]

**To Reproduce**
- Use project ... and configure with ...
- Run on ... and could observe ...

**Expected behavior**
A concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Wireshark logs**
To help us identify the issue and/or reproduce it, please attach Wireshark logs if applicable.

**Additional context**
Add any other context about the problem here.
e.g. code snippet to reproduce the issue.
e.g. stack trace, memory dump, debugger log, and many etc.

<!-- For general inquiries, please post in [FreeRTOS forum](https://forums.FreeRTOS.org) for community support. -->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: FreeRTOS Community Support Forum
url: https://forums.freertos.org/
about: Please ask and answer questions about FreeRTOS-Plus-FAT here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Documentation issue
about: Create a report to help us improve our documentation.
title: "[DOC] "
labels: ''
assignees: ''

---

**Describe the issue**
Please describe the issue and expected clarification in concise language.

**Reference**
Please attach the URL at which you are experiencing the issue.

**Screenshot**
If applicable, please attach screenshot.

**Browser**
- Browser: [e.g. Chrome]
- Version: [e.g. 80.0.3987.132]

<!-- For general inquiries, please post in [FreeRTOS forum](https://forums.FreeRTOS.org) for community support. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature Request
about: Suggest an idea for this project
title: "[Feature Request] <replace with your title>"
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
5 changes: 5 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Reporting a Vulnerability

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security
via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com.
Please do **NOT** create a public github issue.
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--- Title -->

Description
-----------
<!--- Describe your changes in detail. -->

Test Steps
-----------
<!-- Describe the steps to reproduce. -->

Related Issue
-----------
<!-- If any, please provide issue ID. -->


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
110 changes: 110 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CI Checks

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
workflow_dispatch:

jobs:
# Currently no unit tests
# Currently no spell-check

formatting:
# Use only 18.04 since we want the uncrustify version to
# be 0.66.1_f to ensure proper formatting.
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install Uncrustify
run: sudo apt-get install uncrustify
- name: Run Uncrustify
run: |
uncrustify --version
find . -iname "*.[hc]" -exec uncrustify --check -c tools/uncrustify.cfg {} +
if [ "$?" = "0" ]; then
exit 0
else
echo -e "\033[31;1;43mFormatting check (using Uncrustify) failed...\033[0m"
echo -e "\033[32;3mTo have the code uncrustified for you, please comment '/bot run uncrustify' (without the quotes) on the Pull Request.\033[0m"
exit 1
fi
- name: Check For Trailing Whitespace
run: |
set +e
grep --exclude="README.md" -rnI -e "[[:blank:]]$" .
if [ "$?" = "0" ]; then
echo "Files have trailing whitespace."
exit 1
else
exit 0
fi

# doxygen:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - name: Run doxygen build
# uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
# with:
# path: ./

build-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build checks (Default configuration)
run: |
cmake -S . -B build/ -DFREERTOS_PLUS_FAT_TEST_CONFIGURATION=DEFAULT_CONF
make -C build/

# complexity:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup
# run: sudo apt-get install complexity
# - name: Install Uncrustify
# run: sudo apt-get install uncrustify
# - name: Complexity
# run: |
# COMPLEXITY_PARAMS="--scores --threshold=10 --horrid-threshold=283"
# TEMP_DIR=./temp
# mkdir -p ${TEMP_DIR}
# for SOURCE_FILE in source/portable/BufferManagement/*.c source/*.c
# do
# TARGET_DIR=${TEMP_DIR}/`dirname ${SOURCE_FILE}`
# TARGET_FILE=${TARGET_DIR}/`basename ${SOURCE_FILE}`
# mkdir -p ${TARGET_DIR}
# uncrustify -c tools/uncrustify.complexity.cfg -f ${SOURCE_FILE} > ${TARGET_FILE}
# done
# find ${TEMP_DIR} -iname '*.c' | xargs complexity ${COMPLEXITY_PARAMS}
# RESULT=$?
# rm -rf ${TEMP_DIR}
# if [ "${RESULT}" = "0" ]; then
# echo "All is good."
# exit 0
# else
# echo "Sources are too complex, rc = " ${RESULT}
# exit 1
# fi

git-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Checkout awslabs/git-secrets
uses: actions/checkout@v2
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
Loading