Compare commits

...

12 Commits

Author SHA1 Message Date
Taiki Endo
3b0d937160 Release 2.41.5 2024-06-26 08:36:09 +09:00
Taiki Endo
5a7b7e3798 Update protoc@latest to 3.27.2 2024-06-26 06:10:22 +09:00
Taiki Endo
c2c0b6efca Release 2.41.4 2024-06-25 10:56:15 +09:00
Taiki Endo
d6b632e36c Update zola@latest to 0.19.1 2024-06-25 09:29:53 +09:00
Taiki Endo
84749680f0 Update syft@latest to 1.8.0 2024-06-25 03:11:54 +09:00
Taiki Endo
e6c7481b70 Release 2.41.3 2024-06-24 10:52:31 +09:00
Taiki Endo
8a2a11266f Update cargo-binstall@latest to 1.7.3 2024-06-24 03:11:32 +09:00
Taiki Endo
77774d839c Release 2.41.2 2024-06-23 13:44:01 +09:00
Taiki Endo
481510ca72 Update typos@latest to 1.22.9 2024-06-23 03:11:19 +09:00
Taiki Endo
bb478bb090 Release 2.41.1 2024-06-22 12:44:37 +09:00
Jiahao XU
4558bb807b Speedup codegen by caching tools/codegen compilation (#554) 2024-06-22 12:43:03 +09:00
Taiki Endo
315e996a95 Update typos@latest to 1.22.8 2024-06-22 07:02:08 +09:00
9 changed files with 196 additions and 49 deletions

View File

@@ -83,6 +83,8 @@ jobs:
- uses: ./
with:
tool: ${{ steps.tool-list.outputs.tool }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
- name: Test bash
run: just --version && shfmt --version && protoc --version
@@ -151,6 +153,8 @@ jobs:
- uses: ./
with:
tool: ${{ steps.tool-list.outputs.tool }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
manifest:
runs-on: ubuntu-latest
@@ -161,7 +165,12 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain add nightly --no-self-update && rustup default nightly
run: rustup update stable --no-self-update
- name: Generate Cargo.lock
run: cargo update
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: 'true'
- run: tools/manifest.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -10,6 +10,28 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.41.5] - 2024-06-25
- Update `protoc@latest` to 3.27.2.
## [2.41.4] - 2024-06-25
- Update `zola@latest` to 0.19.1.
- Update `syft@latest` to 1.8.0.
## [2.41.3] - 2024-06-24
- Update `cargo-binstall@latest` to 1.7.3.
## [2.41.2] - 2024-06-23
- Update `typos@latest` to 1.22.9.
## [2.41.1] - 2024-06-22
- Update `typos@latest` to 1.22.8.
## [2.41.0] - 2024-06-21
- Support `knope`. ([#553](https://github.com/taiki-e/install-action/pull/553), thanks @jayvdb)
@@ -2376,7 +2398,12 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.41.0...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.41.5...HEAD
[2.41.5]: https://github.com/taiki-e/install-action/compare/v2.41.4...v2.41.5
[2.41.4]: https://github.com/taiki-e/install-action/compare/v2.41.3...v2.41.4
[2.41.3]: https://github.com/taiki-e/install-action/compare/v2.41.2...v2.41.3
[2.41.2]: https://github.com/taiki-e/install-action/compare/v2.41.1...v2.41.2
[2.41.1]: https://github.com/taiki-e/install-action/compare/v2.41.0...v2.41.1
[2.41.0]: https://github.com/taiki-e/install-action/compare/v2.40.2...v2.41.0
[2.40.2]: https://github.com/taiki-e/install-action/compare/v2.40.1...v2.40.2
[2.40.1]: https://github.com/taiki-e/install-action/compare/v2.40.0...v2.40.1

View File

@@ -22,32 +22,32 @@
},
"license_markdown": "[GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE)",
"latest": {
"version": "1.7.2"
"version": "1.7.3"
},
"1.7.2": {
"1.7.3": {
"x86_64_linux_musl": {
"etag": "0x8DC9117B0D35BB5",
"checksum": "08b6969c86471ecd1b9b6fbbd6508014d22dadda29fdd47ffb871d297ac49a8b"
"etag": "0x8DC9395574A8C69",
"checksum": "1dda17f293757b9f22b0669ca4471db3315ce01252ec6025f5859adbe00a77cf"
},
"x86_64_macos": {
"etag": "0x8DC911760808EC8",
"checksum": "7fa85fd3fda3c9e4962f16f8b9400e97ff2773e0481fc63a9cb882fe80115b7f"
"etag": "0x8DC9395170D1071",
"checksum": "5f899d270f78fd7798b4aa847a28fbb4eb6fddaa7209abb82fc2452ffbd85d2d"
},
"x86_64_windows": {
"etag": "0x8DC9118FAF6A549",
"checksum": "ee4da8bfaf25c84f0b67d5fd8e96f1243df4379f8dad64ffe2f82416198b7b35"
"etag": "0x8DC9396630C249A",
"checksum": "5f68171fdcbc96f7647ca6585ae4a94149a3abf84f9504146991c2d8f834350e"
},
"aarch64_linux_musl": {
"etag": "0x8DC9117827C4F23",
"checksum": "4342cfa8dc1033d2942270e8c4f7a63ef6953632ec3dbfacd7bebd4894e2ece8"
"etag": "0x8DC93952A779501",
"checksum": "52b5bda4920965a56b9936afa9cb5e90d2081799ad23f4a63f79b82baa0d70b8"
},
"aarch64_macos": {
"etag": "0x8DC9117A4F64EA0",
"checksum": "68157004ca95c2c3d4fae16246751317d2d6be32911cbdb04a06580d0c3aa43e"
"etag": "0x8DC93954D97DFC2",
"checksum": "ff87036ee1ae98bc953cfda9d30cdd7ab37357e82adbe0108bab09454224f172"
},
"aarch64_windows": {
"etag": "0x8DC9118BFC4D5AC",
"checksum": "baf1c6d5729b629015e199e7739a4f76bd40d9c4a90883ecb1d2c33c16240190"
"etag": "0x8DC939621E46FDD",
"checksum": "66d6252f41233962d00d196935b98974975ae4a62a6b0ca26e98d0b2ddc25fb8"
}
}
}

33
manifests/protoc.json generated
View File

@@ -3,13 +3,40 @@
"template": null,
"license_markdown": "[BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE)",
"latest": {
"version": "3.27.1"
"version": "3.27.2"
},
"3": {
"version": "3.27.1"
"version": "3.27.2"
},
"3.27": {
"version": "3.27.1"
"version": "3.27.2"
},
"3.27.2": {
"x86_64_linux_gnu": {
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-linux-x86_64.zip",
"etag": "0x8DC9550B6231BCD",
"checksum": "4a95e0ea2e51720af86a92f48d4997c8756923a9d0c58fd8a850657cd7479caf"
},
"x86_64_macos": {
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-osx-x86_64.zip",
"etag": "0x8DC9550B67D0B8E",
"checksum": "abc25a236571612d45eb4b6b6e6abe3ac9aecc34b195f76f248786844f5619c7"
},
"x86_64_windows": {
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-win64.zip",
"etag": "0x8DC9550B68E8419",
"checksum": "a1ea403f845ff4819163ac9da01b14d1d88056231f185f3d83fa7efe542e31f7"
},
"aarch64_linux_gnu": {
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-linux-aarch_64.zip",
"etag": "0x8DC9550B5DB4011",
"checksum": "ff4760bd4ae510d533e528cc6deb8e32e53f383f0ec01b0327233b4c2e8db314"
},
"aarch64_macos": {
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-osx-aarch_64.zip",
"etag": "0x8DC9550B65A4164",
"checksum": "877de17b5d2662b96e68a6e208cb1851437ab3e2b419c2ef5b7b873ffac5357d"
}
},
"3.27.1": {
"x86_64_linux_gnu": {

29
manifests/syft.json generated
View File

@@ -24,10 +24,35 @@
},
"license_markdown": "[Apache-2.0](https://github.com/anchore/syft/blob/main/LICENSE)",
"latest": {
"version": "1.7.0"
"version": "1.8.0"
},
"1": {
"version": "1.7.0"
"version": "1.8.0"
},
"1.8": {
"version": "1.8.0"
},
"1.8.0": {
"x86_64_linux_musl": {
"etag": "0x8DC94658785D869",
"checksum": "b487ee715e715e960f0d327b49ed9f5926b82bfa2f7283942f9631c41e7c0545"
},
"x86_64_macos": {
"etag": "0x8DC946588776645",
"checksum": "4ef1e2949ff85af2558d3e0ea94f78cc284a667ad790446460d7970757ebb353"
},
"x86_64_windows": {
"etag": "0x8DC94658880D18F",
"checksum": "984d41fc0d2a9c4b1e4f76a7fa0eb786dc35568e19b3cbea2e355644a9c693c6"
},
"aarch64_linux_musl": {
"etag": "0x8DC9465876AA6CF",
"checksum": "df764e35f3d6def7bafd87a9f4a0526c226ae70ec2d7262f6484840c35977f03"
},
"aarch64_macos": {
"etag": "0x8DC9465884D5141",
"checksum": "4bd5c905c8b751492ed95d486663b92757249a5f25526cbf480fd2b42fadf055"
}
},
"1.7": {
"version": "1.7.0"

42
manifests/typos.json generated
View File

@@ -16,13 +16,49 @@
},
"license_markdown": "[MIT](https://github.com/crate-ci/typos/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/crate-ci/typos/blob/master/LICENSE-APACHE)",
"latest": {
"version": "1.22.7"
"version": "1.22.9"
},
"1": {
"version": "1.22.7"
"version": "1.22.9"
},
"1.22": {
"version": "1.22.7"
"version": "1.22.9"
},
"1.22.9": {
"x86_64_linux_musl": {
"etag": "0x8DC92DF1EA8F56F",
"checksum": "01e336ec8fa9b15a35ecb899e7175bb69956272840e28daeeeea3d56de73f39a"
},
"x86_64_macos": {
"etag": "0x8DC92DF2CCE194B",
"checksum": "7bf1cb6710601519d3fb860db2f613e5f652693f42590739eaa0e2826e3ebf3e"
},
"x86_64_windows": {
"etag": "0x8DC92DF4F04D52B",
"checksum": "0f28edc8c5d611dc6eb773958a553a411d4728d8f14af77152926da5eedb5f05"
},
"aarch64_macos": {
"etag": "0x8DC92DF5CDB6DFA",
"checksum": "b7b742b28bab6b2022557a7fb9e2d9af9b78f131ea700cd3615cdfda0dda7b53"
}
},
"1.22.8": {
"x86_64_linux_musl": {
"etag": "0x8DC9221550C37C8",
"checksum": "4f919cc3a8ce9d0290e0d7923893dcdc37f3e5c7e29ed1f360484e35c2ec560b"
},
"x86_64_macos": {
"etag": "0x8DC92217C08D7BD",
"checksum": "bfc6d0369c4ec8e5d24a58d7ee0f4fd05c14f5de7506cf1cbd2c3d0742ff06fa"
},
"x86_64_windows": {
"etag": "0x8DC9221705C4AA4",
"checksum": "a0e1a80c2d6bf6226a20648cb82a58b0b272a0f414491d93b3a18a692f5b8d42"
},
"aarch64_macos": {
"etag": "0x8DC922172FCD647",
"checksum": "4a5677d83d72a93a25f426fab39ec9c747d47b8de25323bd2cf8fcad90a49ce1"
}
},
"1.22.7": {
"x86_64_linux_musl": {

22
manifests/zola.json generated
View File

@@ -16,10 +16,28 @@
},
"license_markdown": "[MIT](https://github.com/getzola/zola/blob/master/LICENSE)",
"latest": {
"version": "0.19.0"
"version": "0.19.1"
},
"0.19": {
"version": "0.19.0"
"version": "0.19.1"
},
"0.19.1": {
"x86_64_linux_gnu": {
"etag": "0x8DC949544635A86",
"checksum": "90b49041ccab8fbb6955914c41e72774771a6dcbd58936fb107aa8409cb44aa0"
},
"x86_64_macos": {
"etag": "0x8DC94956219151C",
"checksum": "fa7b14ab74dab6cd1f49948bb018a8f2c02c662144a25795c067dd482ac1fe7f"
},
"x86_64_windows": {
"etag": "0x8DC949675FDE404",
"checksum": "78517521b2db147428ec3f2a7b3a2f7a24d3901509bce56cff44d6de1d369c26"
},
"aarch64_macos": {
"etag": "0x8DC94960573E19B",
"checksum": "e867e04eb9af37726b6e1a8f72224ef80c2d307286f700cea5f2c21f63f8ebd5"
}
},
"0.19.0": {
"x86_64_linux_gnu": {

View File

@@ -7,7 +7,7 @@ use std::{
ffi::OsStr,
io::Read,
path::Path,
sync::{LazyLock, RwLock},
sync::{OnceLock, RwLock},
time::Duration,
};
@@ -649,38 +649,43 @@ struct GitHubTokens {
other: RwLock<Option<String>>,
}
impl GitHubTokens {
fn get(&self, url: &str) -> Option<String> {
// TODO: Use std::sync::LazyLock once 1.80 is released
fn get_github_tokens() -> &'static GitHubTokens {
static GITHUB_TOKENS: OnceLock<GitHubTokens> = OnceLock::new();
GITHUB_TOKENS.get_or_init(|| {
let token = env::var("GITHUB_TOKEN").ok().filter(|v| !v.is_empty());
GitHubTokens {
raw: RwLock::new(token.clone()),
api: RwLock::new(token.clone()),
other: RwLock::new(token),
}
})
}
fn get(url: &str) -> Option<String> {
if url.starts_with("https://raw.githubusercontent.com/") {
self.raw.read().unwrap().clone()
Self::get_github_tokens().raw.read().unwrap().clone()
} else if url.starts_with("https://api.github.com/") {
self.api.read().unwrap().clone()
Self::get_github_tokens().api.read().unwrap().clone()
} else if url.starts_with("https://github.com/") {
self.other.read().unwrap().clone()
Self::get_github_tokens().other.read().unwrap().clone()
} else {
None
}
}
fn clear(&self, url: &str) {
fn clear(url: &str) {
if url.starts_with("https://raw.githubusercontent.com/") {
*self.raw.write().unwrap() = None;
*Self::get_github_tokens().raw.write().unwrap() = None;
} else if url.starts_with("https://api.github.com/") {
*self.api.write().unwrap() = None;
*Self::get_github_tokens().api.write().unwrap() = None;
} else if url.starts_with("https://github.com/") {
*self.other.write().unwrap() = None;
*Self::get_github_tokens().other.write().unwrap() = None;
}
}
}
static GITHUB_TOKENS: LazyLock<GitHubTokens> = LazyLock::new(|| {
let token = env::var("GITHUB_TOKEN").ok().filter(|v| !v.is_empty());
GitHubTokens {
raw: RwLock::new(token.clone()),
api: RwLock::new(token.clone()),
other: RwLock::new(token),
}
});
fn download(url: &str) -> Result<ureq::Response> {
let mut token = GITHUB_TOKENS.get(url);
let mut token = GitHubTokens::get(url);
let mut retry = 0;
let mut retry_time = 0;
let mut max_retry = 6;
@@ -702,7 +707,7 @@ fn download(url: &str) -> Result<ureq::Response> {
retry_time = 0;
token = None;
// rate limit
GITHUB_TOKENS.clear(url);
GitHubTokens::clear(url);
}
retry += 1;
if retry > max_retry {
@@ -716,7 +721,7 @@ fn download(url: &str) -> Result<ureq::Response> {
fn github_head(url: &str) -> Result<()> {
eprintln!("fetching head of {url} ..");
let mut token = GITHUB_TOKENS.get(url);
let mut token = GitHubTokens::get(url);
let mut retry = 0;
let mut retry_time = 0;
let mut max_retry = 2;
@@ -739,7 +744,7 @@ fn github_head(url: &str) -> Result<()> {
if token.is_some() && retry == max_retry / 2 {
retry_time = 0;
token = None;
GITHUB_TOKENS.clear(url);
GitHubTokens::clear(url);
}
retry += 1;
if retry > max_retry {

View File

@@ -10,11 +10,11 @@ cd "$(dirname "$0")"/..
# ./tools/manifest.sh [PACKAGE [VERSION_REQ]]
if [[ $# -gt 0 ]]; then
cargo +nightly run --manifest-path tools/codegen/Cargo.toml --release -- "$@"
cargo run --manifest-path tools/codegen/Cargo.toml --release -- "$@"
exit 0
fi
for manifest in tools/codegen/base/*.json; do
package=$(basename "${manifest%.*}")
cargo +nightly run --manifest-path tools/codegen/Cargo.toml --release -- "${package}" latest
cargo run --manifest-path tools/codegen/Cargo.toml --release -- "${package}" latest
done