mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
Remove DENO_BUILD_MODE and DENO_BUILD_PATH (#4431)
* Remove DENO_BUILD_MODE and DENO_BUILD_PATH Also remove outdated docs related to ninja/gn. * fix * remove parameter to build_mode() * remove arg parsing from benchmark.py
This commit is contained in:
parent
77a44163fb
commit
0adc86f105
7 changed files with 13 additions and 69 deletions
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -29,7 +29,6 @@ jobs:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
DENO_BUILD_MODE: release
|
|
||||||
RUSTC_WRAPPER: sccache
|
RUSTC_WRAPPER: sccache
|
||||||
V8_BINARY: true
|
V8_BINARY: true
|
||||||
|
|
||||||
|
@ -157,9 +156,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build debug
|
- name: Build debug
|
||||||
if: matrix.kind == 'test_debug'
|
if: matrix.kind == 'test_debug'
|
||||||
run: |
|
run: cargo build --locked --all-targets
|
||||||
echo ::set-env name=DENO_BUILD_MODE::debug
|
|
||||||
cargo build --locked --all-targets
|
|
||||||
|
|
||||||
- name: Test release
|
- name: Test release
|
||||||
if: matrix.kind == 'test_release'
|
if: matrix.kind == 'test_release'
|
||||||
|
@ -167,13 +164,11 @@ jobs:
|
||||||
|
|
||||||
- name: Test debug
|
- name: Test debug
|
||||||
if: matrix.kind == 'test_debug'
|
if: matrix.kind == 'test_debug'
|
||||||
run: |
|
run: cargo test --locked --all-targets
|
||||||
echo ::set-env name=DENO_BUILD_MODE::debug
|
|
||||||
cargo test --locked --all-targets
|
|
||||||
|
|
||||||
- name: Run Benchmarks
|
- name: Run Benchmarks
|
||||||
if: matrix.kind == 'bench'
|
if: matrix.kind == 'bench'
|
||||||
run: python ./tools/benchmark.py target/release
|
run: python ./tools/benchmark.py --release
|
||||||
|
|
||||||
- name: Post Benchmarks
|
- name: Post Benchmarks
|
||||||
if: matrix.kind == 'bench' && github.ref == 'refs/heads/master' && github.repository == 'denoland/deno'
|
if: matrix.kind == 'bench' && github.ref == 'refs/heads/master' && github.repository == 'denoland/deno'
|
||||||
|
@ -181,7 +176,7 @@ jobs:
|
||||||
DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
|
DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 -b gh-pages https://${DENOBOT_PAT}@github.com/denoland/benchmark_data.git gh-pages
|
git clone --depth 1 -b gh-pages https://${DENOBOT_PAT}@github.com/denoland/benchmark_data.git gh-pages
|
||||||
python ./tools/build_benchmark_jsons.py
|
python ./tools/build_benchmark_jsons.py --release
|
||||||
cd gh-pages
|
cd gh-pages
|
||||||
git config user.email "propelml@gmail.com"
|
git config user.email "propelml@gmail.com"
|
||||||
git config user.name "denobot"
|
git config user.name "denobot"
|
||||||
|
|
|
@ -1996,8 +1996,8 @@ mod util {
|
||||||
.env("DENO_DIR", DENO_DIR.path())
|
.env("DENO_DIR", DENO_DIR.path())
|
||||||
.current_dir(root_path())
|
.current_dir(root_path())
|
||||||
.arg(script)
|
.arg(script)
|
||||||
|
.arg(format!("--build-dir={}", target_dir().display()))
|
||||||
.arg(format!("--executable={}", deno_exe_path().display()))
|
.arg(format!("--executable={}", deno_exe_path().display()))
|
||||||
.env("DENO_BUILD_PATH", target_dir())
|
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to spawn script");
|
.expect("failed to spawn script");
|
||||||
if !output.status.success() {
|
if !output.status.success() {
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
/// To run this benchmark:
|
|
||||||
///
|
|
||||||
/// > DENO_BUILD_MODE=release ./tools/build.py && \
|
|
||||||
/// ./target/release/deno_core_http_bench --multi-thread
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate derive_deref;
|
extern crate derive_deref;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
|
@ -1603,40 +1603,6 @@ Format the code:
|
||||||
./tools/format.py
|
./tools/format.py
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Other Useful Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Call ninja manually.
|
|
||||||
ninja -C target/debug
|
|
||||||
|
|
||||||
# Build a release binary.
|
|
||||||
cargo build --release
|
|
||||||
|
|
||||||
# List executable targets.
|
|
||||||
gn --root=core/libdeno ls target/debug "//:*" --as=output --type=executable
|
|
||||||
|
|
||||||
# List build configuration.
|
|
||||||
gn --root=core/libdeno args target/debug/ --list
|
|
||||||
|
|
||||||
# Edit build configuration.
|
|
||||||
gn --root=core/libdeno args target/debug/
|
|
||||||
|
|
||||||
# Describe a target.
|
|
||||||
gn --root=core/libdeno desc target/debug/ :deno
|
|
||||||
gn help
|
|
||||||
|
|
||||||
# Update third_party modules
|
|
||||||
git submodule update
|
|
||||||
|
|
||||||
# Skip downloading binary build tools and point the build
|
|
||||||
# to the system provided ones (for packagers of deno ...).
|
|
||||||
export DENO_BUILD_ARGS="clang_base_path=/usr clang_use_chrome_plugins=false"
|
|
||||||
DENO_NO_BINARY_DOWNLOAD=1 DENO_GN_PATH=/usr/bin/gn cargo build
|
|
||||||
```
|
|
||||||
|
|
||||||
Environment variables: `DENO_BUILD_MODE`, `DENO_BUILD_PATH`, `DENO_BUILD_ARGS`,
|
|
||||||
`DENO_DIR`, `DENO_GN_PATH`, `DENO_NO_BINARY_DOWNLOAD`.
|
|
||||||
|
|
||||||
### Submitting a Pull Request
|
### Submitting a Pull Request
|
||||||
|
|
||||||
Before submitting, please make sure the following is done:
|
Before submitting, please make sure the following is done:
|
||||||
|
|
|
@ -223,15 +223,8 @@ def bundle_benchmark(deno_exe):
|
||||||
return sizes
|
return sizes
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main():
|
||||||
if len(argv) == 2:
|
build_dir = build_path()
|
||||||
build_dir = sys.argv[1]
|
|
||||||
elif len(argv) == 1:
|
|
||||||
build_dir = build_path()
|
|
||||||
else:
|
|
||||||
print "Usage: tools/benchmark.py [build_dir]"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
sha1 = run_output(["git", "rev-parse", "HEAD"],
|
sha1 = run_output(["git", "rev-parse", "HEAD"],
|
||||||
exit_on_fail=True).out.strip()
|
exit_on_fail=True).out.strip()
|
||||||
http_server.spawn()
|
http_server.spawn()
|
||||||
|
@ -271,4 +264,4 @@ def main(argv):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main(sys.argv)
|
main()
|
||||||
|
|
|
@ -2,7 +2,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from test_util import DenoTestCase, run_tests
|
from test_util import DenoTestCase, run_tests
|
||||||
from util import build_mode, executable_suffix, tests_path, run, run_output
|
from util import executable_suffix, tests_path, run, run_output
|
||||||
|
|
||||||
|
|
||||||
class TestTarget(DenoTestCase):
|
class TestTarget(DenoTestCase):
|
||||||
|
|
|
@ -204,21 +204,16 @@ def rmtree(directory):
|
||||||
shutil.rmtree(directory, onerror=rm_readonly)
|
shutil.rmtree(directory, onerror=rm_readonly)
|
||||||
|
|
||||||
|
|
||||||
def build_mode(default="debug"):
|
def build_mode():
|
||||||
if "DENO_BUILD_MODE" in os.environ:
|
if "--release" in sys.argv:
|
||||||
return os.environ["DENO_BUILD_MODE"]
|
|
||||||
elif "--release" in sys.argv:
|
|
||||||
return "release"
|
return "release"
|
||||||
else:
|
else:
|
||||||
return default
|
return "debug"
|
||||||
|
|
||||||
|
|
||||||
# E.G. "target/debug"
|
# E.G. "target/debug"
|
||||||
def build_path():
|
def build_path():
|
||||||
if "DENO_BUILD_PATH" in os.environ:
|
return os.path.join(root_path, "target", build_mode())
|
||||||
return os.environ["DENO_BUILD_PATH"]
|
|
||||||
else:
|
|
||||||
return os.path.join(root_path, "target", build_mode())
|
|
||||||
|
|
||||||
|
|
||||||
def parse_exit_code(s):
|
def parse_exit_code(s):
|
||||||
|
|
Loading…
Reference in a new issue