forked from InfiniTimeOrg/InfiniTime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
956 additions
and
893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Issue report | ||
description: Something's not good enough | ||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: Verification | ||
description: Before submitting an issue, check if similar issues already exist and use those issues to provide your feedback instead. | ||
options: | ||
- label: I searched for similar issues and found none was relevant. | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Introduce the issue | ||
description: Explain why it is an issue if necessary. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Preferred solution | ||
description: You can suggest a solution to the issue here. | ||
placeholder: Optional | ||
- type: input | ||
attributes: | ||
label: Version | ||
description: | | ||
What [version of the firmware](https://github.com/JF002/InfiniTime/blob/develop/doc/gettingStarted/gettingStarted-1.0.md#how-to-check-the-version-of-infinitime-and-the-bootloader) are you running? | ||
If you are running an older version, please consider [updating to the latest firmware](https://github.com/JF002/InfiniTime/blob/develop/doc/gettingStarted/gettingStarted-1.0.md#how-to-update-your-pinetime). | ||
If you are running directly from git, specify the branch or the commit hash directly. | ||
placeholder: Ex. v1.6.0 or develop or fc922b60 | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
env: | ||
USERNAME: infinitime | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ on: | |
|
||
jobs: | ||
build-firmware: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: infinitime/infinitime-build | ||
outputs: | ||
|
@@ -59,22 +59,23 @@ jobs: | |
path: ./build/output/infinitime-resources-*.zip | ||
|
||
build-simulator: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install cmake | ||
uses: lukka/[email protected] | ||
|
||
- name: Install SDL2 development package | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libsdl2-dev | ||
- name: Install Ninja | ||
run: | | ||
sudo apt-get -y install ninja-build | ||
- name: Install lv_font_conv | ||
run: | ||
npm i -g [email protected] | ||
|
||
- name: Checkout source files | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
|
@@ -112,21 +113,27 @@ jobs: | |
# Override SOURCES_DIR in build.sh | ||
SOURCES_DIR: . | ||
steps: | ||
- name: Cache sources | ||
id: cache-sources | ||
uses: actions/cache@v3 | ||
with: | ||
path: . | ||
key: source-files-${{ github.event.pull_request.base.sha }} | ||
|
||
- if: ${{ steps.cache-sources.outputs.cache-hit != 'true' }} | ||
name: Checkout source files | ||
- name: Checkout current base branch files | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.base_ref }} | ||
submodules: recursive | ||
|
||
- if: ${{ steps.cache-sources.outputs.cache-hit != 'true' }} | ||
- name: Get base branch SHA | ||
id: get-base-sha | ||
run: | | ||
# Fix for "detected dubious ownership in repository at '/__w/InfiniTime/InfiniTime'" | ||
git config --global --add safe.directory /__w/InfiniTime/InfiniTime | ||
echo base_sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT | ||
- name: Cache build | ||
id: cache-build | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./build | ||
key: build-files-${{ steps.get-base-sha.outputs.base_sha }} | ||
|
||
- if: ${{ steps.cache-build.outputs.cache-hit != 'true' }} | ||
name: Build | ||
shell: bash | ||
# Only pinetime-app target is needed, but post_build.sh fails | ||
|
@@ -140,6 +147,7 @@ jobs: | |
compare-build-size: | ||
if: github.event_name == 'pull_request' | ||
name: 'Compare build size' | ||
needs: [build-firmware, get-base-ref-size] | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -174,28 +182,19 @@ jobs: | |
echo "data_diff=$DATA_SIZE_DIFF" >> $GITHUB_OUTPUT | ||
echo "bss_diff=$BSS_SIZE_DIFF" >> $GITHUB_OUTPUT | ||
- name: Find Comment | ||
# Due to a security concern, comments can only be created in the context of branches in the repo. | ||
# PRs from forks can't get the comment. | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
uses: peter-evans/find-comment@v2 | ||
id: build-size-comment | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: Build size and comparison to | ||
|
||
- name: Create or update comment | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
uses: peter-evans/create-or-update-comment@v2 | ||
- name: Write comment information to files | ||
run: | | ||
tee comment << EOF | ||
Build size and comparison to ${{ github.base_ref }}: | ||
| Section | Size | Difference | | ||
| ------- | ---- | ---------- | | ||
| text | ${{ needs.build-firmware.outputs.text_size }}B | ${{ steps.output-sizes-diff.outputs.text_diff }}B | | ||
| data | ${{ needs.build-firmware.outputs.data_size }}B | ${{ steps.output-sizes-diff.outputs.data_diff }}B | | ||
| bss | ${{ needs.build-firmware.outputs.bss_size }}B | ${{ steps.output-sizes-diff.outputs.bss_diff }}B | | ||
EOF | ||
- name: Upload comment | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
comment-id: ${{ steps.build-size-comment.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Build size and comparison to ${{ github.base_ref }}: | ||
| Section | Size | Difference | | ||
| ------- | ---- | ---------- | | ||
| text | ${{ needs.build-firmware.outputs.text_size }}B | ${{ steps.output-sizes-diff.outputs.text_diff }}B | | ||
| data | ${{ needs.build-firmware.outputs.data_size }}B | ${{ steps.output-sizes-diff.outputs.data_diff }}B | | ||
| bss | ${{ needs.build-firmware.outputs.bss_size }}B | ${{ steps.output-sizes-diff.outputs.bss_diff }}B | | ||
edit-mode: replace | ||
name: comment | ||
path: comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# THIS WORKFLOW HAS WRITE PERMISSIONS TO THE REPO. | ||
# MAKE SURE IT NEVER RUNS ANY CODE FROM THE FORK | ||
|
||
name: PR comment | ||
|
||
on: | ||
pull_request_target: | ||
branches: [ develop ] | ||
paths-ignore: | ||
- 'doc/**' | ||
- '**.md' | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait for builds to finish | ||
id: wait-for-build | ||
uses: fountainhead/action-wait-for-check@297be350cf8393728ea4d4b39435c7d7ae167c93 | ||
with: | ||
checkName: 'Compare build size' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- if: steps.wait-for-build.outputs.conclusion != 'success' | ||
run: exit 1 | ||
|
||
- name: Download artifact | ||
uses: dawidd6/action-download-artifact@bd10f381a96414ce2b13a11bfa89902ba7cea07f | ||
with: | ||
workflow: main.yml | ||
workflow_conclusion: | ||
pr: ${{ github.event.pull_request.number }} | ||
name: comment | ||
|
||
- name: Find Comment | ||
id: find-comment | ||
uses: peter-evans/find-comment@81e2da3af01c92f83cb927cf3ace0e085617c556 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: Build size and comparison to | ||
|
||
- name: Create or update comment | ||
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 | ||
with: | ||
comment-id: ${{ steps.find-comment.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body-file: comment | ||
edit-mode: replace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.