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

@@ -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|