Skip to content

Clean up the build scripts#281

Merged
DocMoebiuz merged 6 commits intoMobiFlight:mainfrom
neilenns:neilenns/issue235
Nov 18, 2023
Merged

Clean up the build scripts#281
DocMoebiuz merged 6 commits intoMobiFlight:mainfrom
neilenns:neilenns/issue235

Conversation

@neilenns
Copy link
Contributor

@neilenns neilenns commented Nov 15, 2023

Fixes #235

Description of changes

  • Explicitly set the python version to use
  • Add proper caching for PlatformIO

Build time without cache: 7 minutes 13 seconds
Build time with cache: 3 minutes 34 seconds

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@neilenns
Copy link
Contributor Author

First run of this PR shows no cache was present:

Cache not found for input keys: Linux-pio

Second run of this PR shows the cache being used:

Received 0 of 1725[13](https://github.com/MobiFlight/MobiFlight-FirmwareSource/actions/runs/6878073505/job/18706927963#step:4:14)376 (0.0%), 0.0 MBs/sec
Received 50331648 of 172513376 (29.2%), 23.8 MBs/sec
Received [14](https://github.com/MobiFlight/MobiFlight-FirmwareSource/actions/runs/6878073505/job/18706927963#step:4:15)3[15](https://github.com/MobiFlight/MobiFlight-FirmwareSource/actions/runs/6878073505/job/18706927963#step:4:16)3248 of 172513376 (83.0%), 45.2 MBs/sec
Cache Size: ~[16](https://github.com/MobiFlight/MobiFlight-FirmwareSource/actions/runs/6878073505/job/18706927963#step:4:17)5 MB (172513376 B)
/usr/bin/tar -xf /home/runner/work/_temp/81ee234b-19b0-4657-b240-b4b7daa7f1c5/cache.tzst -P -C /home/runner/work/MobiFlight-FirmwareSource/MobiFlight-FirmwareSource --use-compress-program unzstd
Cache restored successfully
Cache restored from key: Linux-pio

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@neilenns
Copy link
Contributor Author

Even with the cache being used I still see the pico-sdk getting cloned. I assume that is because it uses a different mechanism than other dependencies (cloned from a github repo instead of referenced from the platformio library). pico-sdk cloning is what is driving our long build times :(

@neilenns
Copy link
Contributor Author

Found a thread about caching toolchains: https://community.platformio.org/t/caching-platformio-external-in-libs-gitlab-ci/12160/2, trying that.

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@neilenns
Copy link
Contributor Author

See https://github.com/MobiFlight/MobiFlight-FirmwareSource/actions/runs/6878419283/job/18708061068 for a build that used the cache and didn't re-clone the toolchains or frameworks.

@neilenns neilenns marked this pull request as ready for review November 15, 2023 14:14
@neilenns neilenns requested a review from DocMoebiuz as a code owner November 15, 2023 14:14
@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

Copy link
Collaborator

@DocMoebiuz DocMoebiuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DocMoebiuz DocMoebiuz merged commit e546689 into MobiFlight:main Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up the build scripts

2 participants