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:
|
||||
RUST_BACKTRACE: full
|
||||
DENO_BUILD_MODE: release
|
||||
RUSTC_WRAPPER: sccache
|
||||
V8_BINARY: true
|
||||
|
||||
|
@ -157,9 +156,7 @@ jobs:
|
|||
|
||||
- name: Build debug
|
||||
if: matrix.kind == 'test_debug'
|
||||
run: |
|
||||
echo ::set-env name=DENO_BUILD_MODE::debug
|
||||
cargo build --locked --all-targets
|
||||
run: cargo build --locked --all-targets
|
||||
|
||||
- name: Test release
|
||||
if: matrix.kind == 'test_release'
|
||||
|
@ -167,13 +164,11 @@ jobs:
|
|||
|
||||
- name: Test debug
|
||||
if: matrix.kind == 'test_debug'
|
||||
run: |
|
||||
echo ::set-env name=DENO_BUILD_MODE::debug
|
||||
cargo test --locked --all-targets
|
||||
run: cargo test --locked --all-targets
|
||||
|
||||
- name: Run Benchmarks
|
||||
if: matrix.kind == 'bench'
|
||||
run: python ./tools/benchmark.py target/release
|
||||
run: python ./tools/benchmark.py --release
|
||||
|
||||
- name: Post Benchmarks
|
||||
if: matrix.kind == 'bench' && github.ref == 'refs/heads/master' && github.repository == 'denoland/deno'
|
||||
|
@ -181,7 +176,7 @@ jobs:
|
|||
DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
|
||||
run: |
|
||||
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
|
||||
git config user.email "propelml@gmail.com"
|
||||
git config user.name "denobot"
|
||||
|
|
|
@ -1996,8 +1996,8 @@ mod util {
|
|||
.env("DENO_DIR", DENO_DIR.path())
|
||||
.current_dir(root_path())
|
||||
.arg(script)
|
||||
.arg(format!("--build-dir={}", target_dir().display()))
|
||||
.arg(format!("--executable={}", deno_exe_path().display()))
|
||||
.env("DENO_BUILD_PATH", target_dir())
|
||||
.output()
|
||||
.expect("failed to spawn script");
|
||||
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]
|
||||
extern crate derive_deref;
|
||||
#[macro_use]
|
||||
|
|
|
@ -1603,40 +1603,6 @@ Format the code:
|
|||
./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
|
||||
|
||||
Before submitting, please make sure the following is done:
|
||||
|
|
|
@ -223,15 +223,8 @@ def bundle_benchmark(deno_exe):
|
|||
return sizes
|
||||
|
||||
|
||||
def main(argv):
|
||||
if len(argv) == 2:
|
||||
build_dir = sys.argv[1]
|
||||
elif len(argv) == 1:
|
||||
build_dir = build_path()
|
||||
else:
|
||||
print "Usage: tools/benchmark.py [build_dir]"
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
build_dir = build_path()
|
||||
sha1 = run_output(["git", "rev-parse", "HEAD"],
|
||||
exit_on_fail=True).out.strip()
|
||||
http_server.spawn()
|
||||
|
@ -271,4 +264,4 @@ def main(argv):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
main()
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import sys
|
||||
|
||||
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):
|
||||
|
|
|
@ -204,21 +204,16 @@ def rmtree(directory):
|
|||
shutil.rmtree(directory, onerror=rm_readonly)
|
||||
|
||||
|
||||
def build_mode(default="debug"):
|
||||
if "DENO_BUILD_MODE" in os.environ:
|
||||
return os.environ["DENO_BUILD_MODE"]
|
||||
elif "--release" in sys.argv:
|
||||
def build_mode():
|
||||
if "--release" in sys.argv:
|
||||
return "release"
|
||||
else:
|
||||
return default
|
||||
return "debug"
|
||||
|
||||
|
||||
# E.G. "target/debug"
|
||||
def build_path():
|
||||
if "DENO_BUILD_PATH" in os.environ:
|
||||
return os.environ["DENO_BUILD_PATH"]
|
||||
else:
|
||||
return os.path.join(root_path, "target", build_mode())
|
||||
return os.path.join(root_path, "target", build_mode())
|
||||
|
||||
|
||||
def parse_exit_code(s):
|
||||
|
|
Loading…
Reference in a new issue