Commit graph

32 commits

Author SHA1 Message Date
Jiahao XU
b56a8c3579
Fix detect-targets glibc detection (#1421)
* Fix `detect-targets` glibc detection

Fixed #1420

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

* Fix `detect-targets` glibc detection for Fedora

Fedora 37-39 has glibc installed in `/lib64` and `/usr/lib64` instead of
`/lib` or `/usr/lib`.

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

* Improve caching in `detect-targets-alpine-test`

Make sure it reuses cached artifacts instead of recompiling everything.

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

* Mv `test-detect-targets-musl.sh` into `.github/scripts/`

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

* Refactor `ci.yml`: Extract new job `detect-targets-build`

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

* FIx `detect-targets-ubuntu-test`

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

* Avoid building the entire workspacein `detect-targets-build`

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

* Fix `detect-targets-*-test`: `chmod +x detect-targets`

Also fixed testing on Alpine, to make sure it exits with status 1 on
assertion failure.

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

* Fix typo

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

* Cache all crates in `detect-targets-build`

Since `detect-targets` rarely changes and is quite small, it is also
reasonable to cache it.

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

* Add job `detect-targets-more-glibc-test`

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

* Add `detect-targets-nix-test`

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

* Fix `detect-targets-nix-test` executing `detect-targets`

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

* Fix workflow: Add all `detect-targets-*` jobs to be dep of `tests-pass`

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-29 23:46:03 +00:00
Jiahao XU
3d68641a6d
Fix release-packages and release-cli workflow (#1422)
* Fix `release-packages` and `release-cli` workflow

Fixed #1419

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

* Use `taiki-e/install-action` for `rsign2` & `rage` in `release-packages.yml`

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-29 02:49:43 +00:00
Félix Saparelli
5d4333d5c8
Fix release build again (#1400)
* Fix build again

* Recommend (r)age over minisign password

* Dry-run the entire release process

* Reorg a bit so dry-run works

* Fix secret name

* Add check on age key

* Pass secrets down

* Use a cross-platform "date"

* Delete signing key artifact to be extra safe

* Last little bits
2023-09-26 11:17:17 +00:00
Félix Saparelli
49b37ff1e2
Revert "release: cargo-binstall v1.4.0" and fix (#1398)
* Revert "release: cargo-binstall v1.4.0 (#1397)"

This reverts commit 99e8256018.

* --allow-dirty on publish

* Remove private key file after generation

* Write public key file to bin crate and to package

* Upload public key file to release
2023-09-26 06:47:25 +00:00
Félix Saparelli
ee7fcb3210
Sign our releases (#1347)
* Sign our releases

* Use secrets instead of artifacts

* And the universal

* Apparently we can’t use secrets like that?

* Minor fixes to doc

* Private key requires untrusted comment

* Dogfood one deeper
2023-09-23 08:07: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
Félix Saparelli
6033e30db5
Remove old jq script (#676) 2023-01-10 22:36:35 +00:00
Félix Saparelli
9821caa6d0
Use release-meta action instead of parsing commits (#675) 2023-01-11 09:22:53 +11:00
Félix Saparelli
211cb3ceb0
Add release metadata in PR (from release-pr v2) (#668) 2023-01-09 11:53:55 +11:00
Félix Saparelli
aea9df602c
Migrate CI and builds to Just, add "full" builds (#660) 2023-01-08 16:27:36 +11:00
Jiahao XU
75d2fc4d42
Optimize pre-built artifact size: Set compression level for zip to 9 (max) (#596)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-12-09 15:14:37 +13:00
Jiahao XU
bd3f1d598c
Enable feature thin of dep zstd for any target built natively (#480)
* Add new feature `binstalk-downloader/zstd-thin`
* Add new feature `binstalk/zstd-thin`
* Add new feature `binstalk/zstd-thin`
* Enable feature zstd-thin for targets built natively

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-22 06:52:41 +00:00
Jiahao XU
9e80cf0700
Feature: Impl opt-out options (#510)
Fixed #136

* Impl opt-out optioins in binstalk
* Replace field `Options::{gh_crate, quickinstall}_fetcher` with `resolver`
  which can determine order of resolver used.
* Add new field `Args::{disable_}strategies`
* Add new variant `BinstallError::InvalidStrategies`
* Add variant `BinstallError::NoFallbackToCargoInstall`
* Add code for supporting strategies in mod entry
* Test `--disable-strategies` in `tests.sh`
* Test for `--strategies` in `tests.sh`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-11-11 05:24:46 +00:00
Jiahao XU
98b62251ad
Fix unit test & integration CI and the release CI (#469)
* Fix integration test: Make sure `cargo build cargo-binstall` would not fail due to binary already present
* Disable feature `zlib-ng` for release build
* Disable build-std for release build on aarch64-unknown-linux-gnu
* Fix clippy warning in unit test CI
* Fix compile-settings.jq
* Fix caching: Rm `restores-keys`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-10-08 20:26:46 +13:00
Jiahao XU
ec2bdb551e
Use CARGO env variable if present (#453)
* Run `$CARGO -vV` in `detect-targets` if env `CARGO` present
* Improve crate doc for `detect-targets`
* Use env var `CARGO` in `install_from_source` if present
* Test use of `CARGO` env in `tests.sh`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-10-02 04:52:25 +13:00
Jiahao XU
f482e362ba
Make binaries with required-features optional (#438)
* Make binaries with `required-features` optional so that crates like `sccache` would work as expected.
* Fix `infer_bin_dir_template`: concat with `data.bin_path` introduced in #417 
* Always `chmod +x $bin` on unix in case the archive (e.g. `sccache`) did not set the executable bit of fmt == Bin.
* CI: Install `sccache` but do not run it since it requires cargo env to be ready

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-28 13:46:55 +10:00
Jiahao XU
4ba1e221ea
Improve auto discover (#433)
* Add new field `gh_crate_meta::Context::archive_suffix`
* Support `archive_suffix = ""` for unix
* Use `archive-suffix` in `FULL_FILENAMES` & `NOVERSION_FILENAMES` to support `PkgFmt::Bin`
* Simplify `PkgFmt::extensions`
* Fix `default_bin_dir_template` in `infer_bin_dir_template`: Fix typo `archive_suffix`
* Test `default_bin_dir_template` in CI
* Fix installation of `PkgFmt::Bin`: `chmod +x $bin` on unix if fmt == Bin
* Add miniserve to `.github/scripts/tests.sh`
* Update `SUPPORT.md`
* Add github-test-Cargo2.toml to test Github pkg-url with bin-dir provided
* Avoid allocation on processing `path_normalized` in `BinFile::from_product`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-28 02:52:14 +00:00
Jiahao XU
e034d69e12
Impl try multiple default bin dirs (#417)
From @passcod :

* Make bin-dir an Option
* Use cargo-release as a test case
* WIP: Try multiple default bin dirs
* Update bins.rs
* Update cargo_toml_binstall.rs

From @NobodyXu :
* Optimize & Prepare for support multi `bin-path`s
* Ensure quickinstall bin_dir work as usual.
* Rm dup entries in `FULL_FILENAMES`
* Add second version of `NOVERSION_FILENAMES`
* Impl multiple default `bin-dir`s
* Improve doc for `BinFile::from_product`
* Fix tests.sh

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-26 01:15:20 +13:00
Jiahao XU
ae9f536400
Fix/dep cargo_toml: Bump to v0.12.1 (#418)
* Fix `cargo_toml`: Bump dep to v0.12.1
* Test `cargo-watch` in CI
* Fix `*-test-Cargo.toml` used in integration tests

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-25 16:01:57 +13:00
Jiahao XU
7ac55c46f1
Add new feature log_release_max_level_debug and enable it on CI release build (#390)
* Add new feature `log_release_max_level_debug`
* Fix calculation of `log_level` in `logging`
* Enable feature log_release_max_level_debug on CI release build

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-17 09:22:19 +00:00
Félix Saparelli
9372ea4e53
Fix release script (#368) 2022-09-10 23:59:41 +12:00
Félix Saparelli
b89a4a56b8
Fix (remove) escaping for release blurb in release-pr template (#367) 2022-09-10 23:46:15 +12:00
github-actions[bot]
037e62184f
release: cargo-binstall v0.13.0 (#366)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-10 11:07:41 +00:00
Félix Saparelli
e24b2ce1e3
Disable zlib-ng for the default cargo-install build (#354)
but explicitly enable it in our own builds.

This is because using zlib-ng sometimes does not compile easily on Windows,
and using the pure miniz_oxide offers a better install story from source.

For our binary builds, we can provide the optimal performance, and still
do that for most users as they will update with cargo-binstall, getting our
build as a second pass.
2022-09-09 18:06:05 +12:00
Jiahao XU
23daef610b
Fix .github/scripts/tests.sh: Fix testing for ugprading (#352)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-07 18:46:25 +10:00
Félix Saparelli
4885cfbb88
Add important usage note for triggering builds to release template (#345) 2022-09-05 04:47:20 +00:00
Félix Saparelli
db82c6935f
Deprecate --secure, enforce HTTPS (#343)
Resolves #124
2022-09-05 14:18:14 +10:00
Félix Saparelli
3387a63895
Fix release PR template (#336) 2022-09-04 15:19:17 +00:00
Félix Saparelli
e21617cc9e
Adapt release workflow for workspace (#331)
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-04 11:12:10 +00:00
Félix Saparelli
280bc974eb
Use release PR action (#330) 2022-09-04 09:38:08 +00:00
Jiahao XU
e39a02aa92
Test default pkg-url for GitLab and BitBucket (#322)
* Test default `pkt-url` for GitLab and BitBucket
* Fail if `cargo-build` is called when testing GitLab/BitBucket
* Fix use of `remote_exists` in `GhCrateMeta::launch_baseline_find_tasks`
   
   If `Method::HEAD` fails, try `Method::GET` since some servers reject
   `Method::HEAD`, e.g. bbuseruploads.s3.amazonaws.com

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 10:45:55 +00:00
Félix Saparelli
4b00f5f143
Split crates and clean up structure of codebase (#294)
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-20 11:24:12 +00:00