-
Notifications
You must be signed in to change notification settings - Fork 754
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
Update and test the getting-started
script
#5446
Conversation
In this section, when they cancel, can you also make sure to show them "if you want more templates, please see here"?
I am not an expert to judge the complexity of the testing scripts. I can share the overall guidance that we should also not over-engineer it, both to minimize the CI costs and the maintenance of the scripts. That is not to say the current steps are over-engineered per-se, this is more of an overall thought. What I would suggest is only to remove the last two steps: The templates are already checked to compile, run and produce blocks elsewhere. We don't need it here again. As noted elsewhere, if we can use the same getting started script to setup our CI environment, it will be a double win, and more incentive to battle-test it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, but nothing major.
Hmm, I'm not sure we're on the same page here. What this introduces, is making sure that those exact lists of dependencies and Rust setup is enough to build a template on a clean arch/fedora/opensuse. But yeah, maybe this is not a place for it. 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Here are some changes to the
getting-started.sh
scripts we have advertised on top of the readme.Changes to the script
echo
to a more portableprintf
.On my machine, the script printed a literal
\n
string if run withbash
.If I changed it to
echo -e
, then it printed a literal-e
if run withsh
.Changed it to
printf
which is more portable.The script proceeded to clone and build the
minimal
template, which is not always what we want.Added a selection prompt where the user can select one of the 3 templates, and choose if it should be built&run or not.
The user can also select no template at all - that way, we have a starter of a dependencies-installation script.
A workflow testing the script
I propose a workflow, that will test the script using the expect tool.
For each OS mentioned in the script (macOS, Ubuntu, Debian, Arch, Fedora, OpenSUSE) we go through the script twice, and after that build and run the template binary.
I'm using docker containers, so we start from scratch and make sure the scripts installs all required dependencies - with the exception of macOS, which I can't run from scratch in a container.
The jobs use a selected combination of OSes, shell interpreters (
bash
orsh
), and templates.There is too much combinations to run them all, but I have run it once in staging to make sure all pass.
I'm adding a cron schedule because it can break without any code changes in this repository (e.g. new
latest
release of a container).