Edit => 1.2.0; Adjust Rust buildsystem; Synchronize input ordering on workflows. — edit (#12313)

* edit => 1.2.0

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Set progress bar width for rust builds.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Reorder inputs for workflows so they are in the same order on different workflows.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* edit: Build Run on linux/386.

* edit: Package File Update Run on linux/386 container.

* Fix PR Number detection for a branch name that has been used before.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: satmandu <satmandu@users.noreply.github.com>
Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
This commit is contained in:
chromebrew-actions[bot]
2025-07-31 17:09:43 -05:00
committed by GitHub
parent 8980226ae0
commit a6287ee111
3 changed files with 28 additions and 22 deletions

View File

@@ -9,9 +9,6 @@ on:
required: false
type: boolean
default: 'false'
branch:
description: "Branch of chromebrew/chromebrew to run on, if different from this branch."
required: false
pr_title:
description: "Title of PR"
required: false
@@ -20,6 +17,9 @@ on:
required: false
type: boolean
default: 'true'
branch:
description: "Branch of chromebrew/chromebrew to run on, if different from this branch."
required: false
env:
BRANCH: ${{ inputs.branch || github.ref_name }}
permissions:
@@ -399,7 +399,7 @@ jobs:
echo -e "&& yes | crew upgrade\n\`\`\`" >> /tmp/pr.txt
cat /tmp/pr.txt
[[ $DRAFT_PR == 'true' ]] && export PR_DRAFT_FLAG='-d'
PR_NUMBER=$(gh pr list -L 1 -s all -H${{ inputs.branch || github.ref_name }}| cut -f1)
PR_NUMBER=$(gh pr list -L 1 -s open -H ${{ inputs.branch || github.ref_name }} | cut -f1)
echo "PR title is: $(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}"
if [[ -z ${PR_NUMBER} ]]; then
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)

View File

@@ -1,3 +1,4 @@
require 'io/console'
require_relative '../package'
require_relative '../require_gem'
require_relative '../report_buildsystem_methods'
@@ -6,16 +7,20 @@ class RUST < Package
property :rust_channel, :rust_flags, :rust_features, :rust_install_path, :rust_options, :rust_packages, :rust_release_profile, :rust_targets, :pre_rust_options, :rust_build_extras, :rust_install_extras
def self.build
# From lib/progress_bar.rb ...
_, @terminal_w = !IO.console&.console_mode || IO.console&.winsize == [0, 0] ? [25, 80] : IO.console&.winsize
@rustflags = "#{ENV.fetch('RUSTFLAGS', nil)} #{@rust_flags}"
rust_env =
{
CARGO_TERM_COLOR: 'always',
CARGO_TERM_PROGRESS_WHEN: 'always',
LD: 'mold',
LIBRARY_PATH: CREW_LIB_PREFIX,
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil),
RUSTFLAGS: @rustflags
}.transform_keys(&:to_s)
CARGO_TERM_COLOR: 'always',
CARGO_TERM_PROGRESS_WHEN: 'always',
CARGO_TERM_PROGRESS_WIDTH: @terminal_w.to_s,
LD: 'mold',
LIBRARY_PATH: CREW_LIB_PREFIX,
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil),
RUSTFLAGS: @rustflags
}.transform_keys(&:to_s)
@channel_flag = @rust_channel.to_s.empty? ? '' : "+#{@rust_channel}"
@features = @rust_features.to_s.empty? ? '' : "--features #{@rust_features}"
@@ -43,12 +48,13 @@ class RUST < Package
def self.install
rust_env =
{
CARGO_TERM_COLOR: 'always',
CARGO_TERM_PROGRESS_WHEN: 'always',
LD: 'mold',
LIBRARY_PATH: CREW_LIB_PREFIX,
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil),
RUSTFLAGS: @rustflags
CARGO_TERM_COLOR: 'always',
CARGO_TERM_PROGRESS_WHEN: 'always',
CARGO_TERM_PROGRESS_WIDTH: @terminal_w.to_s,
LD: 'mold',
LIBRARY_PATH: CREW_LIB_PREFIX,
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil),
RUSTFLAGS: @rustflags
}.transform_keys(&:to_s)
@rust_install_path.split.each do |path|

View File

@@ -3,7 +3,7 @@ require 'buildsystems/rust'
class Edit < RUST
description 'A simple editor for simple needs.'
homepage 'https://github.com/microsoft/edit'
version '1.1.0'
version '1.2.0'
license 'MIT'
compatibility 'all'
source_url 'https://github.com/microsoft/edit.git'
@@ -11,10 +11,10 @@ class Edit < RUST
binary_compression 'tar.zst'
binary_sha256({
aarch64: '14e24a53daeefb85850b8ba4a8ab67c59b0da24bcfb7266f43f70f1d8c28cd00',
armv7l: '14e24a53daeefb85850b8ba4a8ab67c59b0da24bcfb7266f43f70f1d8c28cd00',
i686: '6a6dd916d54e402428f064a4e1dd8c33150ab9db68737690f8e9730138d9569c',
x86_64: '25c47a29e12df6ff098c085d31f877724ee686f58bef55f83a511ec307e5a188'
aarch64: '771cae3efe1afa52aef44c5f30a30ddc9420e9d22a3480bb1ae22dbb1a181191',
armv7l: '771cae3efe1afa52aef44c5f30a30ddc9420e9d22a3480bb1ae22dbb1a181191',
i686: '560f03e9dfe5a2ae2e10c677ca99ca34282d12b7c9035595afb946e9ad1b9465',
x86_64: 'b64eceb2e051b9621b4c61caa6c5221c70e948d6e7d6a3f01138ed1f2bac3b32'
})
depends_on 'gcc_lib' # R