Skip to content

Commit

Permalink
Merge pull request #6 from riscv/migration-fix
Browse files Browse the repository at this point in the history
Migration fix with improved CLI and docs.
  • Loading branch information
neelgala authored Jul 21, 2021
2 parents 85e84ff + 363c1f2 commit f4ceecc
Show file tree
Hide file tree
Showing 403 changed files with 1,033 additions and 479,823 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
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
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Get version
id: get_version
run: |
echo "::set-output name=version::$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md)"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6'

- name: Install dependencies
run: |
pip install -r riscof/requirements.txt
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Publish package
if: github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: ${{ secrets.PYPIUSERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPIPASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Tag
id: create_tag
if: github.ref == 'refs/heads/master'
uses: mathieudutour/github-tag-action@v5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
custom_tag: ${{ steps.get_version.outputs.version }}
create_annotated_tag: True
tag_prefix: ''

- name: Create Release
id: create_release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
release_branch: refs/heads/master
release_name: ${{ steps.get_version.outputs.version }}
tag_name: ${{ steps.get_version.outputs.version }}
body: ${{ steps.extract-release-notes.outputs.release_notes }}
draft: false
prerelease: false

# - name: Script
# uses: ammaraskar/sphinx-action@master
# with:
# docs-folder: "docs/"
# pre-build-command: " apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended"
# build-command: " make latexpdf "


# - name: Upload Release Asset
# id: upload-release-asset
# if: github.ref == 'refs/heads/master'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./docs/build/latex/riscv_config.pdf
# asset_name: riscv_config.pdf
# asset_content_type: application/pdf



32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-version:
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__ = '.*?'" riscof/__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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ common/__pycache__/

framework/__pycache__/

riscv-arch-test/

dbgen/__pycache__/

*work/
Expand Down
71 changes: 0 additions & 71 deletions .gitlab-ci.yml

This file was deleted.

22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
# Changelog
# CHANGELOG

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.21.0] - 2021-07-21
- Changed CI script from gitlab to github actions
- Removing hosted cgf files
- Removing hosted riscv-test-suite
- Removing hosted database.yaml
- Updated report to capture the version of the riscv-arch-test suite used during run
- Added new cli - 'arch-test' to automatically clone, update and maintain the riscv-arch-test repo
- Using annotated tags for CI releases
- `suite` and `env` are now required cli args
- updated docs
- added new sections on commands and inputs.
- Revised the installation and riscv-arch-test sections.
- Fixed testlist and dbgen usage and formats
- Cleaned up examples.
- Removed testformat spec.
- Removed section on adding new tests.
- Adding new doc on available PLUGINS for RISCOF.
- Fixed links for new repo transition


## [1.20.3] - 2021-06-30
- Updated docs with guide on running riscv-arch-tests with RISCOF

Expand Down
27 changes: 23 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://gitlab.com/incoresemi/riscof/issues.
Report bugs at https://github.com/riscv/riscof/issues.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://gitlab.com/incoresemi/riscof/issues.
The best way to send feedback is to file an issue at https://github.com/riscv/riscof/issues.

If you are proposing a feature:

Expand All @@ -38,7 +38,7 @@ Ready to contribute? Here's how to set up `riscof` for local development.
1. Fork the `riscof` repo on GitLab.
2. Clone your fork locally::

$ git clone https://gitlab.com/incoresemi/riscof.git
$ git clone https://github.com/riscv/riscof.git

3. Create an issue and WIP merge request that creates a working branch for you::

Expand All @@ -54,14 +54,33 @@ Ready to contribute? Here's how to set up `riscof` for local development.

5. Submit a merge request through the GitLab website.

Versioning
----------

When issuing pull requests, an entry in the CHANGELOG.md is mandatory. The arch-test-repo adheres to
the [`Semantic Versioning`](https://semver.org/spec/v2.0.0.html) scheme. Following guidelines must
be followed while assigning a new version number :

- Patch-updates: all doc updates (like typos, more clarification,etc) and updates to unratified extensions.
- Minor-updates: Fixing bugs in current features, adding new features which do not break current features or working.
- Major-updates: Changes to the framework flow (backward compatible or incompatible).

Note: You can have either a patch or minor or major update.
Note: In case of a conflict, the maintainers will decide the final version to be assigned.

To update the version of the python package for deployment you can use the following::

$ bumpversion --no-tag --config-file setup.cfg patch # possible: major / minor / patch


Merge Request Guidelines
----------------------------

Before you submit a merge request, check that it meets these guidelines:

1. The merge request should include tests (if any).
2. If the merge request adds functionality, the docs should be updated.
3. The merge request should work for Python 3.6, 3.7 and 3.8, and for PyPy.
3. The merge request should work for Python 3.6, 3.7 and 3.8, and for PyPi.
and make sure that the tests (if any) pass for all supported Python versions.

Deploying
Expand Down
11 changes: 11 additions & 0 deletions PLUGINS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _prebuilt_plugins:

List of Reference RISCOF Plugins
================================

This section provides a list of pre-built riscof-plugins which users can refer
to, to build plugins for their own DUT

- Spike: https://github.com/riscv/riscv-isa-sim/riscof-plugins/README.md
- SAIL_cSim: https://github.com/rems-project/sail-riscv/riscof-plugins/README.md
- InCore Plugins: https://gitlab.com/incoresemi/riscof-plugins (This is a collection of riscof based plugins for various targets hosted purely for reference.)
4 changes: 2 additions & 2 deletions docs/source/_templates/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<dl>
<dt>{{ _('Quick Links') }}</dt>
<dd>
<a href="https://gitlab.com/incoresemi/riscof">Project Home</a>
<a href="https://github.com/riscv/riscof">Project Home</a>
</dd>
<dd>
<a href="https://gitlab.com/incoresemi/riscof/-/releases">Releases</a>
<a href="https://github.com/riscv/riscof/releases">Releases</a>
</dd>
</dl>
</div>
Expand Down
Loading

0 comments on commit f4ceecc

Please sign in to comment.