Commit Graph

87 Commits

Author SHA1 Message Date
Yuta Saito 3ca2e58bf3 Install binaryen through apt-get on Ubuntu 2024-03-09 23:24:09 +09:00
Yuta Saito abc014932f Add wasmtime as a default WASI runtime 2024-03-09 23:24:09 +09:00
Yuta Saito f7fb2d16c4 Install wasm-objdump 2024-03-09 23:24:09 +09:00
Yuta Saito e7c5400cf3 Remove install_ubuntu_deps step 2024-03-09 12:03:08 +00:00
Yuta Saito 7afcf00626 Remove docker installation 2024-03-09 11:58:10 +00:00
Yuta Saito 4dfca3fc45 Remove unnecessary -validate-tbd-against-ir=none 2024-02-26 18:48:01 +09:00
Yuta Saito 607f096ad3 Remove unmaintained SwiftLint GitHub Action 2024-02-26 18:48:01 +09:00
Yuta Saito 7fc43f0c21 Drop Swift 5.8 support as host toolchain 2024-01-09 19:56:18 +09:00
Yuta Saito fe182eb5b1 Repair CI configuration 2024-01-09 19:56:18 +09:00
STREGA 6726c74427 Add swift_version matrix support for ubuntu 2024-01-09 19:56:18 +09:00
STREGA 644a4c706a Target only 5.9 2024-01-09 19:56:18 +09:00
STREGA 1d862b4a88 Revert "Temporarily disable legacy runners"
This reverts commit bd0441db58.
2024-01-09 19:56:18 +09:00
STREGA 2637d1738a Temporarily disable legacy runners 2024-01-09 19:56:18 +09:00
STREGA 380f7b4bfc Add macOS 13 Xcode 15 runner 2023-09-30 08:20:39 -04:00
Dustin Collins e1bd1edde0
Update Build Action (#409) 2023-09-30 05:35:28 -04:00
Dustin Collins c7aba09d55
Update CI Action (#403) 2023-08-15 18:58:55 -04:00
Peter Stöckli 9c2ac5f756
Fix typo in container registry domain (#389) 2023-02-09 22:59:51 +09:00
Yuta Saito 8227edf5aa Remove outdated GitHub Actions job 2022-09-30 14:30:18 +00:00
Yuta Saito 734e333a43
Add 5.7 host toolchain matrix (#380) 2022-09-21 13:06:11 +09:00
Max Desiatov c55e56c18f
Delete update-deps.yml 2022-09-04 12:59:19 +01:00
Yuta Saito b8cac7dc8e Revert "Use GITHUB_TOKEN instead of PAT to upload image to ghcr"
This reverts commit ddefd139a0.
2022-07-22 14:33:23 +00:00
Yuta Saito ddefd139a0 Use GITHUB_TOKEN instead of PAT to upload image to ghcr 2022-07-22 14:24:08 +00:00
Max Desiatov c92f85c543
Revert "Use `--static-swift-stdlib` for easier distribution on Linux" (#365)
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
2022-06-15 10:02:07 +02:00
Max Desiatov 78d023587c
Use `--static-swift-stdlib` for easier distribution on Linux (#343)
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.
2022-05-31 11:29:41 +01:00
Max Desiatov 0926035d4a
Remove broken job from `release.yml` 2022-05-23 16:52:18 +01:00
Max Desiatov c834751074
Re-read custom `index.html` on updates (#342)
We were reading custom `index.html` only once on launch, which meant people had to restart `carton dev` every time they've updated `index.html` during the build process to see changes they've made.
2022-05-20 12:42:23 +00:00
Max Desiatov 1ba7dd5d82
Use JSKit runtime from SwiftPM resources (#335)
* Use JSKit runtime from SwiftPM resources

* Fix Node.js test runner

* Remove unused webpack npm packages

* Update Swift version in `.swiftformat`

* Fix browser and Node.js CJS/ESM handling

* Fix one of the tests, add CI time limit

* Use Tokamak `update-jskit` branch to fix tests

* Use latest Vapor with `.mjs` content-type fix

* Use dynamic import to detect JSKit presence

* Fix missing `runtimeConstructor` reference

* Update `StaticArchive.swift`

* Reduce the diff

* Address PR feedback

* Fix Node.js <-> JSKit integration test

* Update SwiftPM dependencies

* Fix comment typo in `testNode.js`

* Reuse `__stack_sanitizer` across entrypoints
2022-05-20 13:12:45 +01:00
Max Desiatov b375fcd2d5
Remove broken job from `release.yml` 2022-04-12 13:11:32 +01:00
Max Desiatov 5e90f5d712
Clean up `commit-message` in `update-deps.yml` 2022-04-03 18:34:27 +01:00
Max Desiatov 2079bc5c02
Clarify automated PR name for dependency updates 2022-03-31 11:32:37 +01:00
Max Desiatov 35043d7053
Add macOS 12 and Xcode 13.3 to CI matrix (#303)
There are issues with binding 0.0.0.0 address on macOS 12, I'm dropping the corresponding argument from tests in f24d39e8f8. Also seeing issues with Ubuntu 18.04, even though all tests seem to be passing. Dropping it as an old version from CI as well.
2022-03-31 10:48:53 +01:00
Max Desiatov 74a49c1aa8
Use `async`/`await` and actors instead of Combine (#283)
This makes our codebase smaller by ~80 lines and arguably more readable. Also removes OpenCombine dependency.

* Use `async`/`await` and actors instead of Combine

* Remove OpenCombine dependency

* Fix progress animation not updated

* Stop building with Swift 5.4, clean up terminal output

* Update requirements in `README.md`

* Add `description` to `InvalidResponseCode`

* Fix Linux build error

* Rename `main.swift` to `Main.swift`

* Work around IR/TDB warnings

* Pass IR/TDB arguments correctly to `swift build`

* Support `async` process runner in `carton-release`

* Use Xcode 13.2.1 on macOS

* Pass TDB/IR flags to `swift test` as well

* Make `Install` command async

* Add doc comments, handle subsequent rebuilds
2022-01-17 09:04:44 +00:00
Max Desiatov b0d53c286a
Build `main` Docker images on every push to `main` branch (#272)
This makes it possible to test latest `carton` Docker builds from the `main` branch.

* Attempt to push Docker image in `swift.yml`

* Update swift.yml

* Update swift.yml

* Push only a single tag

* Use secrets.PAT for GHCR login

* Move nightly tags to separate `docker.yml` workflow

* Rename `nightly` to `main`
2022-01-05 11:43:15 +00:00
Max Desiatov 9fef513d69
Use PAT secret for Docker in `release.yml` 2021-12-01 15:29:51 +01:00
Max Desiatov d3c3fd885e
Don't build Catalina Homebrew bottle in `release.yml`
GitHub Actions agents with macOS Catalina don't support Xcode 12.5, which is required to build `carton`.
2021-12-01 15:28:39 +01:00
Max Desiatov 596730b005
Update dependencies, add support for SwiftWasm 5.5 (#263)
I've dropped support for Swift 5.2, and SwiftLint now requires Xcode 12.5.1, which is unavailable on macOS 10.15 with GitHub Actions. This makes it impossible to test with Swift 5.3 on CI, so I'm bumping the required version to Swift 5.4.

Resolves https://github.com/swiftwasm/carton/issues/262.

* Update dependencies, add support for SwiftWasm 5.5

* Bump dependencies in `.github/workflows/swift.yml`

* Add explicit dependency on `NIOFoundationCompat`

* Lower Splash version to 0.15 for Swift 5.3 compat

* Update DefaultToolchain.swift

* Update swift.yml

* Revert "Lower Splash version to 0.15 for Swift 5.3 compat"

This reverts commit 6e04a7f158.

* Require Swift 5.4 in `Package.swift`

* Update README.md

* Use older 5.5 snapshot, unblock tests on failure

* Update DefaultToolchain.swift

* Select correct CPU architecture when downloading

* Disable hanging test

* Use latest 5.5 toolchain

* Use 2021-11-16 snapshot of SwiftWasm 5.5

* Add missing linker flags, re-enable browser test

* Address PR feedback
2021-11-18 13:59:32 +01:00
Max Desiatov febf591329
Add Big Sur jobs for Homebrew release workflow 2021-09-02 19:01:20 +01:00
Max Desiatov 022849f9a2
Update `Dockerfile` for SwiftWasm 5.4.0 (#255)
* Update `Dockerfile` for SwiftWasm 5.4.0

* Push Docker image on release

* Use `GITHUB_TOKEN` for GHCR
2021-09-02 17:02:32 +01:00
Max Desiatov dd6439700f
Bump version to 0.11.0, update dependencies (#251)
* Bump version to 0.11.0, update dependencies

* Test on Big Sur with Xcode 12.5

* Update test fixture dependencies

* Remove `LinuxMain.swift` expectations

* Test with `wasm-5.4-SNAPSHOT-2021-08-26-a`

* Remove expectations for `XCTestManifests.swift`

* Enable debugging output

* Try the latest 5.4 toolchain

* print debug output

* More debug output

* Test on macOS 11 with Xcode 13

* Pipe errors to stdout

* Update DefaultToolchain.swift

* Revert "Update DefaultToolchain.swift"

This reverts commit 4ff15f938a.

* Remove Xcode 13 from the CI matrix

* Update DefaultToolchain.swift

* Reduce the diff
2021-09-01 15:07:00 +01:00
Max Desiatov 0c918b5019 Fix release CI script 2021-05-30 10:52:12 +01:00
Max Desiatov ae8015413b
Fix `carton dev` crashing with SO sanitizer (#239)
Previously, the file we need to include with the build to enable the stack overflow sanitizer was written as a temporary file. This didn't happen though on watcher rebuilds with `carton dev` and caused crashes when a code line containing `try!` relying on this file to be present was executed.

I think it's easier and more efficient to bundle this file in the `static.zip` file that already includes our JS entrypoints. We require `static.zip` to be downloaded and unpacked successfully into `~/.carton/static` before every build anyway. It makes more sense to sense the sanitizer file in `~/.carton/static/so_sanitizer.wasm` and use that instead writing and deleting it at a temporary path on every build.

I've also updated the JSKit dependency and cleaned up some linter warnings by moving large tuple values into a separate `BuildDescription` type.
2021-05-24 12:03:38 +01:00
Max Desiatov 227efcd07a
Avoid building in `release` mode when testing (#240)
This fixes the issue with Linux builds, as Linux CI hosts were updated to Swift 5.4 which no longer supports testing with release builds.

* Avoid building in `release` mode when testing

* Remove deprecated `LinuxMain.swift`
2021-05-23 15:06:22 +01:00
Yuta Saito 1acf9c3ad7
Integrate stack sanitizer (#230)
* Update WasmTransformer

* Add build flavor to determine build options

* Enable stack overflow sanitizer pass

* Embed import entry in binary

* Remove sanitize support from bundle command

* Update WasmTransformer and add --stack-first option

* Fix carton-release hash-archive for CartonKit renaming

* Run carton-release hash-archive

* Update WasmTransformer

* Use run-p

* Use matrix in CI

* Build and install pre-released resource

* Exclude fixture directory from linting

* Fix failing tests

* Turn off sanitizer on test command
2021-04-18 16:45:10 +09:00
Max Desiatov c31b8d7df2
Use `set -ex` for easier debugging of workflow scripts 2021-01-20 15:10:56 +00:00
Max Desiatov 69ad2473b5
Temporarily stop testing on Big Sur
Big Sur builds can't proceed right now due to https://github.com/actions/virtual-environments/issues/2381
2021-01-20 14:47:19 +00:00
Benjamin Kindle 046ce7e106
Add host argument to `dev` and `test` commands (#213)
* Add host argument to dev and test commands

* Delete Brewfile.lock.json

* Update swift.yml

* Update Sources/CartonCLI/Commands/Dev.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

* Update Sources/CartonCLI/Commands/Test.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

Co-authored-by: Max Desiatov <max@desiatov.com>
2021-01-20 13:05:41 +00:00
Max Desiatov 1e3ccf1de6
Update FUNDING.yml 2021-01-07 12:03:07 +00:00
thecb4 fc0487d623
Add `test` command test with no arguments (#198)
* Added test command test with no arguments

* Changed build and test to release configuration, Fixed Docker Build error

* Changed build and test to release configuration, Fixed Docker Build error

* Fixed github action

* Moved package.json and package-lock.json back to the top directory

* Moved the entrypoint folder back to the top level directory

Co-authored-by: thecb4 <cavelle@tehcb4.io>
2020-12-30 10:35:02 -05:00
thecb4 22165481bf
Add tests for `dev` and `bundle` commands (#196)
* carton dev and bundle default command tests

* removed tests_output

* removed .testfile

* carton dev and bundle default command tests

* removed localhost as localURL

* attempt to fix folder name issue

* removed Fixtures test folder

* added Fixtures test folder

* attempt to fix folder name issue

* attempt to fix server connect issue

* fixed dev testWithNoArguments with sleep delay

* Debugging bundle command for github actions

* Install wasmr prior to swift test

* Debug clean up

* Debug clean up

* Update Tests/CartonCommandTests/CommandTestHelper.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

Co-authored-by: thecb4 <cavelle@tehcb4.io>
Co-authored-by: Max Desiatov <max@desiatov.com>
2020-12-28 13:13:27 -05:00
thecb4 d7352b5a25
Add Dev tests and fix hard coded paths (#192)
* Added Dev tests and fixed hard coded paths, fixes #183

* Fixed Path dependency in 5.2 Package

* Removed mxcl/Path dependency

* Removed mxcl/Path dependency, Added confirmation of file existence in Init test

* Added sdk install head of init command test

* Moved carton sdk install to static setup method for tests

* Moved carton sdk install to static setup method for tests

* Moved carton sdk install to static setup method for tests

* Moved carton sdk install to static setup method for tests

* Moved carton sdk install to static setup method for tests

* changed order of actions for github automations to support testing

* modified test run to exclude release

* changed sdk install to run per test

* adjusted github workflows to create carton sdk folders

* adjusted github workflows to use /home/runner instead of root

* adjusted test to wait for sdk installation

* adjusted ubuntu tests for passing

* adjusted Dockerfile to run tests

* added tmate session for debugging

* Removed tmate session, added directory creation for carton sdk and sym link

* Adjusted order of commands for runner

* Fixed mkdir from worker to runner

* Added more terminal output for debugging

* Added more terminal output for debugging

* Added more terminal output for debugging

* Added more terminal output for debugging

* Added more terminal output for debugging

* Fixed hard coded paths

* Removed test investigation fixtures

* Removed test investigation fixtures

Co-authored-by: thecb4 <cavelle@tehcb4.io>
2020-12-24 03:49:28 -05:00