From a3e923c3dfc4d4129856e22a6ce1c5349676a513 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 18:30:51 +0530 Subject: [PATCH 01/12] delete test-1.yml --- .github/workflows/test-1.yml | 111 ----------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 .github/workflows/test-1.yml diff --git a/.github/workflows/test-1.yml b/.github/workflows/test-1.yml deleted file mode 100644 index f1fe2553..00000000 --- a/.github/workflows/test-1.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: test-1 -on: - pull_request: - branches: - -master - -dev - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - cgf_files: ["./sample_cgfs/*.cgf"] - architecture: ["rv32e", "rv32i", "rv64i", "rv32i_64i"] - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.7' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r riscv_ctg/requirements.txt - pip install --editable . - - - - name: Run RISC-V CTG for RV32E - run: | - set -e - for cgf_file in ./sample_cgfs/*.cgf; do - if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then - if [[ "$cgf_file" == *rv32e* ]] && [ "${{matrix.architecture}}" == "rv32e" ] ; then - cmd="riscv_ctg -r -d ./tests -bi rv32e -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" - echo $cmd - eval $cmd || { echo "Error executing command: $cmd"; exit 1; } - fi - fi - done - - - name: Run RISC-V CTG for RV32I - run: | - set -e - for cgf_file in ./sample_cgfs/*.cgf; do - if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then - if [[ "$cgf_file" != *rv32e* ]] && [[ "cgf_file" == *rv32* ]] && [ "${{matrix.architecture}}" == "rv32i" ] ; then - cmd="riscv_ctg -r -d ./tests -bi rv32i -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" - echo $cmd - eval $cmd || { echo "Error executing command: $cmd"; exit 1; } - fi - fi - done - - - name: Run RISC-V CTG for RV64I - run: | - set -e - for cgf_file in ./sample_cgfs/*.cgf; do - if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then - if [[ "$cgf_file" == *rv64* ]] && [ "${{matrix.architecture}}" == "rv64i" ] ; then - cmd="riscv_ctg -r -d ./tests -bi rv64i -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" - echo $cmd - eval $cmd || { echo "Error executing command: $cmd"; exit 1; } - fi - fi - done - - - name: Run RISC-V CTG for RV64I and RV32I - run: | - set -e - for cgf_file in ./sample_cgfs/*.cgf; do - if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then - if [[ "$cgf_file" != *rv32e* ]] && [[ "$cgf_file" != *rv32* ]] && [[ "$cgf_file" != *rv64* ]] && [ "${{matrix.architecture}}" == "rv32i_64i" ] ; then - for arch in rv32i rv64i; do - cmd="riscv_ctg -r -d ./tests -bi $arch -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" - echo $cmd - eval $cmd || { echo "Error executing command: $cmd"; exit 1; } - done - fi - fi - done - - check-version: - if: github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: version check - run: | - export CHNGVER=$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md); - echo "CHANGELOG VERSION: $CHNGVER" - export INITVER=$(grep -P "__version__ = '.*?'" riscv_ctg/__init__.py | awk '{print $3}'|sed "s/'//g"); - echo "INIT VERSION: $INITVER" - if [ "$CHNGVER" = "$INITVER" ]; then - echo "Versions are equal in Changelog and init.py." - else - echo "Versions are not equal in Changelog and init.py." - exit 1 - fi - export TAGVER=${{ steps.get-latest-tag.outputs.tag }}; - echo "TAG VERSION: $TAGVER" - if [ "$CHNGVER" = "$TAGVER" ]; then - echo "No changelog update." - exit 1 - else - echo "Changelog updated." - fi - - \ No newline at end of file From 22037bace942850682a3932205c2158497ff5d94 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 18:31:01 +0530 Subject: [PATCH 02/12] update test.yml --- .github/workflows/test.yml | 95 ++++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 174651c2..f77b8a39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,26 +1,19 @@ -# This is a basic workflow to help you get started with Actions - name: test - -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master branch pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab + branches: + -master + -dev workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job + strategy: + matrix: + cgf_files: ["./sample_cgfs/*.cgf"] + architecture: ["rv32e", "rv32i", "rv64i", "rv32i_64i"] steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 @@ -33,10 +26,63 @@ jobs: pip install -r riscv_ctg/requirements.txt pip install --editable . - - name: Run rv32i - run: riscv_ctg -r -d rv32i -bi rv32i -cf sample_cgfs/dataset.cgf -cf sample_cgfs/rv32i.cgf -v debug -p $(nproc) + + - name: Run RISC-V CTG for RV32E + run: | + set -e + for cgf_file in ./sample_cgfs/*.cgf; do + if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then + if [[ "$cgf_file" == *rv32e* ]] && [ "${{matrix.architecture}}" == "rv32e" ] ; then + cmd="riscv_ctg -r -d ./tests -bi rv32e -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" + echo $cmd + eval $cmd || { echo "Error executing command: $cmd"; exit 1; } + fi + fi + done + + - name: Run RISC-V CTG for RV32I + run: | + set -e + for cgf_file in ./sample_cgfs/*.cgf; do + if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then + if [[ "$cgf_file" != *rv32e* ]] && [[ "cgf_file" == *rv32* ]] && [ "${{matrix.architecture}}" == "rv32i" ] ; then + cmd="riscv_ctg -r -d ./tests -bi rv32i -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" + echo $cmd + eval $cmd || { echo "Error executing command: $cmd"; exit 1; } + fi + fi + done + + - name: Run RISC-V CTG for RV64I + run: | + set -e + for cgf_file in ./sample_cgfs/*.cgf; do + if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then + if [[ "$cgf_file" == *rv64* ]] && [ "${{matrix.architecture}}" == "rv64i" ] ; then + cmd="riscv_ctg -r -d ./tests -bi rv64i -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" + echo $cmd + eval $cmd || { echo "Error executing command: $cmd"; exit 1; } + fi + fi + done + + - name: Run RISC-V CTG for RV64I and RV32I + run: | + set -e + for cgf_file in ./sample_cgfs/*.cgf; do + if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then + if [[ "$cgf_file" != *rv32e* ]] && [[ "$cgf_file" != *rv32* ]] && [[ "$cgf_file" != *rv64* ]] && [ "${{matrix.architecture}}" == "rv32i_64i" ] ; then + for arch in rv32i rv64i; do + cmd="riscv_ctg -r -d ./tests -bi $arch -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" + echo $cmd + eval $cmd || { echo "Error executing command: $cmd"; exit 1; } + done + fi + fi + done check-version: + if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -51,21 +97,8 @@ jobs: echo "Versions are equal in Changelog and init.py." else echo "Versions are not equal in Changelog and init.py." - exit 1 + exit 1 fi - - check-version-changelog: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions-ecosystem/action-get-latest-tag@v1 - id: get-latest-tag - - - name: version check - run: | - export CHNGVER=$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md); - echo "CHANGELOG VERSION: $CHNGVER" export TAGVER=${{ steps.get-latest-tag.outputs.tag }}; echo "TAG VERSION: $TAGVER" if [ "$CHNGVER" = "$TAGVER" ]; then @@ -74,3 +107,5 @@ jobs: else echo "Changelog updated." fi + + \ No newline at end of file From 98906804770c3be8493dd0cfae3f2036c1c10eb5 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 18:34:09 +0530 Subject: [PATCH 03/12] update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f77b8a39..f1fe2553 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: test-1 on: pull_request: branches: From 772b6d800d467fe8bf8a5641caa1a0da7637fc63 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 18:36:21 +0530 Subject: [PATCH 04/12] update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1fe2553..f77b8a39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test-1 +name: test on: pull_request: branches: From 75571f2852048321e71d385156b3c56c27780538 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 18:42:14 +0530 Subject: [PATCH 05/12] update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f77b8a39..f1fe2553 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: test-1 on: pull_request: branches: From 3a25906f25d754342d7cd94e8d566b23d828b37f Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 18:43:57 +0530 Subject: [PATCH 06/12] update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1fe2553..f77b8a39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test-1 +name: test on: pull_request: branches: From 302e637bf70dce465ba3cb1808dd64035365d897 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 22:36:11 +0530 Subject: [PATCH 07/12] update test.yml --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f77b8a39..9c4ba4c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,9 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + - name: version check run: | export CHNGVER=$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md); From f3a3fd94d229f7ba5acb13fa517fbb622e9124f5 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 23:03:02 +0530 Subject: [PATCH 08/12] update test.yml --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c4ba4c6..e3845c86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,7 @@ name: test on: pull_request: - branches: - -master - -dev + branches: [ master, dev ] workflow_dispatch: jobs: From efa916d5b4f85014bd92f5035533512f83b23d22 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Thu, 22 Feb 2024 23:09:38 +0530 Subject: [PATCH 09/12] update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3845c86..df75819d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,7 @@ jobs: set -e for cgf_file in ./sample_cgfs/*.cgf; do if [ "$cgf_file" != "./sample_cgfs/dataset.cgf" ]; then - if [[ "$cgf_file" != *rv32e* ]] && [[ "cgf_file" == *rv32* ]] && [ "${{matrix.architecture}}" == "rv32i" ] ; then + if [[ "$cgf_file" != *rv32e* ]] && [[ "$cgf_file" == *rv32* ]] && [ "${{matrix.architecture}}" == "rv32i" ] ; then cmd="riscv_ctg -r -d ./tests -bi rv32i -cf sample_cgfs/dataset.cgf -cf \"$cgf_file\" -v warning -p \$(nproc)" echo $cmd eval $cmd || { echo "Error executing command: $cmd"; exit 1; } From 0ad638a23e04acc85b2634d0f0a11591d5f8499a Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Tue, 27 Feb 2024 13:18:07 +0530 Subject: [PATCH 10/12] update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df75819d..7e11cefa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: done check-version: - if: github.ref == 'refs/heads/master' + if: github.event.pull_request.base.ref == 'master' && github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From eb120d2261e56366d33be656402fe4b114657e54 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Tue, 27 Feb 2024 15:23:15 +0530 Subject: [PATCH 11/12] =?UTF-8?q?Bump=20version:=200.12.0=20=E2=86=92=200.?= =?UTF-8?q?12.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- riscv_ctg/__init__.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv_ctg/__init__.py b/riscv_ctg/__init__.py index 1d96eb63..2862388f 100644 --- a/riscv_ctg/__init__.py +++ b/riscv_ctg/__init__.py @@ -4,4 +4,4 @@ __author__ = """InCore Semiconductors Pvt Ltd""" __email__ = 'incorebot@gmail.com' -__version__ = '0.12.0' +__version__ = '0.12.1' diff --git a/setup.cfg b/setup.cfg index 0c3d811e..7b408594 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.0 +current_version = 0.12.1 commit = True tag = True From f65cbb0a2847237e5bdc44fb7926a4d243e75a38 Mon Sep 17 00:00:00 2001 From: Sowmya3062 Date: Tue, 27 Feb 2024 15:23:29 +0530 Subject: [PATCH 12/12] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e13d0f7..a208451c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Please note the header `WIP-DEV` is to always remain indicating the changes done Only when a release to the main branch is done, the contents of the WIP-DEV are put under a versioned header while the `WIP-DEV` is left empty +## [0.12.1] - 2024-02-27 +- Fix test.yml + ## [0.12.0] - 2024-02-22 - Update generator.py to take care of hard coded register testcases only if a hard coded register is assigned in the op_comb node of a coverpoint of an instruction. - Add hardcoded register testcases to dataset.cgf and rv32im.cgf