Skip to content

Commit

Permalink
[EXP] Attempt to fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
fhanau committed Jan 25, 2025
1 parent 8519d5e commit 7333393
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 45 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ jobs:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: ~/bazel-disk-cache
key: bazel-disk-cache-${{ inputs.os_name }}-${{ runner.arch }}${{ inputs.suffix }}-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE') }}
# Intentionally not reusing an older cache entry using a key prefix, bazel frequently
# ends up with a larger cache at the end when starting with an available cache entry,
# resulting in a snowballing cache size and cache download/upload times.
- name: Setup Linux
if: inputs.os_name == 'linux' || inputs.os_name == 'linux-arm'
# Install dependencies, including clang through the LLVM APT repository. We drop the
Expand Down Expand Up @@ -88,34 +79,3 @@ jobs:
if: inputs.run_tests
run: |
bazel test --config=ci --config=ci-${{ inputs.os_name }}${{ inputs.suffix }} --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.devprod.cloudflare.dev ${{ inputs.extra_bazel_args }} //...
- name: Report disk usage (in MB)
if: always()
shell: bash
run: |
BAZEL_OUTPUT_BASE=$(bazel info output_base)
BAZEL_REPOSITORY_CACHE=$(bazel info repository_cache)
echo "Bazel cache usage statistics"
du -ms -t 1 ~/bazel-disk-cache/* $BAZEL_REPOSITORY_CACHE
echo "Bazel output usage statistics"
du -ms -t 1 $BAZEL_OUTPUT_BASE
echo "Workspace usage statistics"
du -ms -t 1 $GITHUB_WORKSPACE
- name: Drop large Bazel cache files
if: always()
# Github has a nominal 10GB of storage for all cached builds associated with a project.
# Drop large files (>100MB) in our cache to improve shared build cache efficiency. This is
# particularly helpful for asan and debug builds that produce larger executables. Also
# the process of saving the Bazel disk cache generates a tarball on the runners disk, and
# it is possible to run out of storage in that process (does not fail the workflow).
shell: bash
run: |
if [ -d ~/bazel-disk-cache ]; then
find ~/bazel-disk-cache -size +100M -type f -exec rm {} \;
echo "Trimmed Bazel cache usage statistics"
du -ms -t 1 ~/bazel-disk-cache/*
else
echo "Disk cache does not exist: ~/bazel-disk-cache"
fi
- name: Bazel shutdown
# Check that there are no .bazelrc issues that prevent shutdown.
run: bazel shutdown
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
os_name: ${{ matrix.os.name }}
suffix: ${{ matrix.config.suffix }}
# TODO: Debug Windows issues
extra_bazel_args: "--remote_download_all --noexperimental_inprocess_symlink_creation"
extra_bazel_args: "--remote_download_all --noexperimental_inprocess_symlink_creation --@aspect_rules_ts//ts:skipLibCheck=always"
secrets:
BAZEL_CACHE_KEY: ${{ secrets.BAZEL_CACHE_KEY }}
WORKERS_MIRROR_URL: ${{ secrets.WORKERS_MIRROR_URL }}
Expand Down
2 changes: 1 addition & 1 deletion src/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ wd_ts_bundle(
]),
schema_id = "0xbcc8f57c63814005",
tsconfig_json = "tsconfig.json",
deps = ["//:node_modules/@types/node"],
deps = ["//:node_modules/@types"],
)
1 change: 0 additions & 1 deletion src/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"esModuleInterop": true,
"moduleResolution": "node",
"declaration": true,
"types": ["@types/node"],
"paths": {
"node:*": ["./*"],
"node:assert/*": ["./*"],
Expand Down
2 changes: 1 addition & 1 deletion src/wpt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ts_project(
tsconfig = "tsconfig.json",
visibility = ["//visibility:public"],
deps = [
"//:node_modules/@types/node",
"//:node_modules/@types",
],
)

Expand Down
5 changes: 4 additions & 1 deletion src/wpt/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"declaration": true,
"paths": {
"wpt:*": ["./*"]
}
},
"baseUrl": ".",
"rootDir": ".",
"types": ["node"]
},
"exclude": []
}

0 comments on commit 7333393

Please sign in to comment.