Commit graph

1625 commits

Author SHA1 Message Date
Jiahao XU
0c5a65fb35
Refactor: Extract new crate binstalk-bins (#1294)
To reduce `binstalk` codegen and enable reuse of it.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-15 21:48:42 +00:00
Jiahao XU
76c72469eb
Refactor: Extract new crate binstalk-fetchers (#1291)
To reduce `binstalk` codegen and enable better reuse.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-14 03:20:34 +00:00
Jiahao XU
623f7ff4ed
Refactor: Extract new crate binstalk-registry (#1289)
To speedup codegen of `binstalk` and enable it to be reused.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-13 07:16:53 +00:00
Jiahao XU
6c801a97ae
Fix panic in atomic-file-install (#1290)
Do not panic if path does not have a parent, instead return an error.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-13 07:14:46 +00:00
Jiahao XU
2375ba48b6
Refactor to reduce compilation time (#1284)
- Make `binstalk::bins` private.
 - Move mod `signal` into `crates/bin`
 - Make items in `crates/bin/src/lib.rs` private if possible to reduce
   its API generation time.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 14:25:41 +00:00
Jiahao XU
fbed317df5
feat: git::Repository cancellation support (#1288)
feat: `git::Repository` support cancellation.

To make sure users can cancel git operation via signal, e.g. when the
git operation fail or users no longer want to install.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 14:18:02 +00:00
Jiahao XU
ef99dd795f
Refactor: Extract mod fs as crate atomic-file-install (#1286)
Refactor: Extract mod `fs` as crate `atomic-install`

To speedup codegen of `binstalk` and also publish a new crate that could
be reused.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 13:24:26 +00:00
Jiahao XU
8ff13c1b36
Refactor: Extract cargo_toml_workspace as a new crate (#1287)
To reduce codegen time of `binstalk` and also enable others to reuse
this crate.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 12:05:10 +00:00
Jiahao XU
c57356e870
Refactor: Move mod git into binstalk-downloader (#1285)
To speedup codegen time for `binstalk`, also fixed the docs.rs build for
`binstalk-downloader`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 07:20:26 +00:00
github-actions[bot]
6a1d317fde
release: cargo-binstall v1.2.1 (#1282)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-11 06:44:15 +00:00
Jiahao XU
b05abd862e
dep: Upgrade transitive dependencies (#1281)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-11 06:39:09 +00:00
Jiahao XU
ba87a4af70
Speedup ci.yml: Set codegen-units to 4 (#1283)
Set `CARGO_PROFILE_RELEASE_CODEGEN_UNITS` to 4
since 1024 units are too many and our CI only have 2-3 cores.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-11 03:46:27 +00:00
github-actions[bot]
9e901c6b84
release: detect-targets v0.1.10 (#1280)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-11 02:22:13 +00:00
Jiahao XU
c4bb0fd77a
Include x86_64 & x86_64h in universal apple pre-built binary (#1279)
To makre sure it can run on pre-haswell Intel CPUs.

Fixed #1277

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-11 02:04:43 +00:00
Jiahao XU
a84844938d
Fix aarch64-apple-darwin fallback to x86_64h (#1278)
Run `arch -arch x86_64h /usr/bin/true` to decides whether fallback
is feasible.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-11 01:02:03 +00:00
github-actions[bot]
ea1a34b4a1
release: cargo-binstall v1.2.0 (#1275)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-10 11:33:39 +00:00
github-actions[bot]
cf3e3c25b0
release: binstalk v0.15.0 (#1274)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-10 07:54:29 +00:00
Jiahao XU
cf2a8a5287
dep: Bump tokio to v1.30.0 & disable feat parking_lot (#1273)
In tokio v1.30.0, MSRV is bumped to rust 1.63 and all `const_new`
methods in `tokio::sync` are now always available, so there is no need
to enable feat `parking_lot`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-10 07:17:40 +00:00
github-actions[bot]
070537076d
release: binstalk-downloader v0.7.0 (#1272)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-09 21:00:48 +00:00
Marcin Nowak-Liebiediew
42dddd972d
Add GitHub Action declaration for installing cargo-binstall (#1269)
add action.yml and test it
2023-08-09 20:50:16 +00:00
Jiahao XU
8e6dcc57ff
Fix release-pr.yml: Set RUSTFLAGS=--cfg reqwest_unstable (#1270)
for `binsalk-downloader` since its feature `http3` require this.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 20:14:34 +00:00
github-actions[bot]
000c87bcee
release: detect-targets v0.1.9 (#1268)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-09 11:02:53 +00:00
Jiahao XU
3e80b12748
feat: Verify cksum of crate tarball from cargo registry (#1260)
Fixed #1183

Since the crate tarball could be downloaded from a different set of
servers than where the cargo registry is hosted, verifying the checksum
is necessary to verify its integrity.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 10:57:47 +00:00
Jiahao XU
1c886d8897
Fix installation script on MacOS (#1263)
Fixed #1254

and also add CI for installation script and shellcheck.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 09:37:26 +00:00
Jiahao XU
7f1ddd1dd7
Reduce public interface of binstalk (#1265)
To reduce amount of breaking changes.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 07:46:12 +00:00
Jiahao XU
9c521d162a
Enable unstable feature reqwest/http3 in CI (#1261)
For dev and release build, so that pre-built binaries of
`cargo-binstall` can utilize http3 protocol.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 07:44:10 +00:00
Jiahao XU
a9e2ef11f1
Fix reading env CARGO_REGISTRIES_{registry_name}_INDEX (#1258)
Try bogth original and upper-case version.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 07:41:20 +00:00
github-actions[bot]
939c9b43b2
dep: Upgrade transitive dependencies (#1266)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-09 05:07:46 +00:00
Jiahao XU
ac012bdcb2
Remove dep futures-lite from binstalk-downloader (#1259)
I planned to replace `futures-util` with `futures-lite`, but it turns
out that `reqwest` actually depends on `futures-util`, so there is no
point removing it and introduce yet another dependency.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-08 10:48:12 +00:00
Jiahao XU
2fbcf188a7
Revert "Use rust-lld in CI" (#1257)
Revert "Use `rust-lld` in CI (#1253)"

This reverts commit 1e4e0d166d.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-08 10:45:40 +00:00
github-actions[bot]
87cfac4bdf
dep: Upgrade transitive dependencies (#1255)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-08 02:33:17 +00:00
Jiahao XU
1e4e0d166d
Use rust-lld in CI (#1253)
Which guarantees:
 - faster linking on all targets when `cargo-zigbuild` is not used
 - allow cross-lang-lto to be enabled

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-08 00:53:36 +00:00
Jiahao XU
435df675b3
Fix too many 429 response (#1231)
Fixed #1229

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-08 00:53:15 +00:00
Jiahao XU
e4c776f403
feat: Support data verification in Download (#1248)
By accepting `&mut dyn DataVerifier` for users to pass any callback that
uses `digest::Digest`/`digest::Mac`, `sigstore` or whatever they want.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-06 05:56:02 +00:00
Jiahao XU
3181e16e36
Fix CI: Require ziglang < 0.11 (#1250)
ziglang 0.11 causes link failure in our CI

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-06 04:53:47 +00:00
github-actions[bot]
c8d82fea0f
dep: Upgrade transitive dependencies (#1247)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-04 04:11:27 +00:00
Jiahao XU
812fb9b0af
Fix subcrate resolution for wasm-bindgen-cli (#1245)
Fixed #1244

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-03 21:14:36 +00:00
Jiahao XU
aeacebcf83
feat: Support passing workspace to --manifest-path (#1246)
Previously it will load the root `Cargo.toml` and treat it as the
manifest for the crate, now it will check its `package.name` and would
search for the workspace if the `package.name` does not match the crate
name.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-03 21:12:06 +00:00
dependabot[bot]
b4cf580e4f
build(deps): update gix requirement from 0.50.0 to 0.51.0 in /crates/binstalk (#1242)
build(deps): update gix requirement in /crates/binstalk

Updates the requirements on [gix](https://github.com/Byron/gitoxide) to permit the latest version.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-v0.50.0...gix-v0.51.0)

---
updated-dependencies:
- dependency-name: gix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-03 04:54:51 +00:00
NAKASHIMA, Makoto
6ed7ea8b52
install-from-binstall-release.sh: Fix unbound variable error (#1241)
fixes #1240
2023-08-02 13:40:32 +00:00
Asger Hautop Drewsen
7c2ddd9a0c
Don't show warning if $CARGO_HOME/bin is in $PATH (#1239) 2023-08-02 11:34:43 +00:00
Jiahao XU
855ca88477
ci: Build MacOS universal exe from x86_64h-apple-darwin (#1238)
instead of `x86_64-apple-darwin` for better optimization since any
machine that support universal support x86_64h.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-02 03:37:21 +00:00
Jiahao XU
8756e39537
CI: Add release build for x86_64h-apple-darwin (#1234)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-02 02:22:16 +00:00
github-actions[bot]
b70cb9be64
dep: Upgrade transitive dependencies (#1237)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-02 01:14:24 +00:00
Jiahao XU
d4e1f30e8f
Disable sha1-asm or zlib-ng on x86_64 linux (#1236)
Try to fix recent `Illegal instructions` happened in CI.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-01 11:33:57 +00:00
Jiahao XU
3a831a34c6
Bump dep target-lexicon to v0.12.11 (#1235)
To support new target x86h-apple-darwin

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-01 02:34:41 +00:00
Jiahao XU
d5549ce99e
detect-targets: Add fallback to x86_64-apple-darwin (#1233)
Fallback to `x86_64h-apple-darwin` if supported.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-07-28 07:59:23 +00:00
github-actions[bot]
333c1805e1
dep: Upgrade transitive dependencies (#1232)
Co-authored-by: github-actions <github-actions@github.com>
2023-07-28 06:05:56 +00:00
dependabot[bot]
ec494261c6
build(deps): update gix requirement from 0.49.1 to 0.50.0 in /crates/binstalk (#1230)
build(deps): update gix requirement in /crates/binstalk

Updates the requirements on [gix](https://github.com/Byron/gitoxide) to permit the latest version.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-v0.49.1...gix-v0.50.0)

---
updated-dependencies:
- dependency-name: gix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-24 07:13:55 +00:00
Jiahao XU
1293314100
feature: Add fallback x86_64h-apple-darwin and fallback for it (#1228)
Now `detect_targets` would fallback to `x86_64h-apple-darwin` on
`aarch64-apple-darwin`.

It also provides fallback to `x86_64h-apple-darwin` to
`x86_64-apple-darwin` and universal targets.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-07-23 04:28:59 +00:00