Skip to content

Commit

Permalink
add windows release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sluongng committed Jan 18, 2024
1 parent 79f3fdb commit 16ee561
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-windows-github-release-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Build Windows Github Release Artifacts"

on:
# Development only
# TODO: remove this
pull_request:
branches:
- master
workflow_dispatch:
inputs:
release_branch:
description: "Git branch to checkout."
required: true
default: "master"
type: string
version_tag:
description: "Version to tag release artifacts."
required: true
type: string
workflow_call:
inputs:
release_branch:
description: "Git branch to checkout."
required: true
type: string
version_tag:
description: "Version to tag release artifacts."
required: true
type: string

jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.release_branch }}
# We need to fetch git tags to obtain the latest version tag to report
# the version of the running binary.
fetch-depth: 0

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-windows-amd64.exe"
mkdir -p "${GITHUB_WORKSPACE}\bin\"
mv bazelisk-windows-amd64.exe "${GITHUB_WORKSPACE}\bin\bazel.exe"
- name: Build and Upload Artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
"${GITHUB_WORKSPACE}\bin\bazel" build --config=release --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_ORG_API_KEY }} //enterprise/server/cmd/executor:executor
# cp bazel-bin/server/cmd/**/**/buildbuddy buildbuddy-linux-amd64
# cp bazel-bin/enterprise/server/cmd/**/**/buildbuddy buildbuddy-enterprise-linux-amd64
# cp bazel-bin/enterprise/server/cmd/**/**/executor executor-enterprise-linux-amd64
# gh release upload ${{ inputs.version_tag }} buildbuddy-linux-amd64 buildbuddy-enterprise-linux-amd64 executor-enterprise-linux-amd64 --clobber
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ var (
chunkFileSizeBytes = flag.Int("storage.chunk_file_size_bytes", 3_000_000 /* 3 MB */, "How many bytes to buffer in memory before flushing a chunk of build protocol data to disk.")
enableChunkedEventLogs = flag.Bool("storage.enable_chunked_event_logs", false, "If true, Event logs will be stored separately from the invocation proto in chunks.")
disablePersistArtifacts = flag.Bool("storage.disable_persist_cache_artifacts", false, "If disabled, buildbuddy will not persist cache artifacts in the blobstore. This may make older invocations not diaplay properly.")
writeToOLAPDBEnabled = flag.Bool("app.enable_write_to_olap_db", true, "If enabled, complete invocations will be flushed to OLAP DB")

cacheStatsFinalizationDelay = flag.Duration("cache_stats_finalization_delay", 500*time.Millisecond, "The time allowed for all metrics collectors across all apps to flush their local cache stats to the backing storage, before finalizing stats in the DB.")
)
Expand Down Expand Up @@ -306,7 +305,7 @@ func (r *statsRecorder) lookupInvocation(ctx context.Context, ij *invocationJWT)
}

func (r *statsRecorder) flushInvocationStatsToOLAPDB(ctx context.Context, ij *invocationJWT) error {
if r.env.GetOLAPDBHandle() == nil || !*writeToOLAPDBEnabled {
if r.env.GetOLAPDBHandle() == nil {
return nil
}
inv, err := r.lookupInvocation(ctx, ij)
Expand Down

0 comments on commit 16ee561

Please sign in to comment.