Skip to content

Commit fd36259

Browse files
committed
[CI] Fix execution from other path
Update configuration. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 6a17d6f commit fd36259

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

CI/build/arduino-cli.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
init(autoreset=True)
1919

20-
path_config_filename = "path_config.json"
2120
home = os.path.expanduser("~")
2221
tempdir = tempfile.gettempdir()
2322
build_id = time.strftime("_%Y-%m-%d_%H-%M-%S")
2423
script_path = os.path.dirname(os.path.abspath(__file__))
24+
path_config_filename = os.path.join(script_path, "path_config.json")
2525

2626
arduino_cli_path = ""
2727
stm32_url = "https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json"
@@ -39,10 +39,9 @@
3939

4040
# Default
4141
sketch_default = os.path.join(script_path, "examples", "BareMinimum")
42-
exclude_file_default = os.path.join("conf", "exclude_list.txt")
43-
cores_config_file_default = os.path.join("conf", "cores_config.json")
44-
cores_config_file_ci = os.path.join("conf", "cores_config_ci.json")
45-
path_config_ci_filename = os.path.join("conf", "path_config_ci.json")
42+
exclude_file_default = os.path.join(script_path, "conf", "exclude_list.txt")
43+
cores_config_file_default = os.path.join(script_path, "conf", "cores_config.json")
44+
cores_config_file_ci = os.path.join(script_path, "conf", "cores_config_ci.json")
4645

4746
maintainer_default = "STM32"
4847
arch_default = "stm32"
@@ -132,10 +131,10 @@ def create_config():
132131
# Create a Json file for a better path management
133132
print(
134133
"'{}' file created. Please check the configuration.".format(
135-
os.path.join(script_path, path_config_filename)
134+
path_config_filename
136135
)
137136
)
138-
path_config_file = open(os.path.join(script_path, path_config_filename), "w")
137+
path_config_file = open(path_config_filename, "w")
139138
path_config_file.write(
140139
json.dumps(
141140
{
@@ -160,11 +159,9 @@ def check_config():
160159
global output_dir
161160
global log_file
162161
if args.ci is False:
163-
if os.path.isfile(os.path.join(script_path, path_config_filename)):
162+
if os.path.isfile(path_config_filename):
164163
try:
165-
path_config_file = open(
166-
os.path.join(script_path, path_config_filename), "r"
167-
)
164+
path_config_file = open(path_config_filename, "r")
168165
path_config = json.load(path_config_file)
169166
# Common path
170167
arduino_cli_path = path_config["ARDUINO_CLI_PATH"]
@@ -244,9 +241,10 @@ def load_core_config():
244241
cores_config_filename = cores_config_file_ci
245242
else:
246243
cores_config_filename = cores_config_file_default
247-
print("Cores configuration JSON file that will be used: " + cores_config_filename)
244+
print("Cores configuration JSON file that will be used:")
245+
print(cores_config_filename)
248246
try:
249-
cores_config_file = open(os.path.join(script_path, cores_config_filename), "r")
247+
cores_config_file = open(cores_config_filename, "r")
250248
cores_config = json.load(cores_config_file)
251249
cores_config_file.close()
252250

@@ -859,7 +857,7 @@ def build(build_conf):
859857
then applicable to all board. Default core configuration is for '"
860858
+ arch_default
861859
+ " 'architecture in: "
862-
+ os.path.join(script_path, cores_config_file_default),
860+
+ cores_config_file_default,
863861
)
864862

865863
parser.add_argument(
@@ -897,7 +895,7 @@ def build(build_conf):
897895
metavar="<excluded sketches list filepath>",
898896
help="file containing sketches pattern to ignore.\
899897
Default path : "
900-
+ os.path.join(script_path, exclude_file_default),
898+
+ exclude_file_default,
901899
)
902900

903901
args = parser.parse_args()

CI/build/conf/cores_config.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
"Generic_F103RD",
4848
"Generic_F103RF",
4949
"Generic_F103RG",
50+
"Generic_F103V8",
51+
"Generic_F103VB",
52+
"Generic_F103VC",
53+
"Generic_F103VD",
54+
"Generic_F103VE",
55+
"Generic_F103VF",
5056
"Generic_F103ZC",
5157
"Generic_F103ZD",
5258
"Generic_F103ZE",
@@ -127,6 +133,7 @@
127133
"FYSETC_S6",
128134
"Generic_F103CB",
129135
"Generic_F103RE",
136+
"Generic_F103VF",
130137
"HY_TinySTM103TB",
131138
"MALYANM200_F070CB",
132139
"MALYANM200_F103CB",
@@ -280,7 +287,7 @@
280287
]
281288
},
282289
{
283-
"pattern": "IKS01A3_S2LP_P2P_Demo|X_NUCLEO_S2868A1_HelloWorld",
290+
"pattern": "IKS01A3_S2LP_P2P_Demo|X_NUCLEO_(S2868A1|S2868A2|S2915A1)_HelloWorld",
284291
"applicable": false,
285292
"boards": [ "DISCO_L072CZ_LRWAN1", "STM32MP157C_DK2" ]
286293
},

CI/build/conf/cores_config_ci.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
"Generic_F103RD",
4747
"Generic_F103RF",
4848
"Generic_F103RG",
49+
"Generic_F103V8",
50+
"Generic_F103VB",
51+
"Generic_F103VC",
52+
"Generic_F103VD",
53+
"Generic_F103VE",
54+
"Generic_F103VF",
4955
"Generic_F103ZC",
5056
"Generic_F103ZD",
5157
"Generic_F103ZE",

0 commit comments

Comments
 (0)