-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from zeroasiccorp/ci-test
add ci test to run the testbenches and fix testbenches for now
- Loading branch information
Showing
12 changed files
with
109 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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,11 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
actions: | ||
patterns: | ||
- "*" |
This file contains 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 @@ | ||
import json | ||
import os | ||
|
||
|
||
if __name__ == "__main__": | ||
script_dir = os.path.dirname(os.path.abspath(__file__)) | ||
repo_dir = os.path.abspath(os.path.join(script_dir, '..', '..', '..')) | ||
tests = [] | ||
for dirpath, dirnames, filenames in os.walk(repo_dir): | ||
for f in filenames: | ||
if f.startswith("test_"): | ||
tests.append(os.path.join(dirpath, f)) | ||
|
||
tests_rel = [os.path.relpath(p, repo_dir) for p in tests] | ||
|
||
print(json.dumps({"testbench": tests_rel})) |
This file contains 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,54 @@ | ||
name: Testbench CI | ||
on: | ||
# Runs on all PRs | ||
pull_request: | ||
# Manual Dispatch | ||
workflow_dispatch: | ||
|
||
jobs: | ||
get_testbenches: | ||
name: 'Get testbenches' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
testbenches: ${{ steps.tests.outputs.tests }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Collect testbenches | ||
id: tests | ||
run: | | ||
echo "tests=$(python3 .github/workflows/bin/collect_tests.py)" >> $GITHUB_OUTPUT | ||
testbench: | ||
needs: get_testbenches | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.get_testbenches.outputs.testbenches) }} | ||
|
||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/zeroasiccorp/sbtest:latest | ||
|
||
steps: | ||
- name: Check out UMI | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install requirements | ||
run: | | ||
python3 -m venv .venv | ||
. .venv/bin/activate | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install switchboard-hw | ||
- name: Run ${{ matrix.testbench }} | ||
run: | | ||
. .venv/bin/activate | ||
cd $(dirname "${{ matrix.testbench }}") | ||
./$(basename "${{ matrix.testbench }}") |
This file contains 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 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 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 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 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 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 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 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 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