Skip to content

Commit

Permalink
Merge pull request #979 from bitcraze/app-make
Browse files Browse the repository at this point in the history
Add toobelt tool for building apps
  • Loading branch information
krichardsson authored Mar 7, 2022
2 parents 1bcaf97 + f93e5a3 commit 633cd34
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- app_api.conf
env:
CONF: ${{ matrix.features }}

steps:
- name: Checkout Repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
submodules: true

- name: build
run: docker run --rm -v ${PWD}:/module bitcraze/builder bash -c "cd ${EXAMPLE} && make && cd -"
run: docker run --rm -v ${PWD}:/module bitcraze/builder bash -c "./tools/build/make_app ${EXAMPLE}"

kbuild-targets:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ docs/api/log_param_doc.json
docs/api

build/
# To avoid that /tools/build is ignored
!/tools/*

**/*.o
**/*.cmd
Expand Down
23 changes: 23 additions & 0 deletions tools/build/make_app
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -e

# Use this script to make an app, mainly intended for the toolbelt
#
# The scipt taks one requierd argument, which is the path to the app to build (must be in the source tree)
# Optional aguments can be added that will be passed on to make.
#
# "tb make_app <path/to/app>" behaves as calling "make" in the directory where the app is located, meaning that any
# arguments for make can just be appended.
#
# Eamples:
# tb make_app examples/app_hello_world -j8
# tb make_app examples/app_hello_world clean

scriptDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

app_path="$1"
make_args="${@: 2}"

cd ${app_path}
make ${make_args}
cd -

0 comments on commit 633cd34

Please sign in to comment.