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

add copybara file and the associated workflow #100

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/rocm_copybara.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Sync rocm/jax with jax-ml/jax
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 12 * * *' # Runs every day
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be best to run at 6 or 7 am.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes sense.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason? I have seen them upstreaming stuff anytime of the day

jobs:
upstream_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # ratchet:actions/checkout@v4
with:
fetch-depth: 0
- run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
- run: |
echo "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com" >> ~/.git-credentials
- run: |
echo "${{ secrets.SSH_KEY }}" >> ~/.ssh/id_rsa
- run: |
docker run -t --rm -v$HOME/.ssh:/root/.ssh -v $HOME/.git-credentials:/root/.git-credentials -v $GITHUB_WORKSPACE/build/rocm:/data -e COPYBARA_CONFIG=/data/copy.bara.sky sharelatex/copybara bash -c "git config --global user.name jaxbara; git config --global user.email [email protected]; copybara"
24 changes: 24 additions & 0 deletions build/rocm/ci-build.yaml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 03e7a0405..14f54944a 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -39,8 +39,6 @@ jobs:
build:
name: "build ${{ matrix.name-prefix }} (py ${{ matrix.python-version }} on ubuntu-20.04, x64=${{ matrix.enable-x64}})"
runs-on: ROCM-Ubuntu
- container:
- image: index.docker.io/library/ubuntu@sha256:6d8d9799fe6ab3221965efac00b4c34a2bcc102c086a58dff9e19a08b913c7ef # ratchet:ubuntu:20.04
timeout-minutes: 60
strategy:
matrix:
@@ -58,10 +56,6 @@ jobs:
num_generated_cases: 1
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- - name: Image Setup
- run: |
- apt update
- apt install -y libssl-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
19 changes: 19 additions & 0 deletions build/rocm/copy.bara.sky
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# copy.bara.sky

core.workflow(
name = "default",
origin = git.origin(url = "ssh://[email protected]/jax-ml/jax", ref = "main"),
destination = git.github_pr_destination(url = "ssh://[email protected]/ROCm/jax", destination_ref = "main", pr_branch="from_upstream_${CONTEXT_REFERENCE}",
title= "Sync with upstream ${COPYBARA_CONTEXT_REFERENCE}",
body = "PR to bring changes from jax-ml/jax to ROCm/jax",
integrates = []),
destination_files = glob(["**"]),
authoring = authoring.pass_thru("Default email <[email protected]>"),
transformations = [
core.replace('ubuntu-20.04-16core', 'ROCM-Ubuntu',paths= glob([".github/workflows/*.yaml", ".github/workflows/*.yml"])),
core.replace('linux-x86-n2-32', 'ROCM-Ubuntu',paths= glob([".github/workflows/*.yaml", ".github/workflows/*.yml"])),
patch.apply(
patches = ["ci-build.yaml.patch"],
),
],
)