Commit graph

20 commits

Author SHA1 Message Date
Jiahao XU
9c7da6a179
Return a list of files written to disk in binstalk_downloader::download::Download::and_extract (#856)
to avoid collecting extracted files from disk again in resolution stage.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-03 23:31:27 +11:00
Jiahao XU
c8b92b1985
Speedup CI (#842)
- Remove `tools: cross` input to `actions/just-setup`
    since we use `cargo-zigbuild` for cross compiling instead of `cross-rs`
    now.
 - Only install `cargo-zigbuild` in `just ci-install-deps` if `JUST_USE_CARGO_ZIGBUILD` is enabled
 - Include hash of `rustc -vV` in `build-cache`
    Switching between different versions of `rustc` will cause all crates to be
    rebuilt using new `rustc`.
 - Replace input `cache` with `index-cache` and `build-cache` in `actions/just-setup`
    for better control of caching behavior
 -  Reuse workflow `test`'s `build-cache` in workflow `lint`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-02 13:09:25 +11:00
Jiahao XU
af6dc61f3d
Disable --icf=safe on MacOS (#839)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-01 03:32:40 +13:00
Jiahao XU
2bf70b6a01
Run e2e test for release build and fix it by switching back to stable (#818)
* Run e2e-tests for release build
* Print `RUSTFLAGS` for justfile target build & check
* Fix CI: Disable miropt level 4
* Fix CI: Disable -Zbuild-std
* Disable `-Zgcc-ld=lld` and `-Zshare-generics` so that we can switch back to stable

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-28 11:53:57 +00:00
Jiahao XU
3f0107696b
Enable cross-lang-fat-lto on Linux (#817)
Fixed #806

 - Add new feature flag `cross-lang-fat-lto` and enable it on release for linux
 - Enable `-C linker-plugin-lto` for linux
 - Only use `-Z gcc-ld=lld` on non-windows targets when `cargo-zigbuild` is not enabled

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-19 15:19:35 +11:00
Jiahao XU
e76a4dff62
Improve CI: All in cargo-zigbuild for linux targets (#816) 2023-02-18 13:41:17 +11:00
Jiahao XU
9923788f07
Fix CI: Only turn on feature pkg-config on linux and fix cross compilation (#815)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-18 00:07:24 +13:00
Jiahao XU
61c992612c
Switch to cargo-zigbuild for aarch64-unknown-linux-gnu and x86_64-unknown-linux-musl (#814)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-17 09:36:45 +13:00
Jiahao XU
a8b9ae6fda
Enable -Z share-generics to reduce compilation time (#807)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-16 14:47:37 +13:00
Jiahao XU
45ce841342
Adjust feature flags enabled on CI (#809)
Enable feature `pkg-config` and `log_release_max_level_debug` for debug
build and enable feature `static`, `trust-dns` and
`log_release_max_level_debug` for release build.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-16 11:57:58 +13:00
Jiahao XU
9c6ab5991e
Enable icf=safe & use rust-lld for targets other than win (#805)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 20:24:17 +13:00
Jiahao XU
9874dca454
Fix bin names in .crates.toml on win (#802)
`bins::BinFile::new` does not include `binary_ext` in the
`BinFile::base_name`.

Also add regression e2e-test.

Fixed #801

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 17:24:50 +13:00
Jiahao XU
647f02bb59
Use cargo-zigbuild for cross compilation (#767)
* Disable link arg `-lgcc` for musl builds when `cargo-zigbuild` is used

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-15 11:19:59 +13:00
Jiahao XU
5c02581569
Disable backtrace support from miette in release/CI build (#744)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-03 20:38:10 +13:00
Jiahao XU
283163bbda
Enable feature zstd-thin by default (#741)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-24 23:48:12 +11:00
Jiahao XU
18cc651713
Enable mir-opt-level=4 for release (#718)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-17 21:57:18 +11:00
Jiahao XU
ab4da7f059
Fix self-update on windows (#712)
Fixed #702


* Add new dep windows v0.44.0 for windows only
* Add regression test for #702
* Impl `win::replace_file`
* Use `ReplaceFileW` on windows if `fs::rename` in `fs::atomic_install` fails
* Improve logging and err messages
* Add more regression tests
* Make `BinFile::install_link` atomic: Do not remove file if dst exists
* Fallback to `ReplaceFileW` in `fs::atomic_symlink_file`
* Refactor: Extract new fn `fs::persist`
* Use `fs::persist` instead of `TempFile::persist` in `fs::atomic_install`, which fallbacks to `ReplaceFileW` on windows

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-01-17 18:05:07 +11:00
Félix Saparelli
87854d8cc4
Recurse when packaging for mac (#696) 2023-01-12 16:11:43 +13:00
Félix Saparelli
4b2deb19b9
Try build-std with arm64 gnu (#667) 2023-01-09 12:35:00 +13:00
Félix Saparelli
aea9df602c
Migrate CI and builds to Just, add "full" builds (#660) 2023-01-08 16:27:36 +11:00