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

ci: native binaries #382

Merged
merged 44 commits into from Jan 29, 2024
Merged

ci: native binaries #382

merged 44 commits into from Jan 29, 2024

Conversation

aorumbayev
Copy link
Collaborator

@aorumbayev aorumbayev commented Jan 9, 2024

Proposed changes

  • Implement decision from ADR -> docs: adr on native binaries #395
  • Refines poetry installation using dedicated action and improved caching
  • Removing redundant zenhub actions
  • Separate workflow and action for building and appending binaries to release/prerelease
  • Fixes several tests
  • Expanding build matrix for pytest workflow to test on windows/mac/ubunut against 3.10-3.12 python versions
  • E2e tested on a complete fork of algokit-cli, see example of prerelease with artifacts of binaries appended https://github.com/aorumbayev/algokit-cli/releases/tag/v1.10.24-beta.3
  • Initial portability test - to be expanded in more detailed set of tests once minor tweaks on cli are addressed

Further notes

  • ⚠️⚠️⚠️ this pr only adds support for building and dumping binaries into zipped archives on the release or prerelease, linking it with distribution over snap/winget/brew is a separate ADR that will follow up this PR
  • Portability tests and remaining tweaks in cli to fix minor issues when cli is executed via binary is to be addressed in separate smaller scaled prs (issues are to be created)

@aorumbayev aorumbayev mentioned this pull request Jan 9, 2024
Copy link

github-actions bot commented Jan 9, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit
   __init__.py15753%6–13, 17–24, 32–34
   __main__.py220%1–3
src/algokit/cli
   completions.py108298%83, 98
   deploy.py72790%44, 46, 92–94, 158, 182
   dispenser.py121199%77
   doctor.py48394%142–144
   explore.py501276%34–39, 41–46
   generate.py67396%74–75, 140
   goal.py44198%71
   init.py1901692%277–278, 328, 331–333, 344, 388, 414, 454, 463–465, 468–473, 486
   localnet.py1191587%74–78, 111, 123, 138–148, 161, 206, 227–228
   task.py34391%25–28
src/algokit/cli/common
   utils.py26292%120, 123
src/algokit/cli/tasks
   analyze.py81199%81
   assets.py821384%65–66, 72, 74–75, 105, 119, 125–126, 132, 134, 136–137
   ipfs.py51884%52, 80, 92, 94–95, 105–107
   mint.py66494%48, 70, 91, 250
   send_transaction.py651085%52–53, 57, 89, 158, 170–174
   sign_transaction.py59886%21, 28–30, 71–72, 109, 123
   transfer.py39392%26, 90, 117
   utils.py994555%26–34, 40–43, 75–76, 100–101, 125–133, 152–162, 209, 258–259, 279–290, 297–299
   vanity_address.py561082%41, 45–48, 112, 114, 121–123
   wallet.py79495%21, 66, 136, 162
src/algokit/core
   bootstrap.py1171091%101–102, 124, 151, 180–185
   conf.py54885%12, 24, 28, 36, 38, 71–73
   deploy.py691184%61–64, 73–75, 79, 84, 91–93
   dispenser.py2022687%91, 123–124, 141–149, 191–192, 198–200, 218–219, 259–260, 318, 332–334, 345–346, 356, 369, 384
   doctor.py65789%67–69, 92–94, 134
   generate.py41295%69, 87
   goal.py60395%30–31, 41
   log_handlers.py68790%50–51, 63, 112–116, 125
   proc.py45198%98
   sandbox.py2181892%62, 73–75, 96, 142–149, 160, 456, 472, 497, 505
   typed_client_generation.py80594%55–57, 70, 75
   utils.py1043170%44–45, 49–68, 129, 132, 138–152
   version_prompt.py72889%26–27, 39, 58–61, 79, 108
src/algokit/core/tasks
   analyze.py93397%105–112, 187
   ipfs.py63789%58–64, 140, 144, 146, 152
   nfd.py491373%25, 31, 34–41, 70–72, 99–101
   vanity_address.py903462%49–50, 54, 59–75, 92–108, 128–131
   wallet.py71593%37, 129, 155–157
src/algokit/core/tasks/mint
   mint.py781087%123–133, 187
   models.py901188%50, 52, 57, 71–74, 85–88
TOTAL347240088% 

Tests Skipped Failures Errors Time
399 0 💤 0 ❌ 0 🔥 21.666s ⏱️

@joe-p
Copy link
Contributor

joe-p commented Jan 15, 2024

One thing I think is worth considering, perhaps not initially but as a long-term goal, is releases on npm. I think it's safe to assume most Mac devs have brew installed, but the same is not true for windows developers and chocolatey. Having a way to install via brew, pipx, and npm covers a large portion of our developers. Below is a resource I found on distributing binaries through npm

https://blog.xendit.engineer/how-we-repurposed-npm-to-publish-and-distribute-our-go-binaries-for-internal-cli-23981b80911b

@aorumbayev aorumbayev changed the title feat: pyinstaller cicd setup (poc for ADR) feat: native binaries & new package managers Jan 24, 2024
@aorumbayev aorumbayev changed the title feat: native binaries & new package managers ci: native binaries Jan 25, 2024
@aorumbayev aorumbayev marked this pull request as ready for review January 25, 2024 14:13
@aorumbayev
Copy link
Collaborator Author

aorumbayev commented Jan 29, 2024

I guess adding more robust testing setup is already proving to be useful. Caught a new weird bug, @robdmoore i had to lock chore: patching tealer tealer once again. Not really sure yet why the builds used to work prior to recent commits but started failing on 3.12 workers despite previous tests on 3.12. I suspect cache got invalidated and perhaps some related dependencies got refreshed so installing tealer starter breaking on 3.12 again. Tealer has a related repo - added a note to track it. For scope of this pr just gonna patch the ci cd - will open separate pr to rever installation of tealer from our fork on foundation org until tealer team patches the 3.12 completely (we contributed initial efforts as part of 0.1.1 already but looks like it was not enough).

crytic/tealer#209

Otherwise all comments addressed and retested with release on a fork - merging now

@aorumbayev aorumbayev merged commit daa9fc5 into main Jan 29, 2024
13 checks passed
@aorumbayev aorumbayev deleted the feat/pyinstaller branch January 29, 2024 18:01
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.

None yet

4 participants