Build using fbuild instead of PlatformIO CLI.
(self, example: str)
| 896 | ) |
| 897 | |
| 898 | def _build_with_fbuild(self, example: str) -> SketchResult: |
| 899 | """Build using fbuild instead of PlatformIO CLI.""" |
| 900 | from ci.util.fbuild_runner import run_fbuild_compile |
| 901 | |
| 902 | environment = self.board.board_name |
| 903 | result = run_fbuild_compile( |
| 904 | self.build_dir, |
| 905 | environment=environment, |
| 906 | verbose=self.verbose, |
| 907 | ) |
| 908 | success = result.success |
| 909 | |
| 910 | if success: |
| 911 | green_color = "\033[32m" |
| 912 | reset_color = "\033[0m" |
| 913 | print(f"{green_color}SUCCESS: {example}{reset_color}") |
| 914 | generate_build_info_json_from_existing_build( |
| 915 | self.build_dir, self.board, example |
| 916 | ) |
| 917 | else: |
| 918 | red_color = "\033[31m" |
| 919 | reset_color = "\033[0m" |
| 920 | print(f"{red_color}FAILED: {example}{reset_color}") |
| 921 | |
| 922 | return SketchResult( |
| 923 | success=success, |
| 924 | output=result.output or "fbuild compilation", |
| 925 | build_dir=self.build_dir, |
| 926 | example=example, |
| 927 | ) |
| 928 | |
| 929 | def _internal_build_no_lock( |
| 930 | self, example: str, cancelled: threading.Event |
no test coverage detected