mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-21 15:04:33 -05:00
parent
759b65a13b
commit
ae7809136d
10 changed files with 75 additions and 23 deletions
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
|
@ -1,6 +1,6 @@
|
|||
name: ci
|
||||
|
||||
on: [pull_request] # TODO(ry) [push, pull_request]
|
||||
on: [push] # TODO(ry) [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -9,7 +9,7 @@ jobs:
|
|||
timeout-minutes: 60
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macOS-10.14, windows-2019, ubuntu-16.04]
|
||||
os: [macOS-10.14, ubuntu-16.04] # TODO(ry) windows-2019
|
||||
steps:
|
||||
- name: Configure git
|
||||
run: git config --global core.symlinks true
|
||||
|
@ -46,8 +46,7 @@ jobs:
|
|||
curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz
|
||||
tar -xzvf sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz
|
||||
echo ::add-path::`pwd`/sccache-0.2.12-x86_64-unknown-linux-musl/
|
||||
echo ::add-path::`pwd`/third_party/sscache/linux64
|
||||
echo ::add-path::`pwd`/target/release
|
||||
echo ::add-path::`pwd`/third_party/depot_tools/
|
||||
|
||||
- name: Environment (mac)
|
||||
if: startsWith(matrix.os, 'macOS')
|
||||
|
@ -55,6 +54,7 @@ jobs:
|
|||
curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-apple-darwin.tar.gz
|
||||
tar -xzvf sccache-0.2.12-x86_64-apple-darwin.tar.gz
|
||||
echo ::add-path::`pwd`/sccache-0.2.12-x86_64-apple-darwin/
|
||||
echo ::add-path::`pwd`/third_party/depot_tools/
|
||||
|
||||
- name: Environment (windows)
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
|
@ -65,22 +65,25 @@ jobs:
|
|||
curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz
|
||||
tar -zxvf sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz
|
||||
echo ::add-path::$(pwd)\sccache-0.2.12-x86_64-pc-windows-msvc\
|
||||
echo ::add-path::$(pwd)\target\release
|
||||
echo ::add-path::$(pwd)\third_party\depot_tools\
|
||||
|
||||
- name: Start sccache
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: AKIAIVRN52PLDBP55LBQ
|
||||
AWS_ACCESS_KEY_ID: AKIA6QEJVNZDGHRMR2KF
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
SCCACHE_BUCKET: deno-sccache
|
||||
SCCACHE_IDLE_TIMEOUT: 0
|
||||
run: sccache --start-server
|
||||
|
||||
- name: Build
|
||||
run: cargo build -vv --release --locked --all-targets
|
||||
run: |
|
||||
git --version
|
||||
cargo build -vv --release --locked --all-targets
|
||||
|
||||
- name: Test
|
||||
if: matrix.kind == 'test'
|
||||
run: cargo test -vv --release --locked --all-targets
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --all-targets --release --locked -- -D clippy::all
|
||||
run: |
|
||||
rustup component add clippy
|
||||
cargo clippy --all-targets --release --locked -- -D clippy::all
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,4 +2,4 @@
|
|||
**/*.rs.bk
|
||||
/third_party/.cipd/
|
||||
/third_party/gclient_config.py_entries
|
||||
/third_party/v8
|
||||
/third_party/v8/
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
# rusty_v8
|
||||
|
||||
[![Build Status](https://github.com/denoland/rusty_v8/workflows/ci/badge.svg?branch=master)](https://github.com/denoland/rusty_v8/actions)
|
||||
|
||||
This is a project to replace libdeno with a full V8 binding. It's very much
|
||||
under construction and not usable. I'll update this message if it ever is.
|
||||
|
|
37
build.rs
37
build.rs
|
@ -1,6 +1,7 @@
|
|||
use cargo_gn;
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use which::which;
|
||||
|
||||
|
@ -25,7 +26,14 @@ fn main() {
|
|||
println!("cargo:warning=Not using sccache");
|
||||
}
|
||||
|
||||
let gn_out = cargo_gn::maybe_gen(".", gn_args);
|
||||
// gn_root should be absolute.
|
||||
let gn_root = env::current_dir()
|
||||
.unwrap()
|
||||
.into_os_string()
|
||||
.into_string()
|
||||
.unwrap();;
|
||||
|
||||
let gn_out = cargo_gn::maybe_gen(&gn_root, gn_args);
|
||||
assert!(gn_out.exists());
|
||||
assert!(gn_out.join("args.gn").exists());
|
||||
cargo_gn::build("rusty_v8");
|
||||
|
@ -35,6 +43,7 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO(ry) Remove
|
||||
fn disable_depot_tools_update() {
|
||||
Command::new("python")
|
||||
.arg("third_party/depot_tools/update_depot_tools_toggle.py")
|
||||
|
@ -54,22 +63,34 @@ fn git_submodule_update() {
|
|||
}
|
||||
|
||||
fn gclient_sync() {
|
||||
let gclient = Path::new("third_party/depot_tools/gclient.py");
|
||||
let root = env::current_dir().unwrap();
|
||||
let third_party = root.join("third_party");
|
||||
let gclient_rel = PathBuf::from("depot_tools/gclient.py");
|
||||
|
||||
if !gclient.exists() {
|
||||
if !third_party.join(&gclient_rel).exists() {
|
||||
git_submodule_update();
|
||||
}
|
||||
assert!(gclient.exists());
|
||||
disable_depot_tools_update();
|
||||
// Command::new(gclient config http://src.chromium.org/svn/trunk/src
|
||||
|
||||
println!(
|
||||
"cargo:warning=Running gclient sync to download V8. This could take a while."
|
||||
);
|
||||
|
||||
println!("cargo:warning=Running gclient sync to download V8. This could take a while.");
|
||||
let mut cmd = Command::new("python");
|
||||
cmd.arg("depot_tools/gclient.py");
|
||||
cmd.current_dir(&third_party);
|
||||
cmd.arg(&gclient_rel);
|
||||
cmd.arg("sync");
|
||||
cmd.arg("--gclientfile=gclient_config.py");
|
||||
cmd.arg("--no-history");
|
||||
cmd.arg("--shallow");
|
||||
cmd.current_dir("third_party");
|
||||
// cmd.arg("--verbose");
|
||||
cmd.env("DEPOT_TOOLS_UPDATE", "0");
|
||||
cmd.env("DEPOT_TOOLS_METRICS", "0");
|
||||
cmd.env("GCLIENT_FILE", third_party.join("gclient_config.py"));
|
||||
// We're not using Google's internal infrastructure.
|
||||
cmd.env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0");
|
||||
|
||||
println!("running: {:?}", cmd);
|
||||
let status = cmd.status().expect("gclient sync failed");
|
||||
assert!(status.success());
|
||||
}
|
||||
|
|
3
env.bat
3
env.bat
|
@ -1,3 +0,0 @@
|
|||
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
set PATH=%~dp0\goog\depot_tools;%PATH%
|
||||
set RUSTFLAGS=-C target-feature=+crt-static -C linker=%~dp0goog\v8\third_party\llvm-build\Release+Asserts\bin\lld-link.exe
|
2
testing
2
testing
|
@ -1 +1 @@
|
|||
third_party/v8/testing/
|
||||
third_party/v8/testing
|
2
third_party/depot_tools
vendored
2
third_party/depot_tools
vendored
|
@ -1 +1 @@
|
|||
Subproject commit acf922ce48cfd1ecf88582d9dbecf14e8d1fe369
|
||||
Subproject commit ba97f6065ed1e9336585468dd85e680cf09d5166
|
1
third_party/jinja2
vendored
Symbolic link
1
third_party/jinja2
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
v8/third_party/jinja2/
|
1
third_party/markupsafe
vendored
Symbolic link
1
third_party/markupsafe
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
v8/third_party/markupsafe/
|
25
tools/gclient_config.py
Normal file
25
tools/gclient_config.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
solutions = [
|
||||
{
|
||||
'url': 'https://chromium.googlesource.com/v8/v8.git@7.9.317.12',
|
||||
'name': 'v8',
|
||||
'deps_file': 'DEPS',
|
||||
'custom_deps': {
|
||||
# 'v8/build': None,
|
||||
'v8/third_party/catapult': None,
|
||||
'v8/third_party/colorama/src': None,
|
||||
'v8/testing/gmock': None,
|
||||
'v8/tools/swarming_client': None,
|
||||
'v8/tools/gyp': None,
|
||||
'v8/third_party/instrumented_libraries': None,
|
||||
'v8/third_party/android_tools': None,
|
||||
# 'v8/third_party/depot_tools': None,
|
||||
'v8/test/wasm-js': None,
|
||||
'v8/test/benchmarks/data': None,
|
||||
'v8/test/mozilla/data': None,
|
||||
'v8/third_party/icu': None,
|
||||
'v8/test/test262/data': None,
|
||||
'v8/test/test262/harness': None,
|
||||
'v8/tools/luci-go': None
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue