Commit graph

1374 commits

Author SHA1 Message Date
David Weis
0de3b21004
Fix download link for armv7 release in readme (#980
Fix download link for armv7 in readme
2023-04-06 12:31:28 +12:00
dependabot[bot]
6c01968ce9
Bump mimalloc from 0.1.35 to 0.1.36 (#979)
Bumps [mimalloc](https://github.com/purpleprotocol/mimalloc_rust) from 0.1.35 to 0.1.36.
- [Release notes](https://github.com/purpleprotocol/mimalloc_rust/releases)
- [Commits](https://github.com/purpleprotocol/mimalloc_rust/compare/v0.1.35...v0.1.36)

---
updated-dependencies:
- dependency-name: mimalloc
  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-04-05 13:04:01 +10:00
Jiahao XU
f384088fd1
Avoid checking dev-deps for jobs *-check and lint in workflow ci.yml (#978)
Avoid checking dev-deps for jobs `*-check` and lint in workflow `ci.yml`

We just want to make sure cargo-binstall can compile for the target, we
don't want to pull in the extra dependencies.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-04-04 01:51:13 +10:00
Jiahao XU
8dd7aa5688
Speedup ci.yml: Do not run tests on x86_64-unknown-linux-musl (#976)
Speedup ci.yml: Do not run tests on x86_64-unknown-linux-musl

Since we already run test on x86_64-unknown-linux-musl in
release-build.yml and x86_64-unknown-linux-musl is almost identical to
x86_64-unknown-linux-gnu except for the libc, there's no need to run the
tests in ci.yml

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-04-04 01:40:26 +10:00
Jiahao XU
24634b2de1
Speedup workflow lipo in release-build.yml (#975)
Speedup workflow lipo in release-build

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-04-04 01:40:13 +10:00
Jiahao XU
6a224da9ee
Run unit tests in release-build.yml (#977)
Since release build enables a lot of optimization, disable debug assert
and possibly change the code to be run, it's better to run the tests
again.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-04-04 01:40:01 +10:00
dependabot[bot]
363dbc650a
Bump miette from 5.6.0 to 5.7.0 (#973) 2023-04-03 03:06:19 +00:00
dependabot[bot]
d7441e4675
Bump windows from 0.47.0 to 0.48.0 (#974) 2023-04-03 02:49:53 +00:00
dependabot[bot]
b3abfab7fd
Bump mimalloc from 0.1.34 to 0.1.35 (#972) 2023-04-03 02:39:33 +00:00
dependabot[bot]
885da90e38
Bump futures-util from 0.3.27 to 0.3.28 (#968) 2023-03-31 02:24:28 +00:00
dependabot[bot]
10e350af8d
Bump windows from 0.46.0 to 0.47.0 (#964) 2023-03-30 03:29:23 +00:00
dependabot[bot]
6bdfa0ee3c
Bump clap from 4.2.0 to 4.2.1 (#966) 2023-03-30 03:21:21 +00:00
dependabot[bot]
f46b0eab18
Bump tempfile from 3.4.0 to 3.5.0 (#967) 2023-03-30 02:49:38 +00:00
dependabot[bot]
9a33ec7bd5
Bump embed-resource from 2.0.0 to 2.1.1 (#965) 2023-03-30 02:38:11 +00:00
dependabot[bot]
b645cc6286
Bump serde from 1.0.158 to 1.0.159 (#959) 2023-03-29 23:12:31 +11:00
dependabot[bot]
877606ef40
Bump file-format from 0.15.0 to 0.16.0 (#960) 2023-03-29 23:11:34 +11:00
dependabot[bot]
57cb1f94ec
Bump clap from 4.1.14 to 4.2.0 (#961) 2023-03-29 23:10:55 +11:00
Jiahao XU
3a29ecaa36
Support GitHub fine-grained personal access token (#957)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-28 20:20:11 +11:00
dependabot[bot]
0fa729d742
Bump generic-array from 0.14.6 to 0.14.7 (#954)
Bumps [generic-array](https://github.com/fizyk20/generic-array) from 0.14.6 to 0.14.7.
- [Release notes](https://github.com/fizyk20/generic-array/releases)
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fizyk20/generic-array/commits)

---
updated-dependencies:
- dependency-name: generic-array
  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-03-28 16:59:24 +11:00
dependabot[bot]
8109289e81
Bump clap from 4.1.11 to 4.1.14 (#952) 2023-03-28 05:58:21 +00:00
dependabot[bot]
96482c9dab
Bump tokio from 1.26.0 to 1.27.0 (#953)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.26.0...tokio-1.27.0)

---
updated-dependencies:
- dependency-name: tokio
  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-03-28 16:45:36 +11:00
dependabot[bot]
24c39c1af5
Bump serde_json from 1.0.94 to 1.0.95 (#955)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.94 to 1.0.95.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.94...v1.0.95)

---
updated-dependencies:
- dependency-name: serde_json
  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-03-28 16:44:51 +11:00
dependabot[bot]
7ee1489d9c
Bump reqwest from 0.11.15 to 0.11.16 (#956)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.15 to 0.11.16.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.15...v0.11.16)

---
updated-dependencies:
- dependency-name: reqwest
  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-03-28 16:44:27 +11:00
dependabot[bot]
875747f7ef
Bump async_zip from 0.0.12 to 0.0.13 (#949)
* Bump async_zip from 0.0.12 to 0.0.13

Bumps [async_zip](https://github.com/Majored/rs-async-zip) from 0.0.12 to 0.0.13.
- [Release notes](https://github.com/Majored/rs-async-zip/releases)
- [Commits](https://github.com/Majored/rs-async-zip/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Fix compilation

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

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>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-27 14:44:03 +11:00
dependabot[bot]
4af092f848
Bump embed-resource from 1.8.0 to 2.0.0 (#948) 2023-03-27 03:12:08 +00:00
dependabot[bot]
f1d6731e7a
Bump async-trait from 0.1.67 to 0.1.68 (#950) 2023-03-27 02:44:29 +00:00
Jiahao XU
a403c99d3f
Upgrade CI to use sccache v0.4.0 for caching (#934)
Remove `mozilla-actions/sccache-action@v0.0.2` and instead use `taiki-ie/install-action` to install `sccache`, since we already use `taiki-e/install-action` for installing crates.

This PR also refactor just-setup.yml and use pass `GITHUB_TOKEN` to `taiki-e/install-action` which uses `cargo-binstall` for installing `cargo-auditable` and `sccache`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-26 17:28:35 +11:00
Jiahao XU
a27d5aebf6
Use leon for template in binstalk & detect malformed pkg-url/pkg-fmt early (#933)
Fixed #851

* Add new dep leon to crate binstalk
* Add new variant `BinstallError::Template{Parse, Render}Error`
* Use `leon::Template` in mod `bins`
* Use `leon::Template` in mod `fetchers::gh_crate_meta`
* Refactor mod `bins`: Rm unused associated fn & fields from `Context`
* Simplify unit testing in mod `fetchers::gh_crate_meta`
* Rm soft-deprecated field `fetchers::gh_crate_meta::Context::format`
  and change the `match` to resolve `archive` => `self.archive_format`.
* Make macro_rules `leon::template!` far easier to use
* Construct `leon::Template<'_>` as constant in `gh_crate_meta::hosting`
* Simplify `leon::Values` trait
   Change its method `get_value` signature to
   
   ```rust
       fn get_value(&self, key: &str) -> Option<Cow<'_, str>>;
   ```
   
   Now, `ValuesFn` also accepts non-`'static` function, but now
   `leon::Values` is only implemented for `&ValuesFn<F>` now.
   
   This makes it a little bit more cumbersome to use but I think it's a
   reasonable drawback.
* Rm `Send` bound req from `ValuesFn`
* Impl new fn `leon::Template::cast`
   for casting `Template<'s>` to `Template<'t>` where `'s: 't`
* Rename `leon::Template::has_keys` => `has_any_of_keys`
* Make checking whether format related keys are present more robust
* Optimize `GhCrateMeta::launch_baseline_find_tasks`: Skip checking all fmt ext
   if none of the format related keys ("format", "archive-format",
   "archive-suffix") are present.
* Only ret `.exe` in `PkgFmt::extensions` on windows
   by adding a new param `is_windows: bool`
* Improve debug msg in `GhCrateMeta::fetch_and_extract`
* Add warnings to `GhCrateMeta::find`
* Rm dep tinytemplate
* `impl<'s, 'rhs: 's> ops::AddAssign<&Template<'rhs>> for Template<'s>`
* `impl<'s, 'rhs: 's> ops::AddAssign<Template<'rhs>> for Template<'s>`
* `impl<'s, 'item: 's> ops::AddAssign<Item<'item>> for Template<'s>`
* `impl<'s, 'item: 's> ops::AddAssign<&Item<'item>> for Template<'s>`
* `impl<'s, 'rhs: 's> ops::Add<Template<'rhs>> for Template<'s>` (improved existing `Add` impl)
* `impl<'s, 'rhs: 's> ops::Add<&Template<'rhs>> for Template<'s>`
* `impl<'s, 'item: 's> ops::Add<Item<'item>> for Template<'s>`
* `impl<'s, 'item: 's> ops::Add<&Item<'item>> for Template<'s>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-03-26 16:11:10 +11:00
Jiahao XU
47d4aeaa96
Run cache-cleanup at 3am & 4:30am AEST instead of after every PR (#944)
since cache-cleanup will issue a lot of gh api requests, running the
workflow right after the PRs would cause the GH API to rate limit all
workflows (including our CI for testing and release) that they can no
longer upload artifacts and `cargo-binstall` would have to fallback to
sending GET requests instead of using GH API, which makes it a lot
slower and more likely to fail.

This PR changes it to be run at 3am and 4:30am AEST which nobody would submit
any PR at that time and then remove all caches of the top 20 closed prs.

The workflow can also now be triggered manually.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-23 18:10:30 +11:00
dependabot[bot]
2ebc39478c
Bump toml_edit from 0.19.7 to 0.19.8 (#943)
Bumps [toml_edit](https://github.com/ordian/toml_edit) from 0.19.7 to 0.19.8.
- [Release notes](https://github.com/ordian/toml_edit/releases)
- [Commits](https://github.com/ordian/toml_edit/compare/v0.19.7...v0.19.8)

---
updated-dependencies:
- dependency-name: toml_edit
  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-03-23 14:35:01 +11:00
Jiahao XU
9a59119163
Fully remove all caches for PR in cache-cleanup.yml (#942)
Previously it only removes 30 caches for the PR because gh actions-cache list defaults to only listing 30 cache entries.

In this PR, I changed the limit to the maximum allowed 100 cache entries and I also added a loop to keep getting the next 100 cache entries until there is none.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-23 02:50:13 +13:00
github-actions[bot]
17610963de
release: cargo-binstall v0.22.0 (#941)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-23 00:44:11 +11:00
github-actions[bot]
b43d0c9dfe
release: binstalk v0.11.0 (#940)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-23 00:12:42 +11:00
github-actions[bot]
e58a79846f
release: binstalk-downloader v0.4.2 (#939)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-22 23:27:01 +11:00
github-actions[bot]
9ae7f40ea9
release: binstalk-manifests v0.4.1 (#938)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-22 22:53:51 +11:00
github-actions[bot]
0291259fa5
release: detect-targets v0.1.7 (#937)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-03-22 22:23:15 +11:00
Jiahao XU
b69d8c25cb
Enable --no-symlinks by default and fix sccache installation (#936)
Partially resolve #731

Using symlinks not only add unnecessary bloat to users' `$CARGO_HOME/bin` directory, but it actually breaks `sccache`, which inspects its binary name and decides how to act on.

For `sccache` to function, it must be invoked directly or use a hard link.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-22 21:58:37 +11:00
Jiahao XU
8b83e150bb
Bump transitive deps using cargo update --aggressive (#935)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-22 21:22:11 +11:00
Jiahao XU
44923d25ca
Rewrite Template::parse_items: More readable & better perf (#932)
Replace the algorithm with explicit state and complex matching with a loop that encodes state in the current structure of the loop.

The new code is much more readable and might be more performant since it uses `str::find`/`str::split_once` to look for next token instead of manually iterating over `str::chars`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-21 18:22:23 +11:00
dependabot[bot]
849d9ef9ee
Bump reqwest from 0.11.14 to 0.11.15 (#930) 2023-03-21 02:10:27 +00:00
github-actions[bot]
0d730b5e95
release: leon v1.0.0 (#931)
Co-authored-by: github-actions <github-actions@github.com>
2023-03-21 01:59:36 +00:00
Félix Saparelli
2227d363f7
Leon template library (#766)
* leon: first implementation

* Update crates/leon/src/values.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Workaround orphan rules to make API more intuitive

* Fmt

* Clippy

* Use CoW

* Use cow for items too

* Test that const construction works

* leon: Initial attempt at O(n) parser

* leon: finish parser (except escapes)

* leon: Improve ergonomics of compile-time templates

* Document helpers

* leon: Docs tweaks

* leon: Use macro to minimise parser tests

* leon: add escapes to parser

* leon: test escapes preceding keys

* leon: add multibyte tests

* leon: test escapes following keys

* Format

* Debug

* leon: Don't actually need to keep track of the key

* leon: Parse to vec first

* leon: there's actually no need for string cows

* leon: reorganise and redo macro now that there's no coww

* Well that was silly

* leon: Adjust text end when pushing

* leon: catch unbalanced keys

* Add error tests

* leon: Catch unfinished escape

* Comment out debugging

* leon: fuzz

* Clippy

* leon: Box parse error

* leon: &dyn instead of impl

* Can't impl FromStr, so rename to parse

* Add Vec<> to values

* leon: Add benches for ways to supply values

* leon: Add bench comparing to std and tt

* Fix fuzz

* Fmt

* Split ParseError and RenderError

* Make miette optional

* Remove RenderError lifetime

* Simplify ParseError type schema

* Write concrete Values types instead of generics

* Add license files

* Reduce criterion deps

* Make default a cow

* Add a CLI leon tool

* Fix tests

* Clippy

* Disable cli by default

* Avoid failing the build when cli is off

* Add to ci

* Update crates/leon/src/main.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/leon/Cargo.toml

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Bump version

* Error not transparent

* Diagnostic can do forwarding

* Simplify error type

* Expand doc examples

* Generic Values for Hash and BTree maps

* One more borrowed

* Forward implementations

* More generics

* Add has_keys

* Lock stdout in leon tool

* No more debug comments in parser

* Even more generics

* Macros to reduce bench duplication

* Further simplify error

* Fix leon main

* Stable support

* Clippy

---------

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-21 01:36:02 +00:00
Jiahao XU
daf8cdd010
Bump transtive deps (#929)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-21 12:04:00 +11:00
dependabot[bot]
6a9827e66f
Bump serde from 1.0.156 to 1.0.157 (#926) 2023-03-20 04:02:13 +00:00
dependabot[bot]
b3dc52f6d7
Bump clap from 4.1.9 to 4.1.11 (#927) 2023-03-20 03:39:08 +00:00
dependabot[bot]
dd4595e6a4
Bump thiserror from 1.0.39 to 1.0.40 (#928) 2023-03-20 03:35:45 +00:00
dependabot[bot]
bbb4eb7e58
Bump dirs from 4.0.0 to 5.0.0 (#925) 2023-03-20 02:50:04 +00:00
dependabot[bot]
30c1e6af8f
Bump async-trait from 0.1.66 to 0.1.67 (#924) 2023-03-20 02:48:52 +00:00
Jiahao XU
f28c05b0ee
Fix QuickInstall report bug for target universal2-apple-darwin (#921)
This bug was reintroduced by #919 and it was fixed by #918

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-03-18 22:35:48 +13:00
Jiahao XU
a6e52afaa0
Retry http request on connection error (#922) 2023-03-18 22:35:18 +13:00