Skip to content
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

Sdk and Gradle update #21160

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -1,17 +1,17 @@
[target.arm-linux-androideabi]
linker = "./ports/servo/fake-ld-arm.sh"
linker = "./support/android/fakeld/fake-ld-arm.sh"
ar = "arm-linux-androideabi-ar"

[target.armv7-linux-androideabi]
linker = "./ports/servo/fake-ld-armv7.sh"
linker = "./support/android/fakeld/fake-ld-armv7.sh"
ar = "arm-linux-androideabi-ar"

[target.aarch64-linux-android]
linker = "./ports/servo/fake-ld-arm64.sh"
linker = "./support/android/fakeld/fake-ld-arm64.sh"
ar = "aarch64-linux-android-ar"

[target.i686-linux-android]
linker = "./ports/servo/fake-ld-x86.sh"
linker = "./support/android/fakeld/fake-ld-x86.sh"
ar = "i686-linux-android-ar"

[target.arm-unknown-linux-gnueabihf]
@@ -23,4 +23,4 @@ linker = "aarch64-linux-gnu-gcc"
ar = "aarch64-linux-gnu-ar"

[target.'cfg(target_os=windows)']
linker = "./ports/servo/fake-ld.cmd"
linker = "./support/android/fakeld/fake-ld.cmd"
@@ -23,7 +23,7 @@ matrix:
script:
# see https://github.com/servo/servo/issues/20664
#- ./mach cargo check -p compositing --no-default-features
- ./mach build -d --verbose
- ./mach build -d --verbose -p servo
- ./mach test-unit
- ./mach clean
- bash etc/ci/lockfile_changed.sh

Some generated files are not rendered by default. Learn more.

@@ -1,10 +1,12 @@
[workspace]
members = [
"ports/servo",
"ports/libsimpleservo/",
"tests/unit/*",
]
default-members = [
"ports/servo",
"ports/libsimpleservo/",
"tests/unit/*",
]
exclude = [".cargo"]
@@ -30,6 +30,3 @@ embedder_traits = { path = "../embedder_traits", features = ["tests"] }

[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))'.dependencies]
xdg = "2.0"

[target.'cfg(target_os = "android")'.dependencies]
android_injected_glue = "0.2"
@@ -6,42 +6,34 @@
//! For linux based platforms, it uses the XDG base directory spec but provides
//! similar abstractions for non-linux platforms.

#[cfg(target_os = "android")]
use android_injected_glue;
#[cfg(any(target_os = "macos", target_os = "windows"))]
use std::env;
#[cfg(target_os = "android")]
use std::ffi::CStr;
use std::path::PathBuf;
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
use xdg;

#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
pub fn default_config_dir() -> PathBuf {
pub fn default_config_dir() -> Option<PathBuf> {
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
xdg_dirs.get_config_home()
Some(xdg_dirs.get_config_home())
}

#[cfg(target_os = "android")]
#[allow(unsafe_code)]
pub fn default_config_dir() -> PathBuf {
let dir = unsafe {
CStr::from_ptr((*android_injected_glue::get_app().activity).externalDataPath)
};
PathBuf::from(dir.to_str().unwrap())
pub fn default_config_dir() -> Option<PathBuf> {
None
}

#[cfg(target_os = "macos")]
pub fn default_config_dir() -> PathBuf {
pub fn default_config_dir() -> Option<PathBuf> {
let mut config_dir = env::home_dir().unwrap();
config_dir.push("Library");
config_dir.push("Application Support");
config_dir.push("Servo");
config_dir
Some(config_dir)
}

#[cfg(target_os = "windows")]
pub fn default_config_dir() -> PathBuf {
pub fn default_config_dir() -> Option<PathBuf> {
let mut config_dir = match env::var_os("APPDATA") {
Some(appdata_path) => PathBuf::from(appdata_path),
None => {
@@ -52,5 +44,5 @@ pub fn default_config_dir() -> PathBuf {
}
};
config_dir.push("Servo");
config_dir
Some(config_dir)
}
@@ -4,8 +4,6 @@

#![deny(unsafe_code)]

#[cfg(target_os = "android")]
extern crate android_injected_glue;
extern crate embedder_traits;
extern crate euclid;
extern crate getopts;
@@ -183,9 +183,10 @@ pub fn add_user_prefs() {
init_user_prefs(&mut path);
}
None => {
let mut path = default_config_dir();
if path.join("prefs.json").exists() {
init_user_prefs(&mut path);
if let Some(mut path) = default_config_dir() {
if path.join("prefs.json").exists() {
init_user_prefs(&mut path);
}
}
}
}
@@ -48,6 +48,7 @@ fn test_get_set_reset_extend() {
assert_eq!(*PREFS.get("extra.stuff"), PrefValue::Boolean(false));
}

#[cfg(not(target_os = "android"))]
#[test]
fn test_default_config_dir_create_read_write() {
let json_str = "{\
@@ -56,7 +57,7 @@ fn test_default_config_dir_create_read_write() {
\"shell.homepage\": \"https://google.com\"\
}";
let mut expected_json = String::new();
let config_path = basedir::default_config_dir();
let config_path = basedir::default_config_dir().unwrap();

if !config_path.exists() {
fs::create_dir_all(&config_path).unwrap();
@@ -73,14 +73,14 @@ linux-rel-intermittent:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./mach build --release
- ./mach build --release -p servo
- ./etc/ci/check_intermittents.sh --log-raw intermittents.log

linux-rel-nogate:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./mach build --release
- ./mach build --release -p servo
- python ./etc/ci/chaos_monkey_test.py
- env RUSTFLAGS= bash ./etc/ci/mutation_test.sh

@@ -100,11 +100,11 @@ linux-dev:
- ./etc/ci/clean_build_artifacts.sh
- ./mach test-tidy --no-progress --all
- ./mach test-tidy --no-progress --self-test
- ./mach build --dev
- ./mach build --dev -p servo
- ./mach test-unit
- python ./etc/memory_reports_over_time.py --test
- ./mach package --dev
- ./mach build --dev --no-default-features --features default-except-unstable
- ./mach build --dev --no-default-features --features default-except-unstable -p servo
- bash ./etc/ci/lockfile_changed.sh
- bash ./etc/ci/check_no_panic.sh
- ./etc/ci/clean_build_artifacts.sh
@@ -117,7 +117,7 @@ linux-rel-wpt:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./mach build --release --with-debug-assertions
- ./mach build --release --with-debug-assertions -p servo
- ./mach test-wpt-failure
- ./mach test-wpt --release --processes 24 --total-chunks 2 --this-chunk 1 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed
- ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --tracker-api default --reporter-api default
@@ -131,7 +131,7 @@ linux-rel-css:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./mach build --release --with-debug-assertions
- ./mach build --release --with-debug-assertions -p servo
- ./mach test-wpt --release --processes 24 --total-chunks 2 --this-chunk 2 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed
- ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --tracker-api default --reporter-api default
- bash ./etc/ci/lockfile_changed.sh
@@ -141,7 +141,7 @@ linux-nightly:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./mach build --release
- ./mach build --release -p servo
- ./mach package --release
- ./mach upload-nightly linux
- ./mach test-perf
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.