Fix memory initialization (#676) #1764
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
name: Verilator Verification Features Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: "0 7 * * *" | |
jobs: | |
matrix: | |
name: Generate test matrix | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.make_matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
clean: false | |
- name: Make build matrix | |
id: make_matrix | |
run: echo "matrix=$(ls verilator | jq -R -s -c 'split("\n")[:-1]')" >> "$GITHUB_OUTPUT" | |
test: | |
name: Test branch ${{ matrix.VERILATOR_BRANCH }} | |
needs: matrix | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
VERILATOR_BRANCH: ${{fromJson(needs.matrix.outputs.matrix)}} | |
env: | |
CCACHE_COMPRESS: 1 | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_LIMIT_MULTIPLE: 0.95 | |
CCACHE_MAXSIZE: 150M | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
clean: false | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install gcc-11 g++-11 | |
sudo apt-get -y install bison flex libfl-dev | |
sudo apt-get -y install ccache | |
sudo apt-get -y install python3-pip python3-setuptools | |
sudo apt-get -y install help2man | |
sudo apt-get -y install z3 | |
sudo pip3 install pyyaml | |
sudo pip3 install jinja2 | |
sudo pip3 install robotframework | |
- name: Cache $CCACHE_DIR | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ matrix.VERILATOR_BRANCH }} | |
- name: Setup repository | |
run: scripts/build_and_run --setup | |
- name: Build Verilator | |
env: | |
CC: gcc-11 | |
CXX: g++-11 | |
run: scripts/build_and_run --build ${{ matrix.VERILATOR_BRANCH }} | |
- name: Generate Robot test files | |
run: scripts/build_and_run --gen-tests ${{ matrix.VERILATOR_BRANCH }} | |
- name: Run tests | |
run: scripts/build_and_run --run-tests | |
- name: Upload test output | |
uses: actions/upload-artifact@v4 | |
with: | |
path: "*.xml" | |
name: output-${{ matrix.VERILATOR_BRANCH }} | |
automerge: | |
name: Automerge dependabot pull requests | |
needs: [test] | |
if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Trigger automerge | |
run: GITHUB_TOKEN='${{ github.token }}' gh pr merge '${{ github.event.pull_request.html_url }}' --squash | |
report: | |
name: Generate test report | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
clean: false | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install python3-pip python3-setuptools | |
sudo pip3 install robotframework | |
# install custom theme | |
sudo cp -r theme/rebot/ /usr/local/lib/python3.10/dist-packages/robot/htmldata/ | |
- name: Download test output | |
uses: actions/download-artifact@v4 | |
- name: Create report | |
run: | | |
mv output-*/*.xml . | |
scripts/build_and_run --gen-report | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: report | |
path: | | |
report.html | |
log.html | |
- name: Checkout GH Pages branch | |
if: github.ref == 'refs/heads/main' | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
fetch-depth: 0 | |
path: gh-pages | |
- name: Deploy to GH Pages | |
if: github.ref == 'refs/heads/main' | |
run: | | |
mv -f report.html gh-pages/index.html | |
mv -f log.html gh-pages | |
cd gh-pages | |
touch .nojekyll | |
git add *.html | |
git config --local user.email "push@gha" | |
git config --local user.name "GHA" | |
git commit -m "update ${{ github.sha }}" --allow-empty | |
git push -u origin gh-pages |