Compare commits

...

7 Commits

Author SHA1 Message Date
Josh Matthews
b0e4c302de No shallow clone for WPT sync. 2019-05-21 14:31:20 -04:00
Josh Matthews
cb79b941cb Support non-shallow clones. 2019-05-21 14:30:50 -04:00
Josh Matthews
6f51be6f7a Support non-shallow repos. 2019-05-21 14:27:16 -04:00
Josh Matthews
5dde6c8b80 no err 2019-05-21 14:10:37 -04:00
Josh Matthews
cd4cb53968 whee 2019-05-21 13:46:51 -04:00
Josh Matthews
56f2d418af recreate macos release build if necessary 2019-05-21 10:57:31 -04:00
Josh Matthews
8161403e8b . 2019-05-21 10:52:12 -04:00
3 changed files with 24 additions and 19 deletions

View File

@@ -105,7 +105,7 @@ function unsafe_open_pull_request() {
AUTH="${WPT_SYNC_USER}:${WPT_SYNC_TOKEN}" AUTH="${WPT_SYNC_USER}:${WPT_SYNC_TOKEN}"
UPSTREAM="https://${AUTH}@github.com/${WPT_SYNC_USER}/servo.git" UPSTREAM="https://${AUTH}@github.com/${WPT_SYNC_USER}/servo.git"
git remote add "${REMOTE_NAME}" "${UPSTREAM}" || return 2 git remote add "${REMOTE_NAME}" "${UPSTREAM}" || return 2
git push -f "${REMOTE_NAME}" "${BRANCH_NAME}:${REMOTE_BRANCH_NAME}" &>/dev/null || return 3 git push -f "${REMOTE_NAME}" "${BRANCH_NAME}:${REMOTE_BRANCH_NAME}" || return 3
# Prepare the pull request metadata. # Prepare the pull request metadata.
BODY="Automated downstream sync of changes from upstream as of " BODY="Automated downstream sync of changes from upstream as of "
@@ -193,7 +193,7 @@ function main() {
elif [[ "${1}" == "cleanup" ]]; then elif [[ "${1}" == "cleanup" ]]; then
cleanup cleanup
else elif [[ "${1}" != "fetch-upstream-changes" ]]; then
usage usage
fi fi
} }

View File

@@ -88,13 +88,13 @@ def main(task_for):
# https://tools.taskcluster.net/hooks/project-servo/daily # https://tools.taskcluster.net/hooks/project-servo/daily
elif task_for == "daily": elif task_for == "daily":
daily_tasks_setup() daily_tasks_setup()
with_rust_nightly() #with_rust_nightly()
linux_nightly() #linux_nightly()
android_nightly() #android_nightly()
windows_nightly() #windows_nightly()
macos_nightly() #macos_nightly()
update_wpt() update_wpt()
magicleap_nightly() #magicleap_nightly()
# These are disabled in a "real" decision task, # These are disabled in a "real" decision task,
@@ -476,7 +476,7 @@ def macos_nightly():
def update_wpt(): def update_wpt():
# Reuse the release build that was made for landing the PR # Reuse the release build that was made for landing the PR
build_task = decisionlib.Task.find("build.macos_x64_release." + CONFIG.git_sha) build_task = decisionlib.Task.find("build.macos_x64_release.56f2d418af42ff1f5e82b3cbe6104bfe1c415f4e")
update_task = ( update_task = (
macos_task("WPT update") macos_task("WPT update")
.with_python2() .with_python2()
@@ -491,12 +491,12 @@ def update_wpt():
"etc/taskcluster/macos/Brewfile-wpt", "etc/taskcluster/macos/Brewfile-wpt",
"etc/taskcluster/macos/Brewfile-gstreamer", "etc/taskcluster/macos/Brewfile-gstreamer",
]) ])
.with_repo() .with_repo(shallow=False)
.with_curl_artifact_script(build_task, "target.tar.gz") .with_curl_artifact_script(build_task, "target.tar.gz")
.with_script(""" .with_script("""
export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig/" export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig/"
tar -xzf target.tar.gz tar -xzf target.tar.gz
./etc/ci/update-wpt-checkout fetch-and-update-expectations ./etc/ci/update-wpt-checkout fetch-upstream-changes
./etc/ci/update-wpt-checkout open-pr ./etc/ci/update-wpt-checkout open-pr
./etc/ci/update-wpt-checkout cleanup ./etc/ci/update-wpt-checkout cleanup
""") """)
@@ -504,8 +504,8 @@ def update_wpt():
) )
def macos_wpt(): def macos_release_build():
build_task = ( return (
macos_build_task("Release build") macos_build_task("Release build")
.with_treeherder("macOS x64", "Release") .with_treeherder("macOS x64", "Release")
.with_script(""" .with_script("""
@@ -518,8 +518,13 @@ def macos_wpt():
target/release/build/osmesa-src-*/out/src/mapi/shared-glapi/.libs target/release/build/osmesa-src-*/out/src/mapi/shared-glapi/.libs
""") """)
.with_artifacts("repo/target.tar.gz") .with_artifacts("repo/target.tar.gz")
.with_index_and_artifacts_expire_in(build_artifacts_expire_in)
.find_or_create("build.macos_x64_release." + CONFIG.git_sha) .find_or_create("build.macos_x64_release." + CONFIG.git_sha)
) )
def macos_wpt():
build_task = macos_release_build()
def macos_run_task(name): def macos_run_task(name):
task = macos_task(name).with_python2() task = macos_task(name).with_python2()
return ( return (

View File

@@ -427,7 +427,7 @@ class WindowsGenericWorkerTask(GenericWorkerTask):
self.with_early_script("set PATH=%HOMEDRIVE%%HOMEPATH%\\{};%PATH%".format(p)) self.with_early_script("set PATH=%HOMEDRIVE%%HOMEPATH%\\{};%PATH%".format(p))
return self return self
def with_repo(self, sparse_checkout=None): def with_repo(self, sparse_checkout=None, shallow=True):
""" """
Make a shallow clone the git repository at the start of the task. Make a shallow clone the git repository at the start of the task.
This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`, This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`,
@@ -452,9 +452,9 @@ class WindowsGenericWorkerTask(GenericWorkerTask):
type .git\\info\\sparse-checkout type .git\\info\\sparse-checkout
""" """
git += """ git += """
git fetch --depth 1 %GIT_URL% %GIT_REF% git fetch {depth} %GIT_URL% %GIT_REF%
git reset --hard %GIT_SHA% git reset --hard %GIT_SHA%
""" """.format(depth="--depth 1" if shallow else "")
return self \ return self \
.with_git() \ .with_git() \
.with_script(git) \ .with_script(git) \
@@ -560,7 +560,7 @@ class UnixTaskMixin(Task):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.curl_scripts_count = 0 self.curl_scripts_count = 0
def with_repo(self): def with_repo(self, shallow=True):
""" """
Make a shallow clone the git repository at the start of the task. Make a shallow clone the git repository at the start of the task.
This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha` This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`
@@ -578,9 +578,9 @@ class UnixTaskMixin(Task):
.with_early_script(""" .with_early_script("""
git init repo git init repo
cd repo cd repo
git fetch --depth 1 "$GIT_URL" "$GIT_REF" git fetch {depth} "$GIT_URL" "$GIT_REF"
git reset --hard "$GIT_SHA" git reset --hard "$GIT_SHA"
""") """.format(depth="--depth 1" if shallow else ""))
def with_curl_script(self, url, file_path): def with_curl_script(self, url, file_path):
self.curl_scripts_count += 1 self.curl_scripts_count += 1