Skip to content

Commit 9148752

Browse files
committed
🧹 Attempt to make builds reproducible
It's actually very difficult to make Rust builds reproducible, but let's at least try before giving up. Ref: rust-lang/rust#129080 Ref: rust-lang/cargo#9506 Ref: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-trim-paths-option
1 parent 4d94771 commit 9148752

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

‎.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- master
1212

1313
env:
14-
RUSTFLAGS: -Dwarnings
14+
RUSTFLAGS: -Dwarnings --remap-path-prefix /home/runner=/home/redacted
1515

1616
jobs:
1717
check:

‎Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ members = [
55
]
66

77
[profile.release]
8-
lto = true
98
opt-level = "s"
9+
strip = "symbols"
10+
lto = true
11+
panic = "abort"
12+
incremental = false
13+
codegen-units = 1

‎pgpvis-core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ wasm-bindgen = "0.2.100"
1818

1919
[dev-dependencies]
2020
insta = { version = "1.42.2", features = ["yaml"] }
21+
22+
[package.metadata.wasm-pack.profile.release]
23+
wasm-opt = ["-O"]

‎scripts/dist.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ echo "SOURCE_DATE_EPOCH: $SOURCE_DATE_EPOCH ($source_date_iso)"
1616
version="$($script_dir/version.sh)"
1717
dist_name="pgpvis-$version"
1818
echo "Building $dist_name"
19+
20+
echo "============================================================"
21+
echo "Rust toolchain:"
22+
rustup show -v
1923
echo "============================================================"
2024

2125
mkdir -p "$dist_dir"

0 commit comments

Comments
 (0)