Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NickGuyver committed Jun 20, 2023
2 parents 34e8f83 + 3e7e0aa commit 4f20f62
Show file tree
Hide file tree
Showing 97 changed files with 10,235 additions and 21,136 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
120 changes: 60 additions & 60 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
name: CMake

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
pull_request_target:
branches: [ "main" ]
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
call-node-workflow:
uses: ./.github/workflows/node.js.yml
build:
needs: call-node-workflow
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
strategy:
matrix:
GP2040_BOARDCONFIG: [Pico, BentoBox, DURAL, FightboardV3, FightboardV3Mirrored, FlatboxRev4, FlatboxRev5, KB2040, MavercadeKeebfighter, PicoAnn, PicoFightingBoard, ReflexEncoder, RP2040AdvancedBreakoutBoard, SparkFunProMicro, WaveshareZero, Stress ]

steps:
#Global Setup
- name: Checkout GP2040-CE
uses: actions/checkout@v3

- name: Setup SDK pipeline
uses: Fortinbra/RaspberryPiPicoBuild@v1

- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: fsData
path: ${{github.workspace}}/lib/httpd/

- name: Get core count
id: core_count
run : cat /proc/cpuinfo | grep processor | wc -l
#End Global Setup

- name: Pico Build Configure CMake
shell: bash
run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Pico Build
shell: bash
run: GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{steps.core_count.outputs.output}}

- name: Upload Pico Artifact
uses: actions/[email protected]
with:
name: GP2040-CE - ${{ matrix.GP2040_BOARDCONFIG }}
path: ${{github.workspace}}/build/GP2040-CE_*_${{ matrix.GP2040_BOARDCONFIG }}.uf2
if-no-files-found: error
name: CMake

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
pull_request_target:
branches: [ "main" ]
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
call-node-workflow:
uses: ./.github/workflows/node.js.yml
build:
needs: call-node-workflow
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
strategy:
matrix:
GP2040_BOARDCONFIG: [Pico, AlpacaOwO, BentoBox, DURAL, FightboardV3, FightboardV3Mirrored, FlatboxRev4, FlatboxRev5, KB2040, MavercadeKeebfighter, PicoAnn, PicoFightingBoard, ReflexEncoder, RP2040AdvancedBreakoutBoard, RP2040MiniBreakoutBoard, SparkFunProMicro, WaveshareZero, Stress ]

steps:
#Global Setup
- name: Checkout GP2040-CE
uses: actions/checkout@v3

- name: Setup SDK pipeline
uses: Fortinbra/RaspberryPiPicoBuild@v1

- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: fsData
path: ${{github.workspace}}/lib/httpd/

- name: Get core count
id: core_count
run : cat /proc/cpuinfo | grep processor | wc -l
#End Global Setup

- name: Pico Build Configure CMake
shell: bash
run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Pico Build
shell: bash
run: GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{steps.core_count.outputs.output}}

- name: Upload Pico Artifact
uses: actions/[email protected]
with:
name: GP2040-CE - ${{ matrix.GP2040_BOARDCONFIG }}
path: ${{github.workspace}}/build/GP2040-CE_*_${{ matrix.GP2040_BOARDCONFIG }}.uf2
if-no-files-found: error
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ compile_proto()

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()

# Remove unused code and data
add_compile_options(-fdata-sections -ffunction-sections)
add_link_options(-Wl,--gc-sections)

add_subdirectory(lib)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand All @@ -118,6 +123,7 @@ src/configs/webconfig.cpp
src/addons/analog.cpp
src/addons/board_led.cpp
src/addons/bootsel_button.cpp
src/addons/focus_mode.cpp
src/addons/buzzerspeaker.cpp
src/addons/dualdirectional.cpp
src/addons/extra_button.cpp
Expand Down
Loading

0 comments on commit 4f20f62

Please sign in to comment.