Skip to content

Use existing script in submodule synchronize action - #4358

Merged
GMNGeoffrey merged 2 commits into
iree-org:mainfrom
GMNGeoffrey:actions-use-gh
Jan 5, 2021
Merged

GMNGeoffrey merged 2 commits into
iree-org:mainfrom
GMNGeoffrey:actions-use-gh

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented Dec 30, 2020 •

Copy link
Copy Markdown
Member

This avoids needing to reconfigure the same thing in two different
syntaxes. The gh CLI is available on GitHub action runners and
respects the GITHUB_TOKEN env variable for auth.

Tested:
Ran on my fork. https://github.com/GMNGeoffrey/iree/actions/runs/453306027 created GMNGeoffrey#66

@google-cla google-cla Bot added the cla: yes label Dec 30, 2020
@GMNGeoffrey GMNGeoffrey changed the title actions use gh Use existing script in submodule synchronize action Dec 30, 2020
@GMNGeoffrey

Copy link
Copy Markdown
Member Author

Depends on #4357. Only the last commit is part of this PR

@ScottTodd

Copy link
Copy Markdown
Member

Not directly related, but can we clarify the descriptions with these two scripts? Running update_llvm_dependent_submodules.sh creates a PR with ./scripts/git/update_to_llvm_syncpoint.py in it's message due to https://github.com/google/iree/blob/197f33b18817164e2b5e9620741d8ac0efa532a7/scripts/git/update_llvm_dependent_submodules.sh#L42

@GMNGeoffrey

Copy link
Copy Markdown
Member Author

Not directly related, but can we clarify the descriptions with these two scripts? Running update_llvm_dependent_submodules.sh creates a PR with ./scripts/git/update_to_llvm_syncpoint.py in it's message due to

https://github.com/google/iree/blob/197f33b18817164e2b5e9620741d8ac0efa532a7/scripts/git/update_llvm_dependent_submodules.sh#L42

This is intentional. The rationale is that the content of the PR comes from that python script. The particular method by which someone created the PR isn't super relevant IMO and is just helpful for if you're doing this all the time. I regularly create PRs with gh pr create --fill, but I don't include that in the PR description 😁

@GMNGeoffrey
GMNGeoffrey merged commit 52ebf7b into iree-org:main Jan 5, 2021
@GMNGeoffrey
GMNGeoffrey deleted the actions-use-gh branch January 5, 2021 19:25
@GMNGeoffrey

Copy link
Copy Markdown
Member Author

Merging this one. We can continue to discuss the script message stuff 🙂

@ScottTodd

Copy link
Copy Markdown
Member

Not directly related, but can we clarify the descriptions with these two scripts? Running update_llvm_dependent_submodules.sh creates a PR with ./scripts/git/update_to_llvm_syncpoint.py in it's message due to
https://github.com/google/iree/blob/197f33b18817164e2b5e9620741d8ac0efa532a7/scripts/git/update_llvm_dependent_submodules.sh#L42

This is intentional. The rationale is that the content of the PR comes from that python script. The particular method by which someone created the PR isn't super relevant IMO and is just helpful for if you're doing this all the time. I regularly create PRs with gh pr create --fill, but I don't include that in the PR description 😁

The message reads like "this commit was created by running this script" to me. The fact that the script itself ran a different script isn't really that useful to me. Most uses of these scripts are simple run script -> merge PR workflows, so I really only check the commit message for unique diffs like "ran the script then fixed CMake by doing X, Y, and Z".

nicolasvasilache pushed a commit to nicolasvasilache/iree that referenced this pull request Jan 6, 2021
This avoids needing to reconfigure the same thing in two different
syntaxes. The `gh` CLI is available on GitHub action runners and
respects the `GITHUB_TOKEN` env variable for auth.

Tested:
Ran on my fork. https://github.com/GMNGeoffrey/iree/actions/runs/453306027 created GMNGeoffrey#66
@KoolJBlack KoolJBlack mentioned this pull request Jan 7, 2021
iree-copybara-bot added a commit that referenced this pull request Jan 7, 2021
* bb0f95e Enable all packages on all every OS.
* 7cf454d Add dependencies properly for python install targets.
* 827eccf Third attempt: Rename packages to not collide on 'compiler' term.
* a3145cb Second attempt: fix some target names and change the docker image.
* 763fc1b First attempt: enable all python packages as experimental on linux.
* 9364f0f Add install targets for all python packages and configure in CI.
* 6fe74ac Correctly get binary name in android run_binary_test (#4403)
* b1bc038 Remove special handling for runtime -> compiler dep (#4396)
* 38d3c14 Disable run_binary_test on Android (#4402)
* 35d4b32 Build an e2e path for linalg on tensors. (#4368)
* c0e362c Merge google -> main (#4401)
* 7aecc34 Merge branch 'main' into google-to-main
* 7dc756b Attempt to appease linter on SUBMODULE_VERSIONS for mlir-emitc
* c83f594 Use backward buffer allocation in HLOToLinalgOnBuffers (#4318)
* 4889612 Avoid running slow benchmarks as part of testing (#4364)
* 9b72435 Default to quoting strings in Bazel -> CMake (#4394)
* 2a52c0f Fix m1 builds (#4361)
* 30f67df Update cross-compilation for changed experimental flag names (#4365)
* dc7d633 Merge pull request #4386 from google/benvanik-hal-pre
* 3d577af Move macos out of experimental now that it builds.
* 1c2a4bf Note that iree_task_list_discard leaves the list in a usable state.
* dcd1b53 Adding utils for common string view and allocator operations.
* d2af7f3 Adding iree_atomic_thread_fence (like (std::)atomic_thread_fence).
* c691e23 Bazel -> CMake cleanup (#4362)
* e002f99 Attempt to pin the python executable more robustly for macos.
* eb184f9 Link Foundation and Metal frameworks on macos.
* cc8c1b2 Turn -Wunused-variable back on (#4360)
* 52ebf7b Use existing script in submodule synchronize action (#4358)
* 0f0fffd Get remote name in a more portable way in gh scripting (#4357)
* 4868a49 Add one-shot runtime MacOS sanity check workflow.
* 44ca211 Actually use the platlib install command for linux wheels.
* fd36682 [spirv] Replace SPIRVOpLowering with a local class (#4383)
* cf10473 Fix macos matrix spec.
* 197f33b Enable windows build as non experimental.
* 05190e1 Make pyiree compiler package compatible with manylinux2014.
* 626d45a Add missing dep on HLOToLinalg (#4377)
* b0e8243 Integrate MLIR-EmitC at iml130/mlir-emitc@a438d3b (#4375)
* f0514e4 NFC: Fix some pre-existing yaml lint.
* bb1de96 Plumb package suffix, version, and revision info to release packages.
* 995d0b7 Moved iree-check-module-main.cc to iree/tools (#4312)
* 56e40ac Remove suspected merge conflict in darwin_threading.c.
* 938875f Enable macos and windows builds.
* 921b46d Rename cmake_configure_ci.py -> cmake_ci.py.
* 57435cd Fix typo build_iree -> iree_build.
* fd1d06c Fix typo in install-iree -> iree-install.
* 2ab4dfc Update workflow dispatch token.
* 29f1596 Re-enable tag fetching
* f8f4031 Fix issues in snapshot schedule.
* bd6cf1f Add scheduled workflow to trigger snapshot releases.
* 442b35e Fix typo in runtime matrix check.
* b4981b2 Configure pipeline to build IREE runtime wheels.
* 77a63cd Make the main python packages cmake installable.
* 4e1602a Add cmake_configure_ci.py.
* 723ff37 Remove typo from GCC iree_atomic_load_auto macro.
* 847ac69 Disable workflow on push to cidev
* e666fbf Fixing the casting behavior of atomic compare exchange on windows.
* 25c4cb3 Adding merge_from support for IntrusiveList unique_ptr/ref_ptr.
* 334d3e2 Update getting_started_linux_cmake.md (#4367)
* c9687d4 Update bazel_to_cmake to support testonly for iree_bytecode_module (#4337)
* 0657be2 Fix mlir-hlo path in Submodule update scripting (#4356)
* d146a3d Add scripting to update mlir-hlo to match LLVM commit (#4348)
* 3010d3c Clean up naming in LLVM sync script (#4346)
* af6c2d4 Merge pull request #4227 from google/benvanik-tasks-core
* 01600a5 Adding an entire RTOS-scale task scheduling system.
* b47e6f0 Clarifying note on iree_wait_set_erase.
* a60332c Tweaking thread affinity groups to have an SMT flag. This allows us to keep th..
* c5b440d Adding tracing to thread name setters. Turns out, setting the thread name can ..
* b544ef6 Allowing threads to be created running (not always suspended). Though creating..
* c3af92e Adding IREE_TRACE_ZONE_SET_COLOR macro.
* ed727e2 Plumbing tracy mutex support into iree_slim_mutex_t.
* 122d6b8 Adding benoit's MiniLcg pseudo-random number generator.
* 142bc6a Adding and/or/xor atomic operations.
* 9853806 Adding IREE_ASSERT macros.

COPYBARA_INTEGRATE_REVIEW=#4413 from KoolJBlack:main-to-google 594e06c
PiperOrigin-RevId: 350634605
ScottTodd added a commit that referenced this pull request Jan 7, 2021
* bb0f95e Enable all packages on all every OS.
* 7cf454d Add dependencies properly for python install targets.
* 827eccf Third attempt: Rename packages to not collide on 'compiler' term.
* a3145cb Second attempt: fix some target names and change the docker image.
* 763fc1b First attempt: enable all python packages as experimental on linux.
* 9364f0f Add install targets for all python packages and configure in CI.
* 6fe74ac Correctly get binary name in android run_binary_test (#4403)
* b1bc038 Remove special handling for runtime -> compiler dep (#4396)
* 38d3c14 Disable run_binary_test on Android (#4402)
* 35d4b32 Build an e2e path for linalg on tensors. (#4368)
* c0e362c Merge google -> main (#4401)
* 7aecc34 Merge branch 'main' into google-to-main
* 7dc756b Attempt to appease linter on SUBMODULE_VERSIONS for mlir-emitc
* c83f594 Use backward buffer allocation in HLOToLinalgOnBuffers (#4318)
* 4889612 Avoid running slow benchmarks as part of testing (#4364)
* 9b72435 Default to quoting strings in Bazel -> CMake (#4394)
* 2a52c0f Fix m1 builds (#4361)
* 30f67df Update cross-compilation for changed experimental flag names (#4365)
* dc7d633 Merge pull request #4386 from google/benvanik-hal-pre
* 3d577af Move macos out of experimental now that it builds.
* 1c2a4bf Note that iree_task_list_discard leaves the list in a usable state.
* dcd1b53 Adding utils for common string view and allocator operations.
* d2af7f3 Adding iree_atomic_thread_fence (like (std::)atomic_thread_fence).
* c691e23 Bazel -> CMake cleanup (#4362)
* e002f99 Attempt to pin the python executable more robustly for macos.
* eb184f9 Link Foundation and Metal frameworks on macos.
* cc8c1b2 Turn -Wunused-variable back on (#4360)
* 52ebf7b Use existing script in submodule synchronize action (#4358)
* 0f0fffd Get remote name in a more portable way in gh scripting (#4357)
* 4868a49 Add one-shot runtime MacOS sanity check workflow.
* 44ca211 Actually use the platlib install command for linux wheels.
* fd36682 [spirv] Replace SPIRVOpLowering with a local class (#4383)
* cf10473 Fix macos matrix spec.
* 197f33b Enable windows build as non experimental.
* 05190e1 Make pyiree compiler package compatible with manylinux2014.
* 626d45a Add missing dep on HLOToLinalg (#4377)
* b0e8243 Integrate MLIR-EmitC at iml130/mlir-emitc@a438d3b (#4375)
* f0514e4 NFC: Fix some pre-existing yaml lint.
* bb1de96 Plumb package suffix, version, and revision info to release packages.
* 995d0b7 Moved iree-check-module-main.cc to iree/tools (#4312)
* 56e40ac Remove suspected merge conflict in darwin_threading.c.
* 938875f Enable macos and windows builds.
* 921b46d Rename cmake_configure_ci.py -> cmake_ci.py.
* 57435cd Fix typo build_iree -> iree_build.
* fd1d06c Fix typo in install-iree -> iree-install.
* 2ab4dfc Update workflow dispatch token.
* 29f1596 Re-enable tag fetching
* f8f4031 Fix issues in snapshot schedule.
* bd6cf1f Add scheduled workflow to trigger snapshot releases.
* 442b35e Fix typo in runtime matrix check.
* b4981b2 Configure pipeline to build IREE runtime wheels.
* 77a63cd Make the main python packages cmake installable.
* 4e1602a Add cmake_configure_ci.py.
* 723ff37 Remove typo from GCC iree_atomic_load_auto macro.
* 847ac69 Disable workflow on push to cidev
* e666fbf Fixing the casting behavior of atomic compare exchange on windows.
* 25c4cb3 Adding merge_from support for IntrusiveList unique_ptr/ref_ptr.
* 334d3e2 Update getting_started_linux_cmake.md (#4367)
* c9687d4 Update bazel_to_cmake to support testonly for iree_bytecode_module (#4337)
* 0657be2 Fix mlir-hlo path in Submodule update scripting (#4356)
* d146a3d Add scripting to update mlir-hlo to match LLVM commit (#4348)
* 3010d3c Clean up naming in LLVM sync script (#4346)
* af6c2d4 Merge pull request #4227 from google/benvanik-tasks-core
* 01600a5 Adding an entire RTOS-scale task scheduling system.
* b47e6f0 Clarifying note on iree_wait_set_erase.
* a60332c Tweaking thread affinity groups to have an SMT flag. This allows us to keep th..
* c5b440d Adding tracing to thread name setters. Turns out, setting the thread name can ..
* b544ef6 Allowing threads to be created running (not always suspended). Though creating..
* c3af92e Adding IREE_TRACE_ZONE_SET_COLOR macro.
* ed727e2 Plumbing tracy mutex support into iree_slim_mutex_t.
* 122d6b8 Adding benoit's MiniLcg pseudo-random number generator.
* 142bc6a Adding and/or/xor atomic operations.
* 9853806 Adding IREE_ASSERT macros.

COPYBARA_INTEGRATE_REVIEW=#4413 from KoolJBlack:main-to-google 594e06c
PiperOrigin-RevId: 350634605
GMNGeoffrey added a commit to GMNGeoffrey/iree that referenced this pull request Jan 11, 2021
…#4358)"

Unfortunately `gh` will not update an existing PR as written, and in
fact there's no way to do so (cli/cli#1349).

That means the description of iree-org#4424
is wrong. Until that's fixed we need to use a separate mechanism for
creating the PR in the action. We can potentially do something clever to
increase code reuse, but for now, I'm reverting my change.

This reverts commit 52ebf7b.
GMNGeoffrey added a commit that referenced this pull request Jan 11, 2021
Unfortunately `gh` will not update an existing PR as written, and in
fact there's no way to do so (cli/cli#1349).

That means the description of #4424
is wrong. Until that's fixed we need to use a separate mechanism for
creating the PR in the action. We can potentially do something clever to
increase code reuse, but for now, I'm reverting my change.

This reverts commit 52ebf7b.
This was referenced Jan 11, 2021
@GMNGeoffrey GMNGeoffrey added the infrastructure Relating to build systems, CI, or testing label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Relating to build systems, CI, or testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants