Reduce release helper build time.
This commit is contained in:
@@ -39,7 +39,7 @@ jobs:
|
|||||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||||
GITEA_SHA: ${{ gitea.sha }}
|
GITEA_SHA: ${{ gitea.sha }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
run: cargo +${RUST_TOOLCHAIN} run --release --locked --package bds-release -- prepare
|
run: cargo +${RUST_TOOLCHAIN} run --locked --package bds-release -- prepare
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
needs: prepare-release
|
needs: prepare-release
|
||||||
@@ -88,7 +88,7 @@ jobs:
|
|||||||
cargo +${RUST_TOOLCHAIN} zigbuild --release --locked --target "$build_target" \
|
cargo +${RUST_TOOLCHAIN} zigbuild --release --locked --target "$build_target" \
|
||||||
--package bds-ui --package bds-cli --package bds-mcp
|
--package bds-ui --package bds-cli --package bds-mcp
|
||||||
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
||||||
cargo +${RUST_TOOLCHAIN} run --release --locked --package bds-release -- package \
|
cargo +${RUST_TOOLCHAIN} run --locked --package bds-release -- package \
|
||||||
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" "$platform" dist --upload
|
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" "$platform" dist --upload
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ jobs:
|
|||||||
cargo +${RUST_TOOLCHAIN} build --release --locked --target "$target" \
|
cargo +${RUST_TOOLCHAIN} build --release --locked --target "$target" \
|
||||||
--package bds-ui --package bds-cli --package bds-mcp
|
--package bds-ui --package bds-cli --package bds-mcp
|
||||||
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
||||||
cargo +${RUST_TOOLCHAIN} run --release --locked --package bds-release -- package \
|
cargo +${RUST_TOOLCHAIN} run --locked --package bds-release -- package \
|
||||||
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" linux-arm64 dist --upload
|
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" linux-arm64 dist --upload
|
||||||
|
|
||||||
build-linux-x64:
|
build-linux-x64:
|
||||||
@@ -167,7 +167,7 @@ jobs:
|
|||||||
cargo +${RUST_TOOLCHAIN} build --release --locked --target "$target" \
|
cargo +${RUST_TOOLCHAIN} build --release --locked --target "$target" \
|
||||||
--package bds-ui --package bds-cli --package bds-mcp
|
--package bds-ui --package bds-cli --package bds-mcp
|
||||||
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
||||||
cargo +${RUST_TOOLCHAIN} run --release --locked --package bds-release -- package \
|
cargo +${RUST_TOOLCHAIN} run --locked --package bds-release -- package \
|
||||||
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" linux-x64 dist --upload
|
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" linux-x64 dist --upload
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
@@ -206,7 +206,7 @@ jobs:
|
|||||||
cargo +${RUST_TOOLCHAIN} xwin build --release --locked --target "$target" \
|
cargo +${RUST_TOOLCHAIN} xwin build --release --locked --target "$target" \
|
||||||
--package bds-ui --package bds-cli --package bds-mcp
|
--package bds-ui --package bds-cli --package bds-mcp
|
||||||
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
rust_lib_dir=$(rustc +${RUST_TOOLCHAIN} --target "$target" --print target-libdir)
|
||||||
cargo +${RUST_TOOLCHAIN} run --release --locked --package bds-release -- package \
|
cargo +${RUST_TOOLCHAIN} run --locked --package bds-release -- package \
|
||||||
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" windows-x64 dist --upload
|
"$GITEA_REF_NAME" "target/$target/release" "$rust_lib_dir" windows-x64 dist --upload
|
||||||
|
|
||||||
publish-release:
|
publish-release:
|
||||||
@@ -234,4 +234,4 @@ jobs:
|
|||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
RELEASE_ID: ${{ needs.prepare-release.outputs.release_id }}
|
RELEASE_ID: ${{ needs.prepare-release.outputs.release_id }}
|
||||||
run: cargo +${RUST_TOOLCHAIN} run --release --locked --package bds-release -- publish
|
run: cargo +${RUST_TOOLCHAIN} run --locked --package bds-release -- publish
|
||||||
|
|||||||
@@ -143,6 +143,10 @@ fn tagged_releases_are_built_and_packaged_with_rust_tools() {
|
|||||||
"release workflow must not use host tool {forbidden}"
|
"release workflow must not use host tool {forbidden}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
assert!(
|
||||||
|
!workflow.contains("run --release --locked --package bds-release"),
|
||||||
|
"the release helper itself must stay unoptimized so cold runner jobs remain practical"
|
||||||
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
workflow
|
workflow
|
||||||
.matches("actions-rust-lang/setup-rust-toolchain@v1")
|
.matches("actions-rust-lang/setup-rust-toolchain@v1")
|
||||||
|
|||||||
Reference in New Issue
Block a user