Commit graph

302 commits

Author SHA1 Message Date
Jiahao XU
61c9231401
CI: Fix binstalk-git-repo-api on PR of forks (#1932)
* Rm CI_UNIT_TEST_GITHUB_TOKEN fallback for unit-tests

As it would break unit testing

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* CI: Fix gh_api_client.rs test

Ignore empty gh token

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update crates/binstalk-git-repo-api/src/gh_api_client.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update crates/binstalk-git-repo-api/src/gh_api_client.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-10-12 10:12:53 +00:00
Jiahao XU
069afedf19
Speedup ci: Exclude workspace from macOS SIP and windows defenders (#1899)
* Enable macOS dev mode in CI

to speedup CI

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Enable dev drive on windows to speedup CI

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Use dev drive for target

which is the most write-heavy part.

The read to the workspace can be cached as it is really small

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Setup dev drive for cargo/rust home

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Exclude target, cargo/rustup home from windows defender

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Exclude the entire workspace from

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix action.yml

Add missing shell, and merge steps for adding windows defender exclusion

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix adding windows defender exclusion path

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix use of Add-MpPreference

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix pwsh

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix creating second dev drive

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix second dev drive setup

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix caching: Do not mount dev drive at target

Since it contains files that are not accessible.

Also remove use of dev drive for cargo/rustup home since it prevents caching (rust-cache does not read from env).

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Disable dev drive for windows as a failed experiment

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-08-25 12:15:41 +00:00
dependabot[bot]
50bee16581
build(deps): bump tj-actions/changed-files from 44 to 45 (#1893)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 44 to 45.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v45)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  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-08-22 03:22:31 +00:00
Jiahao XU
d02d7b2a69
Fix setting release to latest in release-cli.yml (#1879)
* Fix setting release to latest in release-cli.yml

Using gh-release-edit

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update .github/workflows/release-cli.yml

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-08-12 13:57:22 +00:00
Jiahao XU
5d57d4506e
Fix CI blocked due to cargo-binstall rate-limit (#1860)
* Update gh-action.yml

Use CI_RELEASE_TEST_GITHUB_TOKEN if found as that one has less power

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update install-script.yml

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* RM outdated comment in gh-action.yml

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Pass github token to cargo-bins/cargo-binstall action in release-cli.yml

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Pass github-token to taiki-e/install-action in release-pr.yml

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-08-03 04:40:18 +00:00
Jiahao XU
9f3bfa9ca3
Switch back to macos-latest (#1855)
macos-latest is now an alias of macos-14 M1

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-07-31 12:49:13 +00:00
Jiahao XU
c635ad6f95
CI: Add release-plz to release library crates (#1850)
* Create release-plz.yml

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Disable release-plz for cargo-binstall

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Félix Saparelli <felix@passcod.name>
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2024-07-29 03:52:03 +00:00
Jiahao XU
0a9f17f1ba
Speedup and prevent rate limit in gh-action.yml (#1811)
By passing github token

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-07-06 04:27:28 +00:00
Jiahao XU
050c337da1
Fix typo in release-pr.yml inputs (#1790)
Stupid mistakes introduced in #1789

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-19 14:29:09 +00:00
Jiahao XU
45b25fede5
CI: Allow semver-check in release-pr.yml to be disabled via inputs (#1789)
In case buliding of previous version fail due to new releases in upstream.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-19 14:07:23 +00:00
dependabot[bot]
c49072c565
build(deps): bump cargo-bins/release-pr from 2.1.2 to 2.1.3 (#1788)
Bumps [cargo-bins/release-pr](https://github.com/cargo-bins/release-pr) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/cargo-bins/release-pr/releases)
- [Commits](https://github.com/cargo-bins/release-pr/compare/v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: cargo-bins/release-pr
  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>
2024-06-19 13:15:52 +00:00
Jiahao XU
374fc45b61
Bump cargo-bins/release-pr from 2.1.1 to 2.1.2 (#1787)
To reduce action output

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-19 08:48:47 +00:00
Jiahao XU
b9e8267cec
Speedup Linux CI (#1775)
* Speedup Linux CI

Use transparent huge page, according to https://kobzol.github.io/rust/rustc/2023/10/21/make-rust-compiler-5percent-faster.html it gives a nice 5% speedup

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

* Fix action.yml

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-15 15:08:25 +00:00
Jiahao XU
e3c8c40806
Run ci.yml every Monday (#1767)
Just to keep the cache hot while making sure cargo-binstall can compile on latest stable/nightly rust

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-15 01:32:07 +00:00
Jiahao XU
07dd868fa6
Fix release-dry-run (#1764)
Dry run publish in merge_queue CI for release PR

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-14 13:36:31 +00:00
Jiahao XU
540fa79c6b
CI: Fix publish (#1760)
* Fix publish in release-cli.yml

Using latest stable rust

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

* Fix publish in release.yml

Use latest stable rust

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

* Run release-dry-run in merge queue only

Running it twice on PR pipeline and merge queue pipeline only wastes time and causes rate limit.

For PR that modifies release-dry-run and wants to test it, they can temporarily run release-dry-run on PR pipeline.

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-14 11:33:20 +00:00
Jiahao XU
610504957f
Fix release-pr.yml (#1758)
Always use latest stable rust

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-14 10:25:13 +00:00
Jiahao XU
475fd61cd7
Do not run ci.yml on push to main (#1757)
All commits should be submit via PR, and merge_queue already run ci.yml, with up-to-date source code.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-14 09:29:41 +00:00
Jiahao XU
bb1e2cf363
Fix missing ' upgrade-transitive-deps.yml (#1752) 2024-06-14 03:28:11 +00:00
Jiahao XU
ba0e752b9c
Fix upgrade-transitive-deps.yml (#1749)
Fix use of gh-pr-create
2024-06-13 14:24:09 +00:00
Jiahao XU
05f488322e
Add cargo-binstall installation path to GITHUB_PATH (#1748)
* Add cargo-binstall installation path to GITHUB_PATH in install-from-binstall-release.sh

Fixed #1714

* Add cargo-binstall installation path to GITHUB_PATH in install-from-binstall-release.ps1

* Update install-script.yml to test

* Fix use of env var in install-from-binstall-release.ps1
2024-06-13 13:43:39 +00:00
Jiahao XU
22217acc51
Fix job changed-files ci.yml (#1745)
Fix sed expression
2024-06-13 10:19:00 +00:00
Jiahao XU
d524db3784
Fix ci and improve efficiency (#1744)
* Fix job changed-file in ci.yml

* Do not run job e2e-tests on PR

which might not have access to GitHub Token in secrets, if opened by non-maintainer

* Provide GITHUB_TOKEN fallback if the secrets is not accessible

* Fix regex expression passed to sed
2024-06-13 09:32:38 +00:00
Jiahao XU
38f8eb4b1a
Fix passing GITHUB_TOKEN in ci.yml (#1742)
Fix CI
2024-06-13 18:10:23 +10:00
Jiahao XU
a2d2c5d85c
Disable e2e-tests on x86_64h-apple-darwin
macos-14-arm64 cannot execute executable built for x86_64h
2024-06-13 00:17:30 +10:00
Jiahao XU
60a194be90
Improve ci (#1737)
* Run e2e-test on x86_64h-apple-darwin

Since it is a target built with `build-std`, we need to make sure it is
runnable.

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

* Fix `upgrade-transitive-deps`

Fill in PR description, so that reviewer can just re-open it to run the CI.

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-13 00:03:27 +10:00
Jiahao XU
7941387b73
Fix job changed-files (#1732)
* Fix job `changed-files`

Convert `ALL_CHANGED_FILES` to multiple lines before processing

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

* Run e2e-tests and unit-tests on aarch64-apple-darwin

Since the CI now uses M1 instead of x86_64, built a native executable
instead of relying on rosetta

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

* Run unit-tests on Linux-only

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 20:56:59 +10:00
Jiahao XU
4d7a91aa4c
Fix job changed-files in ci.yml (#1730)
* Fix job changed-files in ci.yml

When there are multiple crates, it would be in multiple lines, breaking github output

* Fix job changed-files in ci.yml

When no crate is changed, command cut will fail.

* Fix job unit-tests in ci.yml

If noo crate is changed, do not run cargo-nextest.

* Fix ci.yml syntax
2024-06-12 19:47:41 +10:00
Jiahao XU
2feac66e14
Speedup ci: Only run tests on change (#1729)
* Fix unit test for `GhApiClient`

Set client-side rate limit to 1 request per 200 ms

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

* Only run `detect-targets` test if changed

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

* Only run unit tests for crates that are changed

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

* Fix job `changed-files`

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

* Fix job `changed-files`

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

* Fix shell error in job `changed-files`

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

* FIx separator for `changed-files`

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

* Fix passning of craetes to run

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

* Fix passing of `CARGO_NEXTEST_ADDITIONAL_ARGS`

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

* Fix deciding which crates to test on windows

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

* Fix just recipe `unit-tests`

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

* Split test into two jobs

so that they will have they own cache (since different feature flags are used).

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 12:29:16 +10:00
Jiahao XU
3aae883467
Speedup ci (#1724)
* Optimize binstalk-git-repo-api

Use a dedicated github token in CI

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

* Speedup CI using `cargo-nextest`

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

* Fix release profile override on Windows

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

* Optimize unit test in binstalk-registry

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

* Use `secrets.CI_RELEASE_TEST_GITHUB_TOKEN` for just-setup

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

* Fix unit testing in justfile

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

* Add retry on rate limit in unit testing

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

* Only use `CI_UNIT_TEST_GITHUB_TOKEN` in unit testing

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

* Fix `test_get_repo_info`: Retry on rate limit

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

* Fix `test_has_release_artifact_and_download_artifacts`

Retry on rate limit

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-11 00:12:44 +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
github-actions[bot]
fbb49b4eb6
dep: Upgrade transitive dependencies (#1630)
* dep: Upgrade transitive dependencies

* CI: Use make 4.4.1 on macOS

Siuce cc 1.0.86 only works with make >=4.3

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

* CI: Bump actions/cache to v4

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

* CI: Fix copying of make compilation bash code

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

* CI: Fix make compilation

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

* CI: Speedup make compilation

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

* Fix CI: Add missing `shell`

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

* CI: FIx parallism for compiling make

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-02-23 13:03:58 +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
5064e4e188
CI: Cache zig global_cache to speedup build (#1481)
* CI: Cache zig global_cache to speedup build

This can be helpful in two situations:
 - If `cc` is bumped to a new release, then all the `*-sys` crates will
   be rebuilt even if their source doesn't change.
   Caching zig global_cache would avoid expensive rebuilds.
 - For target `x86_64h-apple-darwin`, it uses build-std which means the
   rust cache is quite ineffective (only build-dependencies are cached),
   so we would also need zig global_cache to avoid rebuilding c
   dependencies in CI.

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

* Fix missing `shell: bash`

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

* Fix CI: Create symlink to `zig`

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

* CI: Fix getting output from prev step in just-setup

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

* CI: Include job_id `github.job` in zig cache key

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-11-11 07:34:36 +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