diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ddc005..8a9055c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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/setup-bazel@0.8.5 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 //... diff --git a/mapstruct-on-bazel/.bazelversion b/mapstruct-on-bazel/.bazelversion new file mode 100644 index 0000000..9084fa2 --- /dev/null +++ b/mapstruct-on-bazel/.bazelversion @@ -0,0 +1 @@ +1.1.0