Jiahao XU
4fb93aa9d2
Fix release profile override on Windows
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-10 23:00:56 +10:00
Jiahao XU
a4cff680b0
Speedup CI using cargo-nextest
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-10 22:55:11 +10:00
Jiahao XU
2e80eeef97
Optimize binstalk-git-repo-api
...
Use a dedicated github token in CI
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-10 22:53:03 +10:00
Jiahao XU
1dbd2460a3
Support private github repository ( #1690 )
...
* Refactor: Create new crate binstalk-git-repo-api
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix CI lint warnings
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `just check`: Rm deleted features from `cargo-hack` check
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Extract new mod error
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Ret artifact url in `has_release_artifact`
So that we can use it to download from private repositories.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Move `test_graph_ql_error_type` to mod `error`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix running `cargo test` in `binstalk-git-repo-api``
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Remove unnecessary import in mod `error::test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rename mod `request`` to `release_artifacts`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Impl draft version of fetching repo info
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Move `HasReleaseArtifacts` failure variants into `GhApiError`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Use `GhRepo` in `GhRelease`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Return `'static` future
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Make sure `'static` Future is returned
To make it easier to create generic function
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add logging to unit testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Extract new fn `GhApiClient::do_fetch`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rm unused `percent_encode_http_url_path`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `cargo test` run on CI
`cargo test` run all tests in one process.
As such, `set_global_default` would fail on the second call.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Optimize `GhApiClient::do_fetch`: Avoid unnecessary restful API call
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Rm param `auth_token` for restful API fn
which is always set to `None`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Impl new API `GhApiClient::get_repo_info`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit test for `GhApiClient::get_repo_info`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor testing: Parameter-ize testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Parallelise `test_get_repo_info`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Create parameter-ised `test_has_release_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Parallelize `test_has_release_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: `gh_api_client::test::create_client` shall not be `async`
as there is no `.await` in it.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Return `Url` in `GhApiClient::has_release_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Impl new API `GhApiClient::download_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Remove unused deps added to binstalk-git-repo-api
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new API `GhApiClient::remote_client`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `GhApiClient::has_gh_token`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `GhRepo::try_extract_from_url`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rename `ReleaseArtifactUrl` to `GhReleaseArtifactUrl`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new fn `Download::with_data_verifier`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* feature: Support private repository
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add e2e-test/private-github-repo
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `launch_baseline_find_tasks`: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix test failure: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Temporarily enable debug output for e2e-test-private-github-repo
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `get_repo_info`: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Improve `debug!` logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more debug logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more debugging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more debug logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Apply suggestions from code review
* Fix compilation
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix cargo fmt
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add crate binstalk-git-repo-api to release-pr.yml
* Update crates/binstalk-git-repo-api/Cargo.toml
* Apply suggestions from code review
* Update crates/binstalk/Cargo.toml
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-10 06:02:12 +00:00
Jiahao XU
2d856bf1c0
Speedup ci by using personal access token for testing ( #1680 )
...
* Use secrets,CI_TEST_GITHUB_TOKEN for testing in ci.yml
* Run e2e-test in release-packages.yml using secrets.CI_TEST_GITHUB_TOKEN
* Use CI_RELEASE_TEST_GITHUB_TOKEN in e2e-test in release-packages.yml
2024-05-02 23:44:23 +00:00
Jiahao XU
3198712328
Bump release-pr to v2.1.1 ( #1672 )
2024-05-02 05:27:20 +00:00
dependabot[bot]
0e9e505697
build(deps): bump geekyeggo/delete-artifact from 4 to 5 ( #1650 )
...
Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact ) from 4 to 5.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases )
- [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md )
- [Commits](https://github.com/geekyeggo/delete-artifact/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 07:47:44 +00:00
dependabot[bot]
cf2473129b
build(deps): bump mathieudutour/github-tag-action from 6.1 to 6.2 ( #1646 )
...
Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action ) from 6.1 to 6.2.
- [Release notes](https://github.com/mathieudutour/github-tag-action/releases )
- [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.1...v6.2 )
---
updated-dependencies:
- dependency-name: mathieudutour/github-tag-action
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>
2024-03-12 02:11:47 +00:00
Jiahao XU
1928e2ccb3
Refactor: Mv leon and leon-macros into another repo ( #1628 )
...
* Refactor: Mv leon and leon-macros into another repo
It's moved to https://github.com/cargo-bins/leon
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix CI: Rm `cargo-hack` check for `leon`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-02-20 13:16:47 +00:00
Jiahao XU
add9310d5e
Fix release-pr.yml: Do not run semver-checks for leon-macros ( #1614 )
...
leon-macros is a proc-macro crate and cargo-semver-checks cannot perform semver checks on proc-macro crates.
2024-02-12 07:14:02 +00:00
Jiahao XU
c450f442cb
Refactor: Move simple-git into a new repo ( #1611 )
...
Moved to https://github.com/cargo-bins/simple-git
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-02-09 05:38:28 +00:00
Jiahao XU
9cf7b15df8
CI: Use runner macos-14
which uses M1 machine ( #1590 )
...
* CI: Use runner `macos-14` which uses M1 machine
`macos-14` provides 3-core M1, 7G mem and 14G stroage, while `macos-latest`
(`macos-13` as of writing) provides 4-core intel, 14G mem and 14G
storage.
While the memory is cut by half and core count reduce by 1, I believe
that it would still speedup the CI since M1 is much more powerful than
previous Intel CPU used in `macos-13`.
It would also allow us to run tests on aarch64-apple-darwin and on
universal-apple-darwin, if necessary.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* CI: Fix `e2e-test-subcrate`: Bump `cargo-audit` ver to v0.18.3
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-01-31 14:26:57 +00:00
Jiahao XU
dba9dd5ff0
build(deps): bump actions/{up, down}load-artifact from 3 to 4 ( #1591 )
...
Revert "Revert "build(deps): bump actions/{up, down}load-artifact from 3 to 4…"
This reverts commit f5da25cc56
.
2024-01-31 14:26:11 +00:00
Jiahao XU
8befa3d649
Fix detect-targets on android targets ( #1576 )
...
* Fix detect-targets on android targets
By enabling linux fallback on Android.
Also add CI regression test for aarch64-linux-android target.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix CI: Add job `detect-targets-android-check` as required for merging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-01-15 23:02:40 +00:00
Jacob Hummer
b415b0d7e6
Fix install-from-binstall-release.sh for Git Bash users on Windows ( #1562 )
...
* Update install-from-binstall-release.sh
* Update install-from-binstall-release.sh
* Update install-from-binstall-release.sh
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
* Update install-from-binstall-release.sh
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
* Update install-script.yml
* Update install-from-binstall-release.sh
* Update install-script.yml
---------
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-01-13 02:22:51 +00:00
Jiahao XU
f5da25cc56
Revert "build(deps): bump actions/{up, down}load-artifact from 3 to 4" ( #1561 )
...
Revert "build(deps): bump actions/{up, down}load-artifact from 3 to 4 (#1533 )"
This reverts commit fea489032a
.
2024-01-07 14:46:30 +00:00
dependabot[bot]
55bb7f3805
build(deps): bump geekyeggo/delete-artifact from 2 to 4 ( #1541 )
...
Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact ) from 2 to 4.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases )
- [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md )
- [Commits](https://github.com/geekyeggo/delete-artifact/compare/v2...v4 )
---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-25 04:12:29 +00:00
Jiahao XU
fea489032a
build(deps): bump actions/{up, down}load-artifact from 3 to 4 ( #1533 )
...
* build(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 09:37:26 +00:00
Jiahao XU
4599a70839
Fix CI: Dry-run cargo-publish
on crate to be published ( #1490 )
...
* Fix CI: Dry-run `cargo-publish` on crate to be published
If there's no crate to publish, do not dry-run `cargo-publish`.
Only dry-run `cargo-publish` on crate to be published to avoid
`cargo-publish` error on `cargo-binstall` when one of its direct
dependencies is bumped.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix passing of crate to `release-cli.yml`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix passing of `needs.pr-info.outpus.crate`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `release-dry-run`: Only run if is release or is not PR event
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix passing of crate
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rm `just-setup` from `release-cli.yml` since it cannot be cached
release is trigged by the closing of PR, so the cache is saved under the
branch `release/*` which cannot be reused.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix dry-run publish
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-11-11 14:17:16 +00:00
Jiahao XU
26b6db2244
Fix release-cli.yml
: Do not dry run cargo-publish ( #1487 )
...
* Fix `release-cli.yml`: Do not dry run `cargo-publish`
If dependencies of `carog-binstall` is bumped, then `cargo-publish` dry
run will fail since the dependency has not published yet
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Speedup step publish in `release-cli.yml`
Use `just-setup` to cache rust/zig compilation, also
disable all features to reduce dependencies pulled in.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* `release-cli.yml`: Restore rust cache before ephermal-crate.sh is run
which writes the key to `Cargo.toml` and invalidates the cache.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-11-11 11:11:09 +00:00
Jiahao XU
7e132f690d
Fix CI: Use cargo-hack
0.6.10 ( #1468 )
...
* Fix ci: Install deps before caching and include `JUST*` env values in caching key
To make sure caching is done properly and does not accidentally include
(old) pre-built binaries that we don't want.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix missing `shell`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix justfile target `check`: Call `cargo hack check` directly
without using the `CARGO=cargo-zigbuild` env since `leon` does not use
external C/C++ compiler anyway.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* CI: Dowgrade cargo-hack to 0.6.10
This is the last version working
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-10-20 10:37:54 +00:00
Jiahao XU
78eb0921e3
CI: Skip release-dry-run on pull_request ( #1435 )
...
For PRs opened by contributors who are not part of the cargo-bins team and for
PRs opened by dependabot, they cannot access the secrets, thus signing will
always fail.
Skipping release-dry-run on pull_request would fix that for them, while
retaining the signing stage on merge_queue and on main to ensure that the
release workflow is working.
It will also speedup CI for PR.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-30 13:36:23 +00:00
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
86060fadc2
.github: build detect-targets with cli-logging ( #1428 ) ( #1429 )
...
Without this we get much less useful output if these tests fail.
Co-authored-by: Tamir Duberstein <tamird@gmail.com>
2023-09-29 05:23: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
216d548fd4
Use explicit write permissions ( #1404 )
...
* Use explicit write permissions
* Revert "release: cargo-binstall v1.4.1 (#1403 )"
This reverts commit 00941d8b43
.
2023-09-26 21:57:51 +00:00
Félix Saparelli
499e6b07fa
Upload packaged crate ( #1401 )
...
Upload packaged crate when not releasing
2023-09-26 13:30:47 +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
efbd20857b
Fix detect-targets
on ubuntu 20.04, glibc 2.31 ( #1379 )
...
* Fix `detect-targets` on ubuntu 20.04, glibc 2.31
Fixed #1375 and fixed #1378
glibc 2.31 does not support `--version`, so we need to detect and
fallback to passing an executable linked with that glibc to check if it
is indeed glibc.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix compilation faillure on ubuntu-20.04
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-22 23:55:12 +00:00
dependabot[bot]
b36674a1c4
build(deps): bump actions/checkout from 3 to 4 ( #1348 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 01:25:18 +00:00
Jiahao XU
76a692224d
Fix detect-targets
on Linux and add CI testing ( #1344 )
...
* Testing: Add `detect-targets/src/main.rs`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `detect-targets` linux: `guess_host_triple` could return wrong libc info
so it has to check it manually instead of simply providing alternatives
like other OSes.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `get_ld_flavor` for Alpine's gcompat glibc
Its output is different from regular glibc, so we need to hardcode that
particular cases.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix detection of alpine specific musl target
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add ci testing for Alpine
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add CI test for detect-targets on ubuntu
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor `get_ld_flavor`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix shellcheck
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more CI test for ubuntu
and fixed typo in it
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rm distro specific target as it breaks `cargo-install` fallback
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Make sure all binaries are built in CI
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `package.metadata.binstall` for `detect-targets`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix justfile
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `detect-targets-{alpine, ubuntu}-test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `detect-targets-ubuntu-test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `debug-targets-ubuntu-test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* `set -exuo pipefail` in `detect-targets-ubuntu-test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Simplify `detect-targets-*-test`: Use `Swatinem/rust-cache@v2` directly
instead of using `just-setup`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rm dup steps in `detect-targets-ubuntu-test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `ls` to detect-targets-alpine-test for debugging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* FIx `detect-targets-alpine-test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `get_ld_flavor`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `linux::detect_targets` on ubuntu & glibc system
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* FIx `linux::detect_targets` glibc checking
Check dynlib suffix
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-06 14:17:43 +00:00
dependabot[bot]
d657fbe518
build(deps): bump actions/checkout from 3 to 4 ( #1346 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 02:10:48 +00:00
Jiahao XU
84004a71a9
ci: Speedup release.yml
by removing job test
( #1325 )
...
Since the merge_queue requires every PR to be tested, there is no need
to run the test again in `release.yml`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-24 12:51:28 +00:00
Jiahao XU
0a71b39c90
ci: Fix release.yml
being cancelled due to ci.yml
( #1316 )
...
Add a unique value to `concurrency.group` in `ci.yml` to prevent it from
being cancelled when releasing crates.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-24 00:03:15 +00:00
Jiahao XU
dc77a1ab93
Refactor: Extract new crate simple-git
( #1304 )
...
`binstalk-downloader` contains stuff about http(s) before the
git code is moved into it and now it becomes http and git.
While git indeed uses http stuff, which is why I decided to put
it into binstalk-downloader, it is more than just downloading
since it is stateful (can be cached locally and updated)
where as http is stateless.
Also `binstalk-downloader`'s codegen time now increases
dramatically and it also creates extra dependencies for
binstalk-fetchers, delaying its execution.
The git code also don't use anything from `binstalk-downloader`
at all, it makes sense to be an independent crate.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-19 01:08:55 +00:00
Jiahao XU
2215682e76
Update CI & dependabot: Add new crates ( #1296 )
...
and also add missing `crates/binstalk-bins/LICENSE`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-16 21:16:05 +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
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
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
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
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
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
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
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
Jiahao XU
83fdd053bf
Fix release-pr.yml
: Do not check-semver
for cargo-binstall release ( #1214 )
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-07-18 12:56:33 +00:00
Jiahao XU
f0c3d1e724
fix release-build.yml
: Fix cache key for Swatinem/rust-cache@v2
( #1180 )
...
Set `CARGO_*` env before caching is done.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-06-27 06:25:57 +00:00