Skip to content

Commit

Permalink
Use setup-bazel action in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr committed Aug 18, 2024
1 parent c927e05 commit b7041df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,16 @@ jobs:
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Mount bazel cache
uses: actions/cache@v1
- name: Setup Bazel
uses: bazel-contrib/[email protected]
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: Install bazel
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Test
run: |
"${GITHUB_WORKSPACE}/bin/bazel" test //...
run: bazelisk test //...
- name: Build
run: |
"${GITHUB_WORKSPACE}/bin/bazel" build //...
run: bazelisk build //...
1 change: 1 addition & 0 deletions mapstruct-on-bazel/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.0

0 comments on commit b7041df

Please sign in to comment.