diff --git a/.github/workflows/build-apps-job/setup.sh b/.github/workflows/build-apps-job/setup.sh index c53816c5b..ebf262e4f 100755 --- a/.github/workflows/build-apps-job/setup.sh +++ b/.github/workflows/build-apps-job/setup.sh @@ -7,8 +7,9 @@ echo ======================================== echo ======================================== # Create the virtual environment and install the requirements. -make venv -. .venv/bin/activate +conda init bash +source /root/.bashrc +conda activate core-v-mini-mcu echo ======================================== echo ======================================== @@ -17,7 +18,7 @@ echo ======================================== echo ======================================== # The variable could also be obtained from the container. -export RISCV='/home/root/tools/riscv' &&\ +export RISCV='/tools/riscv' &&\ # All peripherals are included to make sure all apps can be built. sed 's/is_included: "no",/is_included: "yes",/' -i mcu_cfg.hjson diff --git a/.github/workflows/sim-apps-job/test-apps.py b/.github/workflows/sim-apps-job/test-apps.py index 881fff9d5..20cdec08a 100755 --- a/.github/workflows/sim-apps-job/test-apps.py +++ b/.github/workflows/sim-apps-job/test-apps.py @@ -22,10 +22,10 @@ class bcolors: LINKER = 'on_chip' COMPILER = 'gcc' -repo = Repo(search_parent_directories=True) -hw_diff_to_main = repo.head.commit.diff("main", "hw") + repo.head.commit.diff("main", "tb") -sw_diff_to_main = repo.head.commit.diff("main", "sw") -ci_diff_to_main = repo.head.commit.diff("main", ".github/workflows") +# repo = Repo(search_parent_directories=True) +# hw_diff_to_main = repo.head.commit.diff("main", "hw") + repo.head.commit.diff("main", "tb") +# sw_diff_to_main = repo.head.commit.diff("main", "sw") +# ci_diff_to_main = repo.head.commit.diff("main", ".github/workflows") # Blacklist of apps to skip blacklist = [ "example_pdm2pcm", @@ -34,33 +34,35 @@ class bcolors: "example_spi_read", ] -hw_diff = False -ci_diff = False -sw_diff = False +# hw_diff = False +# ci_diff = False +# sw_diff = False -if len(hw_diff_to_main) > 0: - print(bcolors.OKCYAN + "HW differences found!" + bcolors.ENDC) - print(bcolors.OKCYAN + "All applications will be tested." + bcolors.ENDC) - hw_diff = True +# if len(hw_diff_to_main) > 0: +# print(bcolors.OKCYAN + "HW differences found!" + bcolors.ENDC) +# print(bcolors.OKCYAN + "All applications will be tested." + bcolors.ENDC) +# hw_diff = True -if len(sw_diff_to_main) > 0: - print(bcolors.OKCYAN + "SW differences found!" + bcolors.ENDC) - print(bcolors.OKCYAN + "Just the applications modified will be tested." + bcolors.ENDC) - sw_diff = True +# if len(sw_diff_to_main) > 0: +# print(bcolors.OKCYAN + "SW differences found!" + bcolors.ENDC) +# print(bcolors.OKCYAN + "Just the applications modified will be tested." + bcolors.ENDC) +# sw_diff = True -if len(ci_diff_to_main) > 0: - print(bcolors.OKCYAN + "CI differences found!" + bcolors.ENDC) - print(bcolors.OKCYAN + "All applications will be tested." + bcolors.ENDC) - ci_diff = True +# if len(ci_diff_to_main) > 0: +# print(bcolors.OKCYAN + "CI differences found!" + bcolors.ENDC) +# print(bcolors.OKCYAN + "All applications will be tested." + bcolors.ENDC) +# ci_diff = True -if sw_diff and not hw_diff and not ci_diff: - app_list = [app for app in os.listdir('sw/applications') if app in [file.a_path.split("/")[-2] for file in sw_diff_to_main]] -else: - app_list = [app for app in os.listdir('sw/applications')] +# if sw_diff and not hw_diff and not ci_diff: +# app_list = [app for app in os.listdir('sw/applications') if app in [file.a_path.split("/")[-2] for file in sw_diff_to_main]] +# else: +# app_list = [app for app in os.listdir('sw/applications')] +app_list = [app for app in os.listdir('sw/applications')] print(bcolors.OKCYAN + "Apps to test:" + bcolors.ENDC) for app in app_list: - print(bcolors.OKCYAN + f" - {app}" + bcolors.ENDC) + if app not in blacklist: + print(bcolors.OKCYAN + f" - {app}" + bcolors.ENDC) apps = { app : {"building" : "", "simulation" : ""} for app in app_list diff --git a/.github/workflows/simulate.yml b/.github/workflows/simulate.yml index 17e176e45..abdee7689 100644 --- a/.github/workflows/simulate.yml +++ b/.github/workflows/simulate.yml @@ -17,5 +17,4 @@ jobs: conda activate core-v-mini-mcu make clean-all make mcu-gen MEMORY_BANKS=6 - git config --global --add safe.directory . python3 .github/workflows/sim-apps-job/test-apps.py \ No newline at end of file