Skip to content

Commit

Permalink
chore: align ci patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed May 13, 2024
1 parent cc55d5c commit d7e29e9
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 32 deletions.
1 change: 1 addition & 0 deletions .aspect/bazelrc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user.bazelrc
6 changes: 3 additions & 3 deletions .aspect/workflows/bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build without the bytes
test --remote_download_minimal
test --nobuild_runfile_links
common --remote_download_outputs=minimal
common --nobuild_runfile_links

# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
test --test_env=XDG_CACHE_HOME
common --test_env=XDG_CACHE_HOME
6 changes: 0 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ import %workspace%/.aspect/bazelrc/performance.bazelrc

### YOUR PROJECT SPECIFIC SETTINGS GO HERE ###

# Runfiles still required for Windows in this repository despite not
# being strictly necessary for rules_js support with
# https://github.com/aspect-build/rules_js/pull/1428 landed.
# TODO: fix broken targets on Windows and remove this flag
build --enable_runfiles

# Don’t want to push a rules author to update their deps if not needed.
# https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies
# https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
common --disk_cache=~/.cache/bazel-disk-cache
common --repository_cache=~/.cache/bazel-repository-cache

# Bazel version specific settings
common:bazel6 --build_tag_filters=-skip-on-bazel6
common:bazel6 --test_tag_filters=-skip-on-bazel6
common:bazel7 --build_tag_filters=-skip-on-bazel7
common:bazel7 --test_tag_filters=-skip-on-bazel7
# Debug where options came from
common --announce_rc

# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
common --test_env=XDG_CACHE_HOME

# Runfiles still required for Windows in this repository despite not
# being strictly necessary for rules_js support with
# https://github.com/aspect-build/rules_js/pull/1428 landed.
# TODO: fix broken targets on Windows and remove this flag
build --enable_runfiles
common --enable_runfiles
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
~/.cache/bazel-disk-cache
~/.cache/bazel-repository-cache
~/.cache/xdg-cache
key: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', 'MODULE.bazel.lock') }}
key: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}
restore-keys: bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-

- name: Configure Bazel version
Expand Down Expand Up @@ -119,7 +119,8 @@ jobs:
--bazelrc=${GITHUB_WORKSPACE//\\/\/}/.aspect/bazelrc/ci.bazelrc \
--bazelrc=${GITHUB_WORKSPACE//\\/\/}/.github/workflows/ci.bazelrc \
test \
--config=bazel${{ matrix.bazel-version.major }} \
--test_tag_filters=-skip-on-bazel${{ matrix.bazel-version.major }} \
--build_tag_filters=-skip-on-bazel${{ matrix.bazel-version.major }} \
--enable_bzlmod=${{ matrix.bzlmod }} \
//...
env:
Expand Down
21 changes: 12 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
bazel-*
**/.terraform/*
.bazelrc.user
node_modules/
.pnpm-*

.idea/
.ijwb/
node_modules
.vscode
.DS_Store

# Don't commit lockfile for now as it is unstable. Do allow for it to be
# created, however, since it gives a performance boost for local development.
# https://github.com/bazelbuild/bazel/issues/19026
# https://github.com/bazelbuild/bazel/issues/19621
# https://github.com/bazelbuild/bazel/issues/19971
# https://github.com/bazelbuild/bazel/issues/20272
# https://github.com/bazelbuild/bazel/issues/20369
# Bazel's MODULE lockfile isn't ready to check in yet as of Bazel 7.1.
# Do allow for it to be created, however, since it gives a performance boost for local development.
# [Store resolved repository attributes in the Bzlmod lockfile](https://github.com/bazelbuild/bazel/issues/19026)
# [MODULE.bazel.lock file contains user specific paths](https://github.com/bazelbuild/bazel/issues/19621)
# [Consider skipping bazel_tools@_ from lockfile](https://github.com/bazelbuild/bazel/issues/19971)
# [MODULE.bazel.lock file "reads through" already-locked package manager](https://github.com/bazelbuild/bazel/issues/20272)
# [moduleFileHash in MODULE.bazel.lock causes frequent Git merge conflicts](https://github.com/bazelbuild/bazel/issues/20369)
MODULE.bazel.lock
15 changes: 15 additions & 0 deletions e2e/jasmine_test/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Import Aspect bazelrc presets
try-import %workspace%/../../.aspect/bazelrc/bazel7.bazelrc
import %workspace%/../../.aspect/bazelrc/convenience.bazelrc
import %workspace%/../../.aspect/bazelrc/correctness.bazelrc
import %workspace%/../../.aspect/bazelrc/debug.bazelrc
import %workspace%/../../.aspect/bazelrc/javascript.bazelrc
import %workspace%/../../.aspect/bazelrc/performance.bazelrc

### YOUR PROJECT SPECIFIC OPTIONS GO HERE ###

# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`.
# This file should appear in `.gitignore` so that settings are not shared with team members. This
# should be last statement in this config so the user configuration is able to overwrite flags from
# this file. See https://bazel.build/configure/best-practices#bazelrc-file.
try-import %workspace%/../../.aspect/bazelrc/user.bazelrc
21 changes: 15 additions & 6 deletions e2e/smoke/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# rules_js needs to create symlinks to build the runfiles tree.
# Creating symlinks on Windows requires one of the following:
# 1. Bazel is run with administrator privileges.
# 2. The system version is Windows 10 Creators Update (1703) or later
# and developer mode is enabled.
build --enable_runfiles
# Import Aspect bazelrc presets
try-import %workspace%/../../.aspect/bazelrc/bazel7.bazelrc
import %workspace%/../../.aspect/bazelrc/convenience.bazelrc
import %workspace%/../../.aspect/bazelrc/correctness.bazelrc
import %workspace%/../../.aspect/bazelrc/debug.bazelrc
import %workspace%/../../.aspect/bazelrc/javascript.bazelrc
import %workspace%/../../.aspect/bazelrc/performance.bazelrc

### YOUR PROJECT SPECIFIC OPTIONS GO HERE ###

# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`.
# This file should appear in `.gitignore` so that settings are not shared with team members. This
# should be last statement in this config so the user configuration is able to overwrite flags from
# this file. See https://bazel.build/configure/best-practices#bazelrc-file.
try-import %workspace%/../../.aspect/bazelrc/user.bazelrc

0 comments on commit d7e29e9

Please sign in to comment.