-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[action/ci] 根据看护产品,结合版本versionconfig ci自动生成版本测试产物 #10170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
hydevcode
wants to merge
1
commit into
RT-Thread:master
Choose a base branch
from
hydevcode:versionconfig_ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from building import * | ||
import os | ||
|
||
cwd = GetCurrentDir() | ||
src = [] | ||
CPPPATH = [cwd] | ||
|
||
group = DefineGroup('Versionconfig', src, depend = [''], CPPPATH = CPPPATH) | ||
|
||
list = os.listdir(cwd) | ||
for item in list: | ||
if os.path.isfile(os.path.join(cwd, item, 'SConscript')): | ||
group = group + SConscript(os.path.join(item, 'SConscript')) | ||
|
||
Return('group') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from building import * | ||
import os | ||
|
||
cwd = GetCurrentDir() | ||
src = [] | ||
CPPPATH = [cwd] | ||
|
||
group = DefineGroup('Versionconfig', src, depend = [''], CPPPATH = CPPPATH) | ||
|
||
list = os.listdir(cwd) | ||
for item in list: | ||
if os.path.isfile(os.path.join(cwd, item, 'SConscript')): | ||
group = group + SConscript(os.path.join(item, 'SConscript')) | ||
|
||
Return('group') |
16 changes: 16 additions & 0 deletions
16
bsp/stm32/stm32f407-rt-spark/.ci/versionconfig/samples/SConscript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from building import * | ||
import os | ||
|
||
cwd = GetCurrentDir() | ||
src = [] | ||
CPPPATH = [cwd] | ||
|
||
if GetDepend(['VERSIONCONFIG_USING_AHT21_SAMPLE']): | ||
src += ['peripheral_aht21.c'] | ||
|
||
if GetDepend(['VERSIONCONFIG_USING_ICM20608_SAMPLE']): | ||
src += ['peripheral_icm20608.c'] | ||
|
||
group = DefineGroup('Versionconfig', src, depend = [''], CPPPATH = CPPPATH) | ||
|
||
Return('group') |
60 changes: 60 additions & 0 deletions
60
bsp/stm32/stm32f407-rt-spark/.ci/versionconfig/samples/peripheral_aht21.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2006-2024, RT-Thread Development Team | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Change Logs: | ||
* Date Author Notes | ||
* 2024-07-23 Wangyuqiang the first version | ||
* 2024-04-03 Hydevcode | ||
*/ | ||
|
||
#include <rtthread.h> | ||
#include <rtdevice.h> | ||
#include "aht10.h" | ||
|
||
static void aht10_entry(void *parameter) | ||
{ | ||
float humidity, temperature; | ||
aht10_device_t dev; | ||
|
||
const char *i2c_bus_name = "i2c3"; | ||
int count = 0; | ||
|
||
rt_thread_mdelay(2000); | ||
|
||
dev = aht10_init(i2c_bus_name); | ||
if (dev == RT_NULL) | ||
{ | ||
rt_kprintf("The sensor initializes failure"); | ||
} | ||
|
||
rt_kprintf("AHT10 has been initialized!"); | ||
|
||
while (1) | ||
{ | ||
humidity = aht10_read_humidity(dev); | ||
rt_kprintf("Humidity : %d.%d %%", (int)humidity, (int)(humidity * 10) % 10); | ||
|
||
temperature = aht10_read_temperature(dev); | ||
rt_kprintf("Temperature: %d.%d", (int)temperature, (int)(temperature * 10) % 10); | ||
|
||
rt_thread_mdelay(1000); | ||
} | ||
|
||
} | ||
|
||
int aht10_thread_port(void) | ||
{ | ||
rt_thread_t res = rt_thread_create("aht10", aht10_entry, RT_NULL, 1024, 20, 50); | ||
if(res == RT_NULL) | ||
{ | ||
rt_kprintf("aht10 thread create failed!"); | ||
return -RT_ERROR; | ||
} | ||
|
||
rt_thread_startup(res); | ||
|
||
return RT_EOK; | ||
} | ||
INIT_DEVICE_EXPORT(aht10_thread_port); |
63 changes: 63 additions & 0 deletions
63
bsp/stm32/stm32f407-rt-spark/.ci/versionconfig/samples/peripheral_icm20608.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (c) 2006-2024, RT-Thread Development Team | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Change Logs: | ||
* Date Author Notes | ||
* 2024-04-03 Hydevcode the first version | ||
*/ | ||
|
||
#include <rtthread.h> | ||
#include <rtdevice.h> | ||
#include "icm20608.h" | ||
|
||
static void icm20608_entry(void *parameter) | ||
{ | ||
icm20608_device_t dev = RT_NULL; | ||
rt_int16_t x, y, z; | ||
rt_uint32_t i; | ||
|
||
const char *i2c_bus_name = "i2c2"; | ||
int count = 0; | ||
|
||
rt_thread_mdelay(2000); | ||
|
||
dev = icm20608_init(i2c_bus_name); | ||
if (dev == RT_NULL) | ||
{ | ||
rt_kprintf("The sensor initializes failure"); | ||
} | ||
|
||
rt_kprintf("ICM20608 has been initialized!"); | ||
|
||
while (1) | ||
{ | ||
/* read the sensor digital output */ | ||
icm20608_get_accel(dev, &x, &y, &z); | ||
|
||
rt_kprintf("accelerometer: X%6d Y%6d Z%6d\n", x, y, z); | ||
|
||
icm20608_get_gyro(dev, &x, &y, &z); | ||
|
||
rt_kprintf("gyroscope : X%6d Y%6d Z%6d\n", x, y, z); | ||
|
||
rt_thread_mdelay(1000); | ||
} | ||
|
||
} | ||
|
||
int icm20608_thread_port(void) | ||
{ | ||
rt_thread_t res = rt_thread_create("icm20608", icm20608_entry, RT_NULL, 1024, 20, 50); | ||
if(res == RT_NULL) | ||
{ | ||
rt_kprintf("icm20608 thread create failed!"); | ||
return -RT_ERROR; | ||
} | ||
|
||
rt_thread_startup(res); | ||
|
||
return RT_EOK; | ||
} | ||
INIT_DEVICE_EXPORT(icm20608_thread_port); |
12 changes: 12 additions & 0 deletions
12
bsp/stm32/stm32f407-rt-spark/.ci/versionconfig/versionconfig.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
scons.args: &scons | ||
scons_arg: | ||
- '--strict' | ||
# ------ peripheral CI ------ | ||
peripheral.aht21: | ||
kconfig: | ||
- CONFIG_BSP_USING_AHT21=y | ||
- CONFIG_VERSIONCONFIG_USING_AHT21_SAMPLE=y | ||
peripheral.icm20608: | ||
kconfig: | ||
- CONFIG_BSP_USING_ICM20608=y | ||
- CONFIG_VERSIONCONFIG_USING_ICM20608_SAMPLE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Possible typo: consider renaming 'output_contral' to 'output_control' for clarity.
Copilot uses AI. Check for mistakes.