aws-actions / setup-sam

Action to set up AWS SAM CLI and add it to the PATH
Apache License 2.0
151 stars 23 forks source link

Support native installers #68

Closed hoffa closed 1 year ago

hoffa commented 1 year ago

Currently setup-sam uses pip to install SAM CLI. It makes multi-platform support trivial, but means issues can occur due to transient dependencies changing (e.g. https://github.com/aws-actions/setup-sam/issues/64 or https://github.com/aws-actions/setup-sam/issues/41). It also means Python has to be installed for setup-sam to work (although it isn't typically a problem in practice; GitHub-hosted runners include it).

Using the official installers would minimize dependency issues and get rid of the setup-python dependency. And perhaps makes https://github.com/aws-actions/setup-sam/issues/12 easier? One potential issue is SAM CLI doesn't currently support Linux ARM (see https://github.com/aws/aws-sam-cli/issues/3908).

No need to run the install script, and can use dist/sam directly instead. Might help with caching.

Should probably push a v3, as the python input will be removed, and don't want to break changes such as https://github.com/aws-actions/setup-sam/issues/64#issuecomment-1368755583.

hoffa commented 1 year ago

Done in https://github.com/aws-actions/setup-sam/pull/70 for Linux x86-64; which is also ubuntu-latest so assuming the most common. Resolving in favor of more granular ones.

aidansteele commented 1 year ago

Sorry for the spam, but I just wanted to say thank you so much @hoffa. This change has halved the runtime of my entire pipeline for the (fairly common) case of no changes needing deployment. Even when there are changes to deploy, it's going to make a substantial difference - and make our devs happier with submitting PRs. ❤️

CleanShot 2023-03-02 at 09 53 45@2x

hoffa commented 1 year ago

@aidansteele Thanks for you comment, that's great to hear!