Commit Graph

72 Commits

Author SHA1 Message Date
Yuta Saito 8c45b80387
Update README.md 2023-07-23 10:14:13 +09:00
Yuta Saito e93778a77c
Update README.md 2023-07-21 10:04:48 +09:00
Yuta Saito 254a0e03d6
Add note for branch rename for tap repository 2023-01-10 19:22:07 +09:00
Yuta Saito 1de809e223 Update carton compatibility matrix 2022-06-15 23:08:43 +09:00
Yuta Saito 646f1aef85
Headless test runner (#362)
* Add WebDriverClient for headless testing

* Launch new session with headless arg by default

* Add --headless option in carton test

* Improve logging message

* Apply formatter for WebDriverClient module

* Support MS Edge

* Add headless testing test

* Explicitly depend on NIOFoundationCompat

* Avoid public actor field as a 5.5 compiler crash workaround

* Add --headless description in README.md

* Update Sources/CartonCLI/Commands/Test.swift

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

* Apply suggestions from code review for wording

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

* Rename failedToFindDriver -> failedToFindWebDriver

* Rephrase diagnostic message

* Omit explicit internal keyword

* Remove unused goto.Response struct

* Add license header to Tests/WebDriverClientTests/WebDriverClientTests.swift

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

Co-authored-by: Max Desiatov <max@desiatov.com>
2022-06-10 16:42:20 +00:00
Geordie J eef2825f78
Add option to disable wasm optimizations (#359)
I am trying to implement an `esbuild` plugin that calls into `carton`. My plan was to call `carton bundle --debug` to get a quick development build and then extract that command's output for use in our esbuild project.

Unfortunately, `carton bundle` still runs `wasm-opt` even on a debug build, which takes 5-10s for our project. The only alternative I can see is `carton dev`, but that runs the dev server / watcher, which we don't want either for a one-off build.

Since changing the behaviour of `carton bundle --debug` to _not_ run `wasm-opt` may cause issues with backwards compatibility, @MaxDesiatov suggested we add a command line option `--wasm-optimizations {size, none}` instead, allowing users to specifically opt out of this behaviour.
2022-06-02 18:40:00 +01:00
Yuta Saito 70b06afad8 Add short description for --prebuilt-test-bundle-path 2022-05-31 01:59:14 +09:00
Max Desiatov 8130899628
Fix typo in `README.md` 2022-05-20 15:29:43 +01:00
Max Desiatov 683e3e0759
Bump version to 0.15.0, update `CHANGELOG.md` (#348) 2022-05-20 15:27:53 +01:00
Max Desiatov cd7377fb49
Clarify `--environment` option for `carton test` in `README.md` (#333)
Resolves https://github.com/swiftwasm/carton/issues/322.
2022-05-11 14:40:15 +00:00
Max Desiatov fd11ff0140
Add `carton`/SwiftWasm/JSKit compat matrix to `README.md` (#332)
This should make it easier for people to use older versions if they'd like to.
2022-05-11 15:36:47 +01:00
Antonio Candinho 505a9b81a2
Add support for running tests using NodeJS (#328)
### 🎩 What is the goal?

Implement NodeJS as another test runner. 

### 📄 How is it being implemented?

In this PR, I include the following changes:

 - Create an abstraction for the different Test Runners (Wasmer, browser and now Node)
 - Implement the new Node test runner (quite similar to the Wasmer one)
 - Unify Javascript client code, so we can make sure we apply the same patches and load in the same way all the different targets
 - Create a new entry point for testing with node
 - Add that new entry point to the static bundle
 
### 👀 Any consideration?

The Node test runner does not use the TestsParser as it heavily impacts execution time. I will try to figure out what's going on later.
 
###  How can it be tested?

Testing is automated 🤖 . You can also check this in your own project by running:

```bash
carton test --environment node
```
2022-05-11 13:52:44 +00:00
Jed Fox 8790e10161
Update to v2 of Contributor Covenant in shared GitHub repo (#329) 2022-05-10 18:10:54 +00:00
Max Desiatov ee7b169df9
Describe `--debug-info` and `-Xswiftc` in `README.md` (#308)
New CLI options added in 0.13.0 weren't described in `README.md`, let's fix that.
2022-04-02 18:28: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 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 e2544afcb5 Clean up `README.md` 2021-09-01 20:51:50 +01:00
Max Desiatov 1c9502e833
Update link in `README.md` (#252)
Use direct OpenCombine link instead of relying on a redirect
2021-08-26 15:33:07 +01:00
Max Desiatov 10c21db4bf
Fix Ubuntu deps, clarify Linux support in README (#242)
Resolves #237.

* Fix Ubuntu deps, clarify Linux support in README

* Avoid using `sudo` if it's not installed
2021-05-28 22:00:38 +01:00
Max Desiatov 084dbf17a4
Link to the org sponsorship page from `README.md` (#210) 2021-01-09 20:15:19 +00:00
Max Desiatov 851bd8736c
Update the "Roadmap" section in `README.md` (#207)
Just a paragraph about browser testing removed. It is no longer relevant since this feature has been implemented.
2021-01-08 14:53:29 +00:00
Max Desiatov a7314cbb2e
Bump version to 0.9.0, update `CHANGELOG.md` 2020-12-04 13:05:55 +00:00
Max Desiatov 64e9c97ddc
Mark all commands as implemented in `README.md` (#180)
Also update the `carton test` section.
2020-12-04 11:41:20 +00:00
Max Desiatov 2f2b13ec6e
Bump version to 0.7.0, update `CHANGELOG.md` 2020-10-22 16:38:51 +01:00
Max Desiatov a889569373
Add Dockerfile, mention the Docker image in `README.md` (#136)
Resolves #119.

* Mention the Docker image in `README.md`

* Update .dockerignore

* Test Docker image building on CI

* Bring back the GitHub token to `swift.yml`
2020-10-22 10:58:16 +01:00
Max Desiatov 4635766c61
Fix support for Ubuntu 20.04, use GHA for SwiftLint (#134)
Resolves #114.

As support for SwiftLint in Danger seems a bit buggy (causing duplicate warning comments sometimes), this PR calls SwiftLint through a separate action that displays warnings only in the PR diff and hopefully in better way.

* Add support for Ubuntu 20.04

* Refine formatting

* Move SwiftLint to a separate GitHub Action

* Fix linker warnings

* Remove `danger.yml` and `Dangerfile.swift`

* Remove `--strict` argument from `swiftlint.yml`

* Update README.md
2020-10-21 14:27:50 +01:00
Max Desiatov 6c46eb02bd
Add @carson-katri and @kateinoigakukun to `FUNDING.yml` (#124)
* Add @carson-katri and @kateinoigakukun to `FUNDING.yml`

* Update README.md
2020-10-10 11:42:15 +01:00
yonihemi 0731ccb36f
Automatically open a browser window when Dev Server starts (#117)
* Automatically open dev server in system browser

* Allow opting out of automatically opening in browser

* Update readme with new behavior
2020-10-03 00:13:54 +08:00
Max Desiatov e76a97ece5
Mention `carton package` in README.md 2020-09-28 21:37:34 +01:00
Max Desiatov d11aca1989
Bump version to 0.6.0, update `CHANGELOG.md` 2020-09-28 21:30:26 +01:00
Max Desiatov ec698a677e
Specify Ubuntu 18.04 requirement in `README.md` 2020-09-28 20:17:35 +01:00
Max Desiatov 9c94fd02b1
Implement support for static resources in `carton dev` (#104)
This change requires `wasm-5.3-SNAPSHOT-2020-09-08-a` or later, therefore the default toolchain version has been bumped.

Implements the `carton dev` part of #38, `carton bundle` support will be implemented in a future PR.
2020-09-14 10:36:09 +01:00
Max Desiatov 53a1d46813
Implement `--custom-index-page` option (#101)
Allows passing a path to your custom `index.html` as `--custom-index-page` to `carton dev` and `carton bundle`. The entrypoint script is then injected into this file with a simple text substitution looking for a closing `</head>` tag. The assumption is that your custom `<body>` is not supposed to contain an unescaped `<head></head>`, and adding a dependency on a proper HTML parser to implement this injection is too costly.

Depends on #97.

Resolves #100.
2020-08-31 18:37:43 +01:00
Max Desiatov 5a5e7397eb
Implement `carton bundle` command (#97)
New `bundle.js` entrypoint is added, which only differs from `dev.js` in the lack of the WebSocket hot reloading bit.

`wabt` and `binaryen` Homebrew dependencies are added as required for `wasm-strip` and `wasm-opt` respectively that reduce the resulting bundle binary size.

All resulting bundle files except `index.html` are named by their content hashes to enable [cache busting](https://www.keycdn.com/support/what-is-cache-busting).

Resolves #16.
2020-08-31 16:29:47 +01:00
Max Desiatov 751a638841
Update `carton` build path on Linux in README.md 2020-08-26 21:30:15 +01:00
Max Desiatov 5b00355a08
Update `README.md` to reflect the current feature set (#90)
Xcode 12 warning is removed as 5.3 SwiftWasm snapshots that became the default are compatible with Xcode 12.

Closes #65.
Closes #81.
2020-08-20 11:35:58 +01:00
Max Desiatov c51f6176a0
Update default toolchain version (#87)
The latest 5.3 snapshot should be more stable and also supports specifying dependency on JavaScriptKit with a version range.
2020-08-18 18:02:34 +01:00
Max Desiatov 9e4c683fcb
Warn against Xcode 12 betas in `README.md` (#66)
This should somewhat alleviate the beta 3 issues reported here: https://github.com/swiftwasm/carton/issues/65
2020-07-24 11:29:06 +01:00
Max Desiatov 3d57f175f6
Remove outdated destination file documentation
Destination files are no longer needed for linking with Foundation.
2020-07-21 22:42:07 +01:00
Alex Tran Qui c07aad6fa2
Add a --release flag to the carton dev command (#19)
* Add a new option to the dev command to allow the passing of a destination.json file to the swift build command.

* Add missing link for destination.json spec

* adjust format

* Add a --release flag to the carton dev command

* fix typos

* remove extra line in README.md
2020-07-02 13:49:46 +01:00
Max Desiatov fe9bb37203
Clarify carton/swiftenv installations for destination.json 2020-07-02 12:04:08 +01:00
Alex Tran Qui 7fb12fd24d
Add --destination option to the `carton dev` command (#18)
- this add an optional flag to the `dev` command from `carton` to enable passing a `destination.json` file to the `swift build` call
- this requires that the toolchain referenced in the `destination.json` file is consistent with the one used by the `carton` process.
- it enables the importing of the `Foundation` module amongst others when running `carton dev`
2020-07-02 11:38:05 +01:00
Max Desiatov 8f26859497
Remove SDK installation from the "Roadmap" section 2020-06-26 21:47:30 +01:00
Max Desiatov 0143300d33
Refine "Motivation" section in README.md 2020-06-26 17:46:42 +01:00
Max Desiatov d9eec757f5
Update homebrew instructions in README.md 2020-06-26 15:53:46 +01:00
Max Desiatov c92dab84e7
Add version 0.2.0 to CHANGELOG.md
Resolve #3.
Close #9.
2020-06-26 15:40:55 +01:00
Max Desiatov 934fa831b1
Fix SwiftWasm book link in README.md 2020-06-23 13:56:13 +01:00
Trevör 247a568ee9
Update WASI link in README.md (#8)
Update with a correct link to WASI, for some browsers at least the current URL cannot be opened.
2020-06-21 20:35:42 +01:00
Max Desiatov e5b9e8657a
Clarify JavaScriptKit dependency in README.md 2020-06-21 10:59:03 +01:00
Max Desiatov 7b7643eeaa
Clarify "How does it work?" section in README.md 2020-06-20 20:04:14 +01:00