Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 32 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ jobs:
- name: Check out repository
uses: actions/checkout@v6

- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-go-quality
- name: Set up Bazelisk
shell: bash
run: |
bazelisk_dir="${RUNNER_TEMP}/bazelisk"
mkdir -p "${bazelisk_dir}"
curl -fsSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.29.0/bazelisk-linux-amd64" -o "${bazelisk_dir}/bazel"
printf '%s %s\n' '5a408715e932c0250d28bd84555f12edbf70117de42f9181691c736eacc4a992' "${bazelisk_dir}/bazel" | sha256sum -c -
chmod +x "${bazelisk_dir}/bazel"
echo "${bazelisk_dir}" >> "${GITHUB_PATH}"

- name: Check formatting
run: |
Expand Down Expand Up @@ -72,11 +76,29 @@ jobs:
- name: Check out repository
uses: actions/checkout@v6

- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-integration-${{ matrix.platform }}
- name: Set up Bazelisk
shell: bash
run: |
case "${RUNNER_OS}-${RUNNER_ARCH}" in
Linux-X64) asset="bazelisk-linux-amd64"; sha256="5a408715e932c0250d28bd84555f12edbf70117de42f9181691c736eacc4a992" ;;
Linux-ARM64) asset="bazelisk-linux-arm64"; sha256="e20e8b0f4f240091b7a55bf17b9398bd4f40ee70ae0208dff95dd4c445fb4010" ;;
macOS-X64) asset="bazelisk-darwin-amd64"; sha256="16c3d7aa15323a9fb69f56c7ec5733ed18bedb786680d0ba13bb12a3c8083007" ;;
macOS-ARM64) asset="bazelisk-darwin-arm64"; sha256="cee851f726789227d5561004e9904a52be45c3efb56f8b38b6993d6adbaa0409" ;;
Windows-X64) asset="bazelisk-windows-amd64.exe"; sha256="092a8738d5b41aae7a85c42cc961b1034e3389aba43ffc20c0fabda7b43e095b" ;;
*) echo "Unsupported runner: ${RUNNER_OS}-${RUNNER_ARCH}" >&2; exit 1 ;;
esac
bazelisk_dir="${RUNNER_TEMP//\\//}/bazelisk"
mkdir -p "${bazelisk_dir}"
executable=bazel
if [[ "${RUNNER_OS}" == Windows ]]; then executable=bazel.exe; fi
curl -fsSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.29.0/${asset}" -o "${bazelisk_dir}/${executable}"
if [[ "${RUNNER_OS}" == macOS ]]; then
printf '%s %s\n' "${sha256}" "${bazelisk_dir}/${executable}" | shasum -a 256 -c -
else
printf '%s %s\n' "${sha256}" "${bazelisk_dir}/${executable}" | sha256sum -c -
fi
chmod +x "${bazelisk_dir}/${executable}"
echo "${bazelisk_dir}" >> "${GITHUB_PATH}"

- name: Test integration
run: |
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,29 @@ jobs:
- name: Check out tag
uses: actions/checkout@v6

- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-${{ matrix.platform }}
- name: Set up Bazelisk
shell: bash
run: |
case "${RUNNER_OS}-${RUNNER_ARCH}" in
Linux-X64) asset="bazelisk-linux-amd64"; sha256="5a408715e932c0250d28bd84555f12edbf70117de42f9181691c736eacc4a992" ;;
Linux-ARM64) asset="bazelisk-linux-arm64"; sha256="e20e8b0f4f240091b7a55bf17b9398bd4f40ee70ae0208dff95dd4c445fb4010" ;;
macOS-X64) asset="bazelisk-darwin-amd64"; sha256="16c3d7aa15323a9fb69f56c7ec5733ed18bedb786680d0ba13bb12a3c8083007" ;;
macOS-ARM64) asset="bazelisk-darwin-arm64"; sha256="cee851f726789227d5561004e9904a52be45c3efb56f8b38b6993d6adbaa0409" ;;
Windows-X64) asset="bazelisk-windows-amd64.exe"; sha256="092a8738d5b41aae7a85c42cc961b1034e3389aba43ffc20c0fabda7b43e095b" ;;
*) echo "Unsupported runner: ${RUNNER_OS}-${RUNNER_ARCH}" >&2; exit 1 ;;
esac
bazelisk_dir="${RUNNER_TEMP//\\//}/bazelisk"
mkdir -p "${bazelisk_dir}"
executable=bazel
if [[ "${RUNNER_OS}" == Windows ]]; then executable=bazel.exe; fi
curl -fsSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.29.0/${asset}" -o "${bazelisk_dir}/${executable}"
if [[ "${RUNNER_OS}" == macOS ]]; then
printf '%s %s\n' "${sha256}" "${bazelisk_dir}/${executable}" | shasum -a 256 -c -
else
printf '%s %s\n' "${sha256}" "${bazelisk_dir}/${executable}" | sha256sum -c -
fi
chmod +x "${bazelisk_dir}/${executable}"
echo "${bazelisk_dir}" >> "${GITHUB_PATH}"

- name: Test integration
shell: bash
Expand Down
Loading