Skip to content
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

shorten ci names #378

Merged
merged 8 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:


jobs:
# First list all the files in experiments/tests, and generate a JSON string of all the files
# First list all the files in tests/ci, and generate a JSON string of all the files
collect-experiments:
runs-on: ubuntu-latest
outputs:
Expand All @@ -23,12 +23,12 @@ jobs:
- uses: actions/checkout@v3
- id: set-matrix
run: |
echo "matrix=$(ls experiments/tests/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "matrix=$(ls tests/ci/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
# - id: set-matrix-wip
# run: echo "matrix-wip=$(ls experiments/wip/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
# run: echo "matrix-wip=$(ls tests/wip/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT

# Build a matrix run of all experiments generated in previous job
run-experiments:
run-test:
needs: collect-experiments
runs-on: [self-hosted, linux]
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weeklytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
submodules: 'recursive'
- id: set-matrix
run: |
echo "matrix=$(ls experiments/weekly_tests/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "matrix=$(ls tests/weekly_tests/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT

run-tests:
needs: collect-tests
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"python": "${workspaceFolder}/.venv/bin/python",
"program": "scripts/run_experiment.py",
"args": [
"experiments/phys_netlist.yaml",
"tests/phys_netlist.yaml",
"-j1"
],
"env": {
Expand Down
2 changes: 1 addition & 1 deletion bfasst/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

DESIGNS_PATH = ROOT_PATH / "designs"
BFASST_PATH = ROOT_PATH / "bfasst"
EXPERIMENTS_PATH = ROOT_PATH / "experiments"
TESTS_PATH = ROOT_PATH / "tests"
RESOURCES_PATH = ROOT_PATH / "resources"
SCRIPTS_PATH = ROOT_PATH / "scripts"
ERROR_FLOW_PATH = ROOT_PATH / "error_flows"
Expand Down
2 changes: 1 addition & 1 deletion html_table_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To run an experiment of flows and update the table, source the following two bas

`run_flows.sh`

* If you want to create a new custom flow for testing, ensure the proper code is located in `scripts/bfasst/flows.py` along with an associated `.yaml` file in the `experiments` directory.
* If you want to create a new custom flow for testing, ensure the proper code is located in `scripts/bfasst/flows.py` along with an associated `.yaml` file in the `tests` directory.
* Add your new flow to the `flows_list` variable within the main function of `scripts/run_experiment.py` (this will add a new column to the table).
* Modify the script to add the commands for running the new experiment in `run_flows.sh` before sourcing.

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def main():

error_flows = []
for dir_item in paths.ERROR_FLOW_PATH.iterdir():
if (paths.EXPERIMENTS_PATH / dir_item).is_file() and dir_item.suffix == ".yaml":
if (paths.TESTS_PATH / dir_item).is_file() and dir_item.suffix == ".yaml":
error_flows.append(dir_item.stem)
parser.add_argument(
"--error_flow",
Expand Down
10 changes: 5 additions & 5 deletions test/scripts/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import unittest
import io
from contextlib import redirect_stderr
from bfasst.paths import EXPERIMENTS_PATH, ROOT_PATH
from bfasst.paths import TESTS_PATH, ROOT_PATH

from scripts.run import parse_args

Expand Down Expand Up @@ -63,7 +63,7 @@ def __try_check_args_for_success(self, args):

def test_check_args_succeeds_on_yaml(self):
"""Test that the check_args function accepts only a yaml or a design/flow"""
args = [EXPERIMENTS_PATH / "tests/vivado_bit_analysis.yaml"]
args = [TESTS_PATH / "ci/vivado_bit_analysis.yaml"]
self.__try_check_args_for_success(args)

def test_check_args_succeeds_on_flow_and_design(self):
Expand All @@ -82,17 +82,17 @@ def __produce_check_args_failure(self, args):
parse_args(args)

def test_check_args_fails_on_yaml_and_design_and_flow(self):
args = ["--yaml", "experiments/tests/test.yaml", "--design", "byu/alu", "--flow", "vivado"]
args = ["--yaml", "tests/ci/test.yaml", "--design", "byu/alu", "--flow", "vivado"]
self.__produce_check_args_failure(args)

def test_check_args_fails_on_no_args(self):
args = []
self.__produce_check_args_failure(args)

def test_check_args_fails_on_yaml_and_design(self):
args = ["--yaml", "experiments/tests/test.yaml", "--design", "byu/alu"]
args = ["--yaml", "tests/ci/test.yaml", "--design", "byu/alu"]
self.__produce_check_args_failure(args)

def test_check_args_fails_on_yaml_and_flow(self):
args = ["--yaml", "experiments/tests/test.yaml", "--flow", "vivado"]
args = ["--yaml", "tests/ci/test.yaml", "--flow", "vivado"]
self.__produce_check_args_failure(args)
File renamed without changes.
2 changes: 1 addition & 1 deletion experiments/Makefile.common → tests/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BFASST_PATH := $(realpath $(LEVEL)/..)
RESOURCES = $(BFASST_PATH)/resources
SCRIPTS = $(BFASST_PATH)/scripts
EXPERIMENTS = $(BFASST_PATH)/experiments
TESTS = $(BFASST_PATH)/tests
EXAMPLES = $(BFASST_PATH)/examples

include $(RESOURCES)/Makefile_colors.inc
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading