Skip to content

Commit

Permalink
tools:scripts:build_projects.py: update build dir for stm32 projects
Browse files Browse the repository at this point in the history
After the modifications for stm32 platform to support windows builds the
BUILD_DIR variable from make won't be used anymore, always the build
will be made in the project directory under build folder.

Changed also the relative path to absolute ones for python script.

Signed-off-by: Andreea Andrisan <[email protected]>
  • Loading branch information
AAndrisa authored and amiclaus committed Aug 19, 2024
1 parent 9c32c3e commit d61643d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions build_projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
persistCredentials: true
- script: |
export BRANCH=$(branch)
python3 ./tools/scripts/build_projects.py . \
python3 ./tools/scripts/build_projects.py $(Build.Repository.LocalPath) \
-export_dir $(RELEASE_DIR) \
-log_dir $(LOG_DIR) \
-builds_dir /no-OS_builds/builds \
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
submodules: true
clean: true
persistCredentials: true
- script: 'python3 ./tools/scripts/build_projects.py .
- script: 'python3 ./tools/scripts/build_projects.py $(Build.Repository.LocalPath)
-export_dir $(RELEASE_DIR)
-log_dir $(LOG_DIR)
-builds_dir /no-OS_builds/builds
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
submodules: true
clean: true
persistCredentials: true
- script: 'python3 ./tools/scripts/build_projects.py .
- script: 'python3 ./tools/scripts/build_projects.py $(Build.Repository.LocalPath)
-export_dir $(RELEASE_DIR)
-log_dir $(LOG_DIR)
-builds_dir /no-OS_builds/builds
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
submodules: true
clean: true
persistCredentials: true
- script: 'python3 ./tools/scripts/build_projects.py .
- script: 'python3 ./tools/scripts/build_projects.py $(Build.Repository.LocalPath)
-export_dir $(RELEASE_DIR)
-log_dir $(LOG_DIR)
-builds_dir /no-OS_builds/builds
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
submodules: true
clean: true
persistCredentials: true
- script: 'python3 ./tools/scripts/build_projects.py .
- script: 'python3 ./tools/scripts/build_projects.py $(Build.Repository.LocalPath)
-export_dir $(RELEASE_DIR)
-log_dir $(LOG_DIR)
-builds_dir /no-OS_builds/builds
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
submodules: true
clean: true
persistCredentials: true
- script: 'python3 ./tools/scripts/build_projects.py .
- script: 'python3 ./tools/scripts/build_projects.py $(Build.Repository.LocalPath)
-export_dir $(RELEASE_DIR)
-log_dir $(LOG_DIR)
-builds_dir /no-OS_builds/builds
Expand Down
5 changes: 4 additions & 1 deletion tools/scripts/build_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ def __init__(self, project_dir, platform, flags, build_name, hardware,
self.project, platform, build_name, hardware)
self.boot_dir = "%s_%s_%s_%s" % (
self.project, platform, build_name, hardware)
self.build_dir = os.path.join(self.builds_dir, short_build_dir)
if (platform == 'stm32'):
self.build_dir = os.path.join(self.project_dir, 'build')
else:
self.build_dir = os.path.join(self.builds_dir, short_build_dir)
self.binary = os.path.join(self.build_dir, self._binary)
self.export_file = os.path.join(self.build_dir, self.binary)
if (platform == 'aducm3029' or platform == 'stm32' or platform == 'maxim'):
Expand Down

0 comments on commit d61643d

Please sign in to comment.