-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
gitpod support #4700
gitpod support #4700
Changes from all commits
6ba4fad
94d38cb
397685b
6017f61
69ae81a
6d2efbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
github: | ||
prebuilds: | ||
master: true | ||
branches: true | ||
pullRequests: true | ||
pullRequestsFromForks: true | ||
addCheck: false | ||
addComment: false | ||
addBadge: true | ||
Comment on lines
+7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like the check version would be less intrusive here, if it correctly links to the same point. Looking at the docs, the badge doesn't look too bad though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. addCheck would make CI fail if pre-building for gitpod fails |
||
|
||
tasks: | ||
- name: Start web server | ||
command: python3 -m http.server --directory examples/wasm | ||
|
||
- name: Setup rust-analyzer for wasm target | ||
before: | | ||
sudo apt-get install --no-install-recommends -yq libasound2-dev libudev-dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we're building for wasm, why is this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for rust-analyzer. I guess I could add config to have it work in wasm by default, but I'm not sure where that would live There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is rust-analyzer.cargo.target at wherever gitpod allow configuring rust-analyzer. For vscode that would be .vscode/settings.json. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I added the file correctly, but still keeping the linux dependencies because they add almost nothing to the build time and they are still helpful |
||
init: | | ||
mkdir .vscode | ||
echo "{\"rust-analyzer.cargo.target\":\"wasm32-unknown-unknown\"}" > .vscode/settings.json | ||
|
||
- name: Install wasm tooling | ||
before: | | ||
rustup update | ||
rustup target add wasm32-unknown-unknown | ||
cargo install cargo-quickinstall | ||
cargo quickinstall wasm-bindgen-cli | ||
cargo quickinstall cargo-watch | ||
init: | | ||
cargo run -p build-wasm-example -- lighting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to pre-suppose which example is relevant. It would be very cool, for example, to select a relevant example which has been updated by the given PR. Or at least to have a dropdown with all the examples. OTOH, this might be the best possible option within the technical constraints of the gitpod platform. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The lighting example is one where a lot of things could go wrong, so it's a good first pick. My goal was mostly to cache everything for a wasm build, so why not go all the way to build an example There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thought: You could do this via a regular HTML form (hosted wherever), or a series of gitpod links hardcoded with an environment variable that triggers if/else logic in your configuration See: https://www.gitpod.io/docs/environment-variables#providing-one-time-environment-variables-via-url An example of a community doing this is drupal / drupalpod: https://github.com/shaal/DrupalPod |
||
|
||
vscode: | ||
extensions: | ||
- matklad.rust-analyzer |
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.
I don't like adding this new file to the root. In theory, gitpod should behave like bors and allow this file to live in the
.github
folder.I would assume it's an advertising feature for gitpod to not allow it to live in a non-root folder, but that's a scummy practise. See also gitpod-io/gitpod#729, which still doesn't suggest to use
.github
.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.
Thanks @cart for putting a comment through.
I don't expect much movement though, unfortunately.
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.
Thanks @cart for putting a comment through.
I don't expect much movement though, unfortunately.