The `STRIP_V` env var should be set from the `set_binstall_version`
matrix variable.
While here, ensure that the install-script workflow is run whenever
the workflow itself is changed (in addition to the install scripts
themselves).
* Fix installer downloads for specific releases
Github download urls for a specific release uses the pattern `../releases/download/[RELEASE]/..`, which differs from the latest release URL which uses `../releases/latest/download/..`.
For convenience, if `BINSTALL_VERSION` is set but doesn't start with `v`, the v is prefixed.
* ci: Set BINSTALL_VERSION in install script tests
When running the install-script workflow in Github Actions, add matrix
options for not setting the variable, setting it to the latest release
with the `v` prefix, and setting it to the latest release without the
`v` prefix.
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* 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>
* 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>
* 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
* 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>
* 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>
* 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
* 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>
* 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>
* 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>