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

Improve "Build Binaries" and "Build Test" GitHub Actions #1463

Merged
merged 9 commits into from
Jan 7, 2021
Merged

Improve "Build Binaries" and "Build Test" GitHub Actions #1463

merged 9 commits into from
Jan 7, 2021

Conversation

thisiskeithb
Copy link
Contributor

@thisiskeithb thisiskeithb commented Dec 30, 2020

Description

  1. Copy config.ini when building binaries so the version located in Copy to SD Card root directory to update/ won't have to be updated each time the main version in TFT/src/User/ is updated.

  2. Ignore changes to the following files/folders for automatic binary/config uploads:

    • .devcontainer/
    • .github/
    • Bootloader/
    • Copy to SD Card root directory to update/
    • images/
    • readme/
    • *.md
  3. Ignore changes to the following files/folders for build tests:

    • Bootloader/
    • Copy to SD Card root directory to update/
    • images/
    • readme/
    • *.md

Tagging @Codel1417 as they introduced automatic binary uploads in #1450

Benefits

Automate updating config.ini in the "Copy to SD Card" folder and only run CI when needed & don't upload new binaries when readmes/non-code changes are committed.

Related Issues

None.

@thisiskeithb thisiskeithb changed the title Ignore markdown, bootloader, and readme directories for automatic binary updating & CI tests Ignore non-code files/folders for automatic binary updating & CI test tweaks Dec 30, 2020
@Codel1417
Copy link
Contributor

I like this, i need to open another pr to copy the config.ini so we are not maintaining 2 versions of it

@thisiskeithb
Copy link
Contributor Author

thisiskeithb commented Dec 30, 2020

I like this, i need to open another pr to copy the config.ini so we are not maintaining 2 versions of it

What about changing the build action to zip up & tag releases instead? That'll keep the repo size down by removing all the compiled firmware as well.

@Codel1417
Copy link
Contributor

i worry about posting releases too fast for little features + handling release names. I would like to see more releases though

@oldman4U
Copy link
Contributor

bit off topic and maybe just my 2 cents, but at the moment we have 2 config.ini files and maybe it would be possible to remove the one under the TFT/src/User folder and keep only the one in the Copy to SD Card root directory to update folder

@thisiskeithb
Copy link
Contributor Author

bit off topic and maybe just my 2 cents, but at the moment we have 2 config.ini files and maybe it would be possible to remove the one under the TFT/src/User folder and keep only the one in the Copy to SD Card root directory to update folder

I’d keep the one in the TFT/src/User/ folder so it doesn’t become “out of sight, out of mind” and like @Codel1417 mentioned, just script an action to duplicate it to the Copy to SD Card root directory to update folder on each automatic build.

@thisiskeithb
Copy link
Contributor Author

thisiskeithb commented Dec 30, 2020

Speaking of the Copy to SD Card root directory to update folder, that could probably be excluded from the CI/build test too.

I’ll update the PR when I’m back at a computer and can push another commit. Done!

@thisiskeithb thisiskeithb marked this pull request as draft December 30, 2020 21:59
@thisiskeithb thisiskeithb marked this pull request as ready for review December 31, 2020 00:21
@thisiskeithb
Copy link
Contributor Author

thisiskeithb commented Dec 31, 2020

The last commit limits binary building to only run in this (bigtreetech/BIGTREETECH-TouchScreenFirmware) repo, since you end up with double commits/binary replacement when syncing or rebasing your fork.

@thisiskeithb thisiskeithb changed the title Ignore non-code files/folders for automatic binary updating & CI test tweaks Improve "Build Binaries" and "Build Test" GitHub Actions Dec 31, 2020
@thisiskeithb
Copy link
Contributor Author

@Codel1417: The last commit copies config.ini from TFT/src/User/ to Copy to SD Card root directory to update/ when running the build action.

@oldman4U
Copy link
Contributor

Sorry to be such a pain, but can I ask why the two config.ini's are needed?

I am not a complete newbie but it happened to me twice that I edited the one and copied the other to the SD card. It is just confusing to have the same file twice.

@Codel1417
Copy link
Contributor

Sorry to be such a pain, but can I ask why the two config.ini's are needed?

I am not a complete newbie but it happened to me twice that I edited the one and copied the other to the SD card. It is just confusing to have the same file twice.

Its easier for users that want something to just work without looking for files.

@oldman4U
Copy link
Contributor

oldman4U commented Jan 1, 2021 via email

@thisiskeithb
Copy link
Contributor Author

Easier it would be to have one

I agree.

Ideally, the Copy to SD Card root directory to update folder wouldn’t exist and BigTreeTech would use GitHub’s Releases feature to attach precompiled firmware, config, images, etc. for SD updating as well as the source code, but that’s not the process here.

The duplicate config.ini issue exists because one sits along side Configuration.h in the source code folder for developers and the other sits in the Copy to SD Card root directory to update folder alongside the firmware binaries so it’s in one place for users.

Since this PR now duplicates config.ini, it’s a non-issue.

@oldman4U
Copy link
Contributor

oldman4U commented Jan 1, 2021 via email

@guruathwal
Copy link
Contributor

@oldman4U as explained by @thisiskeithb, while navigating through the file list tree in VS Code and when there are many files opened in the editor it is easier to find config.ini when it is in the src directory. The config.ini file in Copy to SD Card root directory to update is in a different hierarchy. A copy is placed in Copy to SD Card root directory to update so that all the files needed by the user to flash/update the device are at one place.

@thisiskeithb please add '**/*.ini' also to paths-ignore: in buildBinary.yml

@oldman4U
Copy link
Contributor

oldman4U commented Jan 3, 2021

I am concerned about the situation once the average user finished the download and starts working on it.

@thisiskeithb
Copy link
Contributor Author

please add '**/*.ini' also to paths-ignore: in buildBinary.yml

I pushed this change initially, but there's a potential for the latest config.ini file to not get pushed out to the Copy to SD Card root directory to update folder since the "Build Binaries" actions wouldn't run if that's the only file edited in a PR.

@bigtreetech bigtreetech merged commit e48249c into bigtreetech:master Jan 7, 2021
@thisiskeithb thisiskeithb deleted the pr/ignore_markdown_ci branch January 7, 2021 09:47
jeffeb3 pushed a commit to V1EngineeringInc/BIGTREETECH-TouchScreenFirmware that referenced this pull request Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants