Skip to content

Commit

Permalink
Fixes and add presubmit (#166)
Browse files Browse the repository at this point in the history
* Fix Bazel build and add presubmit checks

Fixes a variable name and adds Bazel presubmit checks to ensure the
Bazel build stays healthy.

* Remove Windows from presubmit checks for now

MSVC is tripping up on statement expressions in timer.h.
  • Loading branch information
armandomontanez authored Nov 5, 2024
1 parent f41f7fa commit a86abb7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/pico-sdk
36 changes: 36 additions & 0 deletions .github/workflows/bazel_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Bazel presubmit checks

on:
push:
pull_request:

jobs:
bazel-build-check:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Bazel
uses: bazel-contrib/[email protected]
with:
# 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: Fetch latest Pico SDK
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
ref: develop
fetch-depth: 0
path: lib/pico-sdk
- name: Bazel Picotool with develop pico-sdk
run: bazel build @picotool//:picotool --override_module=pico-sdk=lib/pico-sdk
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ cc_binary(
],
}),
defines = [
'PICOTOOL_VERSION=\\"{}\\"'.format(PICOTOOL_VERSION_STRING),
'PICOTOOL_VERSION=\\"{}\\"'.format(PICOTOOL_SDK_VERSION_STRING),
'SYSTEM_VERSION=\\"host\\"',
'COMPILER_INFO=\\"local\\"',
"SUPPORT_A0=0",
Expand Down

0 comments on commit a86abb7

Please sign in to comment.