Revert "Use `--static-swift-stdlib` for easier distribution on Linux (#343)"
This reverts commit 78d023587c.
As reported previously:
> after adding --static-swift-stdlib, carton init and other commands started hanging.
> It seems something wrong in Foundation or global executor. The min repro for the hang is here
> https://gist.github.com/kateinoigakukun/a3ee55fa2480a46959211c53de862131
In theory, this should allow us to distribute self-contained binaries on Linux. These wouldn't be statically linked completely, but at least they should no longer depend on a separate dynamic library file with Swift stdlib.
Related to https://github.com/swiftwasm/carton/issues/336.
Also creating a variable for making upgrades easily in the future.
* Upgrade binaryen binary version
* Add trailing newline to `install_ubuntu_deps.sh`
Co-authored-by: Max Desiatov <max@desiatov.com>
* Remove sudo usage from `install_ubuntu_deps.sh`
`sudo` is not always available in Docker containers, so we should assume users will run the script itself with `sudo` when needed.
* Update swift.yml
TTY terminal output is unavailable on CI, or when users redirect output to a file or a pipe. In those cases `TerminalController` initializer returns `nil`. SwiftPM has a wrapper `InteractiveWriter` class for it, which writes output to stdout directly in that case. I've copied that, and replaced all uses of `TerminalController` with it. A VSCode task is added to test that.
In my testing it looks like download progress reporting is quite spammy, so it now has `removeDuplicates` Combine operator added to make it output only when values differ significantly from each other.
Additionally, SDK installs can hit GitHub API rate limit on CI nodes, so `carton` now reads `GITHUB_TOKEN` environment variable, which gives much higher limits to authenticated API users.
We can now also run various `carton` commands on CI for basic end-to-end testing.
Resolves#112.