Skip to content

Commit

Permalink
Merge pull request #67 from VSuryaprasad-HCL/B1
Browse files Browse the repository at this point in the history
Workflow
  • Loading branch information
VSuryaprasad-HCL authored Jan 9, 2025
2 parents 375a26a + 50a95b0 commit 5ba2251
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
Bazel Build and Test Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down


name: "build"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Bazel Build and Test
Expand All @@ -15,10 +20,10 @@ jobs:
BAZEL_CACHE_URL: pins-bazel-cache.onf.dev:9090

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Mount bazel cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
# See https://docs.bazel.build/versions/master/output_directories.html
path: "/tmp/repo-cache"
Expand All @@ -40,4 +45,12 @@ jobs:
# Authentication is enabled for R/W access for builds on main and branch PRs
# Unauthenticated reads are allowed for PRs from forks
- name: Build and Test
run: bazel build ...
run: |
mkdir -p /tmp/repo-cache
BAZEL_OPTS="--repository_cache=/tmp/repo-cache"
[ ! -z "$BAZEL_CACHE_USER" ] && [ ! -z "$BAZEL_CACHE_PWD" ] && \
AUTH="${BAZEL_CACHE_USER}:${BAZEL_CACHE_PWD}@"
BAZEL_OPTS+=" --remote_cache=https://${AUTH}${BAZEL_CACHE_URL}"
BAZEL_OPTS+=" --remote_download_minimal"
bazel build ${BAZEL_OPTS} //...
bazel test ${BAZEL_OPTS} //...

0 comments on commit 5ba2251

Please sign in to comment.