-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Improve time taken to run the examples by optimizing vtadmin build
#13262
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a6c15cf
Extract the nvm/node and npm dependencies installation in the make bu…
frouioui b65c864
wip
frouioui e2c234a
add header
frouioui 60a5349
Merge remote-tracking branch 'origin/main' into optimize-vtadmin-build
frouioui 7c12b9f
optimize build for releases
frouioui 43af5e6
optimize build even more by moving all build step to earlier stages
frouioui 2e42afb
use proper node version in github action create release
frouioui f21b1d0
add trailing new line
frouioui 1170af9
apply review suggestion
frouioui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright 2023 The Vitess Authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| function output() { | ||
| echo -e "$@" | ||
| } | ||
|
|
||
| script_dir="$(dirname "${BASH_SOURCE[0]:-$0}")" | ||
| source "${script_dir}/../../build.env" | ||
| web_dir="${script_dir}" | ||
|
|
||
| vtadmin_api_port=14200 | ||
|
|
||
| # Download nvm and node | ||
| if [[ -z ${NVM_DIR} ]]; then | ||
| export NVM_DIR="$HOME/.nvm" | ||
| fi | ||
|
|
||
| if [[ -z ${NODE_VERSION} ]]; then | ||
| export NODE_VERSION="18.16.0" | ||
| fi | ||
|
|
||
| output "\nInstalling nvm...\n" | ||
|
|
||
| if [ -d "$NVM_DIR" ]; then | ||
| output "\033[1;32mnvm is already installed!\033[0m" | ||
| else | ||
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash && output "\033[1;32mnvm is installed!\033[0m" || fail "\033[1;32mnvm failed to install!\033[0m" | ||
| fi | ||
|
|
||
| source "$NVM_DIR/nvm.sh" | ||
|
|
||
| output "\nConfiguring Node.js $NODE_VERSION\n" | ||
| nvm install "$NODE_VERSION" || fail "Could not install and use nvm $NODE_VERSION." | ||
|
|
||
| npm --prefix "$web_dir" --silent install | ||
|
|
||
| VITE_VTADMIN_API_ADDRESS="http://${hostname}:${vtadmin_api_port}" \ | ||
| VITE_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS="true" \ | ||
| npm run --prefix "$web_dir" build | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.