Update and rename cmake-single-platform.yml to build_sw.yml
This commit is contained in:
1 parent
d17660f018
commit
91eb160833
1 file changed
+23
-6
@@ -1,12 +1,16 @@
|
|||||||
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
|
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
|
||||||
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
|
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
|
||||||
name: CMake on a single platform
|
name: Build Software and create release on tag
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches:
|
||||||
pull_request:
|
- dev # Trigger on push to 'dev' branch
|
||||||
branches: [ "main" ]
|
- main # Trigger on push to 'main' branch
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/build_sw.yml' # Trigger if this workflow file changes
|
||||||
|
- 'Software/**' # Trigger if any file in the 'Software' directory changes
|
||||||
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
@@ -20,11 +24,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: install build packages
|
- name: install build packages
|
||||||
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||||
|
|
||||||
- name: get sdk
|
- name: Get sdk and add PICO_SDK_PATH
|
||||||
run: cd /tmp && git clone https://github.com/raspberrypi/pico-sdk.git && echo "PICO_SDK_PATH=/tmp/pico-sdk" >> $GITHUB_ENV
|
run: cd /tmp && git clone https://github.com/raspberrypi/pico-sdk.git && echo "PICO_SDK_PATH=/tmp/pico-sdk" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
@@ -35,4 +39,17 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
# Build your program with the given configuration
|
# Build your program with the given configuration
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
README.md
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user