Skip to content

Change the permission of a release script #11

Change the permission of a release script

Change the permission of a release script #11

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@v4
# Cache build artifacts so that the next ci build is incremental.
# Because github action caches cannot be updated after a build, we need to
# store the contents of each build in a unique cache key, then fall back to loading
# it on the next ci run. We use hashFiles(...) in the key and restore-keys- with
# the prefix to load the most recent cache for the branch on a cache miss. You
# should customize the contents of hashFiles to capture any bazel input sources,
# although this doesn't need to be perfect. If none of the input sources change
# then a cache hit will load an existing cache and bazel won't have to do any work.
# In the case of a cache miss, you want the fallback cache to contain most of the
# previously built artifacts to minimize build time. The more precise you are with
# hashFiles sources the less work bazel will have to do.
# We do not cache downloaded external artifacts as these are generally
# faster to download again than to fetch them from the GitHub actions
# cache.
- name: Mount bazel caches
uses: actions/cache@v4
with:
path: |
~/.cache/bazel-disk-cache
~/.cache/bazel-repository-cache
~/.cache/xdg-cache
key: >-
bazel-cache-${{ matrix.os }}-
${{ hashFiles('.bazelrc', '.bazelversion', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', 'MODULE.bazel.lock') }}
restore-keys: |
bazel-cache-${{ matrix.os }}-
# See https://github.com/bazel-contrib/publish-to-bcr#including-patches
- name: verify bcr patches
if: hashFiles('.bcr/patches/*.patch') != ''
run: patch --dry-run -p1 < .bcr/patches/*.patch
- name: bazel test //...
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //...
env:
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: 1
# bazelisk will download bazel to here
XDG_CACHE_HOME: ~/.cache/xdg-cache