Commit graph

1833 commits

Author SHA1 Message Date
github-actions[bot]
ff7867a6a6
release: detect-targets v0.1.8 (#1174)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-06-26 10:23:31 +00:00
github-actions[bot]
c917f94f28
release: normalize-path v0.2.1 (#1173)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-06-26 08:22:39 +00:00
github-actions[bot]
88c7df6ea0
release: leon v2.0.1 (#1172)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-06-26 05:10:30 +00:00
github-actions[bot]
887f7593d3
dep: Upgrade transitive dependencies (#1171)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-26 03:33:28 +00:00
Jiahao XU
2f890cc344
ci: Check package publish in release-pr.yml (#1170)
before creating the release PR.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-26 01:42:35 +00:00
github-actions[bot]
cd0939dcf5
dep: Upgrade transitive dependencies (#1169)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-25 14:01:09 +00:00
Jiahao XU
4ddd860c01
ci: Verify before publishing (#1167)
Run `cargo-publish` without `--no-verify` to verify the publish is valid
and does not depend on unpublished crates in job tag of workflow
`release.yml`, which could be caused by incorrect merge order.

Also enabled `check-semver` to `cargo-bins/release-pr@v2` and install
`cargo-semver-checks` using `taiki-e/install-action@v2` in
job make-release-pr of workflow `release-pr.yml`, since
`release-pr` would try to use `cargo-binstall` for installing
`cargo-semver-checks` used in `check-semver`, but we did not explicitly
require `taiki-e/install-actions@v2` to install `cargo-binstall`, so
`release-pr` could fallback to `cargo-install` which is just too slow.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-24 15:23:15 +00:00
Jiahao XU
ca00cbaccc
feat: Support install directly from git repo (#1162)
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-24 01:01:31 +00:00
dependabot[bot]
dd35fba232
build(deps): update itertools requirement from 0.10.5 to 0.11.0 in /crates/binstalk (#1163)
build(deps): update itertools requirement in /crates/binstalk

Updates the requirements on [itertools](https://github.com/rust-itertools/itertools) to permit the latest version.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

---
updated-dependencies:
- dependency-name: itertools
  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-06-23 04:24:08 +00:00
github-actions[bot]
12c1160a41
dep: Upgrade transitive dependencies (#1164)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-23 04:24:06 +00:00
Jiahao XU
138112cd6e
Optimize TargetTriple: Use Cow<'static, str> (#1161)
instead of `CompactString` since `target_lexicon::{OperatingSystem,
Architecture, Environment}::into_str()` will return a `&'static str`
most of the time.

Also updated `SUPPORT.md`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-21 10:05:19 +00:00
Jiahao XU
abecd9ae14
ci: Publish to crates.io in release.yml after tagging (#1152)
Fixed #1046

so that we don't have to manually run `cargo-publish` after the CI is
merged.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-21 10:04:09 +00:00
Jiahao XU
d8419ea5a2
feat: Add more variables for template (#1160)
Fixed #775

 - Add dep target-lexicon v0.12.7
 - Add `target-{family, arch, libc, vendor}` to
   `package.metadata.binstall`.

For `{universal, universal2}-apple-darwin`, the `target-arch` is set to
`universal`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-20 22:05:13 +00:00
Jiahao XU
181b5293e7
dep: Bump strum v0.24.1 => v0.25.0 (#1159)
Also bump strum_macros v0.24.3 => v0.25.0

[strum and strum_macros v0.25.0 changelog][1]

[1]: https://github.com/Peternator7/strum/blob/master/CHANGELOG.md

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-20 00:16:10 +00:00
Jiahao XU
40efe02e34
fix leon & binstalk-downloader bug relating to features (#1153)
- ci: Check feat powerset of leon & binstalk-downloader in `ci.yml`
 - fix leon feature `cli`: Enable dep `miette` in feature `cli`
 - fix binstalk-downloader when default feature is disabled and no other
   tls related feature is enabled (breaking change due to replace of
   `tls::Version` with newtype `TLSVersion`).

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-19 02:22:09 +00:00
Jiahao XU
5c4a542de5
Remove unused .cargo/config (#1151)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-17 13:58:14 +00:00
Félix Saparelli
bea66d04b5
Fix PR CI triggers (#1150)
- Remove trigger on "auto merge" enablement, which is just annoying now with the merge queue and was only ever an additional workaround for the release PRs.
- Always run the PR CIs, don't ignore markdown files. That made it impossible to merge PRs that only touched those files (without bypassing requirements).
2023-06-17 10:17:24 +00:00
Félix Saparelli
a255e74fc9
Show license and source in long help (#1149)
* Show license and source in long help

Ref https://github.com/oeb25/binswap/issues/2

* Typo
2023-06-17 10:16:25 +00:00
Jiahao XU
1369eea802
fix dependabot path to crates (#1148)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-17 09:22:09 +00:00
Jiahao XU
cd7431e195
Add rust-toolchain.toml (#1147)
to fix dependabot

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-17 05:51:56 +00:00
github-actions[bot]
a08703874d
dep: Upgrade transitive dependencies (#1146)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-16 03:46:16 +00:00
Jiahao XU
d390d320e9
Set upgrade-transitive-deps.yml to run on every Fri (#1145)
To avoid unnecessary PRs.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-12 01:23:12 +00:00
github-actions[bot]
fba862a4e8
dep: Upgrade transitive dependencies (#1144)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-11 04:08:37 +00:00
github-actions[bot]
879f400d2c
dep: Upgrade transitive dependencies (#1143)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-10 08:08:03 +00:00
github-actions[bot]
ce06c70d4c
dep: Upgrade transitive dependencies (#1142)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-09 03:41:09 +00:00
github-actions[bot]
4e3b460a46
dep: Upgrade transitive dependencies (#1140)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-07 04:28:25 +00:00
Jiahao XU
6b5384608e
GhApiClient misc improvements (#1139)
- Increase `DEFAULT_RETRY_DURATION` to 5 minutes, since GitHub enforces
   rate limit on an hourly basis.
 - Refactor `check_for_status` & `fetch_release_artifacts_restful_api`
 - Optimize `percent_decode_http_url_path`: Avoid `percent_decode_str`
   if there is no `%` in the `input`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-07 01:02:29 +00:00
Jiahao XU
16be14a07d
dependabot: Only create PR for incompatible updates (#1138)
for direct dependencies since compatible updates is already
covered by `update-transitive-deps.yml`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-06 11:46:47 +00:00
github-actions[bot]
1d754ef5b5
dep: Upgrade transitive dependencies (#1137)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-06 05:31:32 +00:00
Jiahao XU
e62049d59d
ci: Fix cache-cleanup.yml non-zero exit status (#1136)
ci: Fix `cache-cleanup.yml` `cut` non-zero exit status

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-06 04:09:05 +00:00
dependabot[bot]
abf5a8e842
build(deps): bump file-format from 0.16.0 to 0.17.0 (#1135)
Bumps [file-format](https://github.com/mmalecot/file-format) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/mmalecot/file-format/releases)
- [Changelog](https://github.com/mmalecot/file-format/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mmalecot/file-format/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: file-format
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 02:47:25 +00:00
Jiahao XU
76cd4d62c2
dep: Add new workflow upgrade-transitive-deps.yml (#1130)
for upgrading transitive dependencies.

While dependabot is great, it opens one PR for each of these transitive
dependencies, which makes merging harder:
 - have to approve every PR
 - have to click merge when ci is done

it also creates merge queue runs and commits to main, thus creates a lot
of unused caches and unnecessary CI runs.

This PR creates `upgrade-transitive-deps.yml` that creates one PR for
all transitive change per-day.

It also configures dependabot to only `increase-if-necessary`, same as
library crates.

Since we have several library crates in our workspace, this would mean
that we would have less unnecessary deps bump on these library crates.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-05 14:09:42 +00:00
Jiahao XU
cc87fe062d
ci: Rm merge queue cache in cache-cleanup.yml (#1129)
since they cannot be reused

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-05 12:54:01 +00:00
dependabot[bot]
3cf2528273
build(deps): bump windows-sys from 0.42.0 to 0.48.0 (#1125)
Bumps [windows-sys](https://github.com/microsoft/windows-rs) from 0.42.0 to 0.48.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.42.0...0.48.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 04:06:58 +00:00
dependabot[bot]
34e02d9f0f
build(deps): bump libc from 0.2.144 to 0.2.145 (#1128)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.144 to 0.2.145.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.144...0.2.145)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 04:06:49 +00:00
dependabot[bot]
bf46862140
build(deps): bump once_cell from 1.17.2 to 1.18.0 (#1127)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.17.2 to 1.18.0.
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.17.2...v1.18.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 02:29:41 +00:00
Zanie Adkins
f0a62754ad
Use uname -s for install script compatibility with outdated macOS GNU utils (#1123) 2023-06-04 19:32:41 +00:00
Jiahao XU
22b3419fce
feat: Add GraphQL support to GhApiClient (#1124)
Fixed #868

 - Add new fn `remote::Client::post`
 - Add new fn `remote::RequestBuilder::body`
 - Re-export `reqwest::Body` in `remote`
 - Add dep percent-encoding v2.2.0 to binstalk-downloader
 - Add dep serde-tuple-vec-map v1.0.1 to binstalk-downloader
 - Add GraphQL to `GhApiClient`, fallback to Restful API if token is not
   provided or authorization failed.
 - Fixed `GhReleaseArtifact::try_extract_artifact_from_str`: decode
   percent encoded http url path and add regression tests
 - Added variant `GhApiError::Context` & `GhApiContextError`
 - Added variant `GhApiError::GraphQLErrors` & `GhGraphQLErrors`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-04 14:09:49 +00:00
Jiahao XU
e87e3534a8
detect-targets: Add fallback to windows (#650)
Fixed #642

* Add new dep windows-sys v0.42.0 for win only
* Add new dep windows-dll v0.4.1 for win only
* Add x86_64 fallback targets for windows
* Add x86 fallback targets for windows
* Add arm32 fallback targets for windows
* Add arm64 fallback targets for windows
* Add gnu/gnu-llvm fallback targets for windows

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-04 03:58:05 +00:00
Jiahao XU
2acba14b41
GhApiClient: Fallback to unauthorized mode if auth token is invalid (#1121)
Fixed #850

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-04 02:29:42 +00:00
Jiahao XU
351b9d074a
dep: Update base64 and clap (#1120)
- base64 v0.21.0 -> v0.21.2, rollback msrv to 1.57
 - clap v4.3.0 -> v4.3.1, (derive) Reduce the amount of generated code
 - clap_builder v4.3.0 -> v4.3.1
 - clap_derive v4.3.0 -> v4.3.1

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-03 10:42:00 +00:00
Jiahao XU
1432093dcc
feat: Add new cmdline option --no-track (#1111)
Same as `cargo-install`'s `--no-track`.
It is also passed to `cargo-install` if it is invoked.

Also fixed `fs::atomic_symlink_file` which on Windows could fallback to
non-atomic install if symlinking failed.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-03 09:15:18 +00:00
Aadi Desai
a849db3ef4
Add one-liner for installing cargo-binstall on Windows (#1099)
* Add one-liner for installing `cargo-binstall` on Windows

* Change command separator to semicolon

`&&` was added in Powershell 7

* Update win install script to exit on error and trace
2023-06-03 09:15:11 +00:00
Jiahao XU
b876bdc8c7
e2e-tests: Check version of installed crates (#1119)
and also test `fetch_crate_cratesio_version_matched` in
`e2e-tests/live.sh`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-03 08:28:44 +00:00
dependabot[bot]
f1bfe23672
Bump cargo_toml from 0.15.2 to 0.15.3 (#1116)
Bumps [cargo_toml](https://gitlab.com/crates.rs/cargo_toml) from 0.15.2 to 0.15.3.
- [Commits](https://gitlab.com/crates.rs/cargo_toml/compare/v0.15.2...v0.15.3)

---
updated-dependencies:
- dependency-name: cargo_toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 04:40:31 +00:00
dependabot[bot]
d9a2dd0177
Bump openssl from 0.10.53 to 0.10.54 (#1117)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.53 to 0.10.54.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.53...openssl-v0.10.54)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 04:35:28 +00:00
Jiahao XU
b69c082160
ci: Switch to Swatinem/rust-cache@v2 (#1113)
Fixed #1038

sccache is not very effective at caching dependencies, the external
C/C++ is recompiled in every ci and it takes a lot of time.

Compilation of other Rust dependencies also takes quite some time and
sccache is not helping at all, so I decided to switch to
`Swatinem/rust-cache@v2`.

The downside of the new caching method is that a new cache conntaining
part of the `.cargo/` and `target/` will be created whenver
`Cargo.lock`/`Cargo.toml` changes, but it can still reuse the old cache
to create new caching.

This is acceptable given that `sccache` often fails to reuse
cache due to rate limiting from GHA, since it is not designed for use
like a s3 object pool, and `sccache` will create a lot of new cache
artifacts for a given branch that cannot be reused in main and would
have to cleanup via a cronjob.

Edit:

rust 1.70 uses llvm 16.0, however ubuntu-latest still uses llvm 15.0
As such, during release-build, cross-lang-lto failed due to llvm is too
old.

Temporarily disable linker-plugin-lto to fix this.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-02 04:03:29 +00:00
Jiahao XU
9ecfce4104
Fallback to pull_request num or commit sha if github.ref is not available (#1115)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-02 09:25:24 +12:00
Jiahao XU
db6f3d2bfd
ci: Disable lto for ci.yml job release-builds (#1114)
LTO takes way too long and it is mature enough that it usually does not
have any miscompilation.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-01 09:48:00 +00:00
dependabot[bot]
92fdefbc9e
Bump fs4 from 0.6.4 to 0.6.5 (#1112)
Bumps [fs4](https://github.com/al8n/fs4-rs) from 0.6.4 to 0.6.5.
- [Commits](https://github.com/al8n/fs4-rs/commits)

---
updated-dependencies:
- dependency-name: fs4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 04:02:01 +00:00