Skip to content

Commit c9507a2

Browse files
committed
Merge branch 'develop' into lwip_deps
2 parents b97b304 + c871e75 commit c9507a2

File tree

1,073 files changed

+377201
-66851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,073 files changed

+377201
-66851
lines changed

.bazelignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Don't accidentally pick up external CMake deps with Bazel build files.
2+
build
3+
# Don't treat submodules as part of this project.
4+
lib

.bazelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Silence all C/C++ warnings in external code.
2+
common --per_file_copt=external/.*@-w
3+
common --host_per_file_copt=external/.*@-w
4+
5+
# Produce useful output when the build fails.
6+
common --verbose_failures

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.2.1

.github/workflows/bazel_build.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Bazel presubmit checks
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
bazel-build-check:
9+
strategy:
10+
matrix:
11+
# TODO: Windows is currently broken.
12+
os: [ubuntu-latest, macos-latest]
13+
fail-fast: false
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Get Bazel
21+
uses: bazel-contrib/[email protected]
22+
with:
23+
# Avoid downloading Bazel every time.
24+
bazelisk-cache: true
25+
# Store build cache per workflow.
26+
disk-cache: ${{ github.workflow }}
27+
# Share repository cache between workflows.
28+
repository-cache: true
29+
# Only needed to drive the presbumit scripts.
30+
- name: Setup Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.10'
34+
- name: Fetch latest Picotool
35+
uses: actions/checkout@v4
36+
with:
37+
repository: raspberrypi/picotool
38+
ref: develop
39+
fetch-depth: 0
40+
path: lib/picotool
41+
- name: Full Bazel build with develop Picotool
42+
run: python3 tools/run_all_bazel_checks.py --program=build --picotool-dir=lib/picotool
43+
# Checks that the current BCR-requested version of Picotool builds.
44+
- name: Bazel Picotool backwards compatibility
45+
run: bazel build @picotool//:picotool
46+
other-bazel-checks:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 0
53+
- name: Get Bazel
54+
uses: bazel-contrib/[email protected]
55+
with:
56+
# Avoid downloading Bazel every time.
57+
bazelisk-cache: true
58+
# Store build cache per workflow.
59+
disk-cache: ${{ github.workflow }}
60+
# Share repository cache between workflows.
61+
repository-cache: true
62+
# Only needed to drive the presbumit scripts.
63+
- name: Setup Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.10'
67+
- name: Fetch latest Picotool
68+
uses: actions/checkout@v4
69+
with:
70+
repository: raspberrypi/picotool
71+
ref: develop
72+
fetch-depth: 0
73+
path: lib/picotool
74+
- name: Other Bazel checks
75+
run: python3 tools/run_all_bazel_checks.py --program=other --picotool-dir=lib/picotool
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="gcc-arm-embedded" version="10.2.1" />
4-
<package id="cmake" version="3.25.2" installArguments="ADD_CMAKE_TO_PATH=System" />
54
<package id="mingw" version="12.2.0" />
65
<package id="ninja" version="1.11.1" />
76
</packages>

.github/workflows/cmake.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: CMake
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'iar/**'
6+
pull_request:
37

48
env:
59
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
610
BUILD_TYPE: Release
711

812
jobs:
913
build:
10-
if: github.repository_owner == 'raspberrypi'
14+
# cannot specify filter for pull_request in on: above, so do it here
15+
if: github.repository_owner == 'raspberrypi' && (github.event_name != 'pull_request' || !startsWith(github.head_ref, 'iar/'))
1116
runs-on: [self-hosted, Linux, X64]
1217

1318
steps:
@@ -18,7 +23,7 @@ jobs:
1823
mkdir -p "${{ github.workspace }}"
1924
2025
- name: Checkout repo
21-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
2227

2328
- name: Checkout submodules
2429
run: git submodule update --init
@@ -33,17 +38,13 @@ jobs:
3338
# access regardless of the host operating system
3439
shell: bash
3540
working-directory: ${{github.workspace}}/build
36-
# Note the current convention is to use the -S and -B options here to specify source
37-
# and build directories, but this is only available with CMake 3.13 and higher.
41+
# Note the current convention is to use the -S and -B options here to specify source
42+
# and build directories, but this is only available with CMake 3.13 and higher.
3843
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
3944
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_SDK_TESTS_ENABLED=1
4045

41-
- name: Get core count
42-
id: core_count
43-
run : cat /proc/cpuinfo | grep processor | wc -l
44-
4546
- name: Build
4647
working-directory: ${{github.workspace}}/build
4748
shell: bash
4849
# Execute the build. You can specify a specific target with "--target <NAME>"
49-
run: cmake --build . --config $BUILD_TYPE --parallel ${{steps.core_count.outputs.output}}
50+
run: cmake --build . --config $BUILD_TYPE --parallel $(nproc)

.github/workflows/macOS.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build on macOS
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'develop'
7+
- 'master'
8+
- 'test_workflow'
9+
10+
jobs:
11+
build:
12+
runs-on: macos-latest
13+
steps:
14+
- name: Clean workspace
15+
run: |
16+
echo "Cleaning up previous run"
17+
rm -rf "${{ github.workspace }}"
18+
mkdir -p "${{ github.workspace }}"
19+
- name: Checkout repo
20+
uses: actions/checkout@v4
21+
- name: Checkout submodules
22+
run: git submodule update --init
23+
- name: Install dependencies
24+
run: |
25+
brew install cmake
26+
brew install --cask gcc-arm-embedded
27+
28+
- name: Build Project
29+
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
30+
shell: bash
31+
run: |
32+
mkdir build
33+
cd build
34+
cmake .. -G "Unix Makefiles" -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=pico_w
35+
cmake --build .
36+
37+
- name: Build Native
38+
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
39+
shell: bash
40+
run: |
41+
mkdir build_native
42+
cd build_native
43+
cmake .. -G "Unix Makefiles" -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=host
44+
cmake --build .

0 commit comments

Comments
 (0)