-
Notifications
You must be signed in to change notification settings - Fork 3
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
add GitHub action to test examples with VUnit action #3
Comments
Hi Marco! On the one hand, examples are executed as part of the acceptance test suite: https://github.com/VUnit/vunit/blob/master/tests/acceptance/test_external_run_scripts.py. On the other hand, the docker image used in the VUnit Action is Hence, I think we should not use the Action to test the core of the project itself. Otherwise, we might run into issues when incompatible changes are done to the codebase and the examples at the same time, because the Action would not match. Nevertheless, I think that the Action can be used in other repositories of the org, such as the verification component repos. Currently https://github.com/VUnit/vc_axi and https://github.com/VUnit/vc_uart are placeholders. But we expect to use them soon (see VUnit/vunit#520 and VUnit/vunit#511). Regarding enhancements related to Actions in this repository, I think we should replace the installation on Windows (https://github.com/VUnit/vunit/blob/master/.github/workflows/push.yml#L102-L109) and maybe on Linux (https://github.com/VUnit/vunit/blob/master/.github/workflows/push.yml#L54-L75) with setup-ghdl-ci. See, for example, https://github.com/ghdl/ghdl-cosim/blob/master/.github/workflows/test.yml#L42-L79. Unfortunately, there are some performance issues yet: msys2/setup-msys2#23. About VUnit Action, a possible enhancement would be to allow users to select between Apart from that, in the longer term I'd like to extend VUnit Action with a JavaScript/TypeScript version. Unfortunately, only JavaScript Actions can be executed on the three host virtual environments (ubuntu-latest, windows-latest and macos-latest). Docker/Container Actions can only be used in Linux jobs. Ideally, it would be expected to be used after |
Is the acceptance test suite part of the CI?
Oh, you are right ^^' |
Yes. There are basically three groups of tests (unit, acceptance and vcomponents): https://github.com/VUnit/vunit/blob/master/tox.ini#L31-L37. On Linux: On Docker: On Windows: |
Ok, thank you, after a little walk-through of the actions it was not clear to me at first.
Maybe with a typescript action in some way you can read the tag of the dockerfile from an optional action parameter that defaults to "llvm"? Then you just execute "docker run" with the selected image. Anyway if this is OT here, this could be a topic for another issue (in the vunit_action repository?) and this issue may be closed. |
I think it might be easier to use two Dockerfiles and the features in inputs:
version:
description: 'Use VUnit master instead of stable'
default: 'stable'
run_file:
description: 'python VUnit run file'
default: 'run.py'
runs:
using: 'docker'
image: 'Dockerfile.${{ inputs.version }}'
args:
- ${{ inputs.run_file }} The current Dockerfile would be renamed to OTOH, inputs are exposed as environment variables in the container. I know it works when the container is executed, but I don't know if the same variables are available when it is built. So, the following might or might not work: inputs:
image:
description: 'Use another image'
default: 'ghdl/vunit:llvm'
run_file:
description: 'python VUnit run file'
default: 'run.py'
runs:
using: 'docker'
image: 'Dockerfile' FROM $INPUT_IMAGE
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /root/entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/root/entrypoint.sh"]
CMD [$INPUT_RUN_FILE]
Yes, I think we should transfer this issue. However, I don't have enough permissions to do it. I can move it to other repos in the org, but not to vunit_action. @LarsAsplund, can you do it? |
Examples should be valid after each push or pull request on this repository.
In order to do this, VUnit action should be run against each example.
The text was updated successfully, but these errors were encountered: