Skip to content

Commit

Permalink
Make the GN CI work
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Jan 22, 2024
1 parent a233153 commit a865830
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
14 changes: 7 additions & 7 deletions ffi/gn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ icu = { version = "1.0", path = "../../components/icu", default-features = false
icu_provider = { version = "1.0", path = "../../provider/core" }

# TODO: Determine the correct rustflags for memchr
[gn.package.memchr."2.5.0"]
[gn.package.memchr."2.6.3"]
rustflags = []

[gn.package.proc-macro2."1.0.63"]
[gn.package.proc-macro2."1.0.75"]
rustflags = ["--cfg=use_proc_macro", "--cfg=wrap_proc_macro", "--cfg=proc_macro_span"]

[gn.package.quote."1.0.26"]
rustflags = []
# [gn.package.quote."1.0.35"]
# rustflags = []

[gn.package.serde."1.0.160"]
rustflags = []

[gn.package.serde_derive."1.0.160"]
rustflags = []

[gn.package.libm."0.2.6"]
[gn.package.libm."0.2.7"]

# Build cargo-gnaw with the checked-in lockfile
# Build cargo-gnaw with its own dependency resolution
[workspace]
members = ["third_party_tools/fuchsia/tools/cargo-gnaw"]
exclude = ["third_party_tools/fuchsia/tools/cargo-gnaw"]
21 changes: 16 additions & 5 deletions tools/make/gn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ else
end
# Install GNaw locally in the bin directory (alongside GN)
# Since the parent directory is vendored, we have no choice but to vendor here, too
mkdir .cargo
writefile .cargo/config "source = { crates-io.replace-with = 'vendored-sources', vendored-sources.directory = 'vendor' }"
exec --fail-on-error cargo +stable vendor --manifest-path fuchsia/tools/cargo-gnaw/Cargo.toml
exec --fail-on-error cargo +stable install --path fuchsia/tools/cargo-gnaw --root . --offline
exec --fail-on-error cargo install --path fuchsia/tools/cargo-gnaw --root . --offline
# Ensure everything works
exec --fail-on-error ./bin/gn --version
Expand All @@ -64,6 +60,19 @@ exit_on_error true
cd ffi/gn
rm -rf vendor
rm -f .cargo/config
rm -f Cargo.lock
exec --fail-on-error cargo generate-lockfile
# These versions should match what is in icu_capi_gn Cargo.toml
exec --fail-on-error cargo update memchr --precise 2.6.3
exec --fail-on-error cargo update proc-macro2 --precise 1.0.75
exec --fail-on-error cargo update quote --precise 1.0.35
exec --fail-on-error cargo update serde --precise 1.0.160
exec --fail-on-error cargo update serde_derive --precise 1.0.160
exec --fail-on-error cargo update libm --precise 0.2.7
output = exec --fail-on-error cargo vendor
output_trimmed = trim_start ${output.stdout} # Needed since there are whitespace differences between cargo versions
# Probably can be removed when we update our CI stable
Expand Down Expand Up @@ -115,6 +124,7 @@ description = "Build the GN version of ICU4X for the host platform"
category = "ICU4X Development"
dependencies = [
"gn-vendor",
"gn-gen",
"install-nightly",
]
script_runner = "@duckscript"
Expand All @@ -135,6 +145,7 @@ description = "Build the GN version of ICU4X for wasm32-wasi"
category = "ICU4X Development"
dependencies = [
"gn-vendor",
"gn-gen",
"install-nightly",
]
script_runner = "@duckscript"
Expand Down

0 comments on commit a865830

Please sign in to comment.