-
Notifications
You must be signed in to change notification settings - Fork 1k
Reapply "Workflow adjustments" #5301
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eb773ce
Reapply "Workflow adjustments"
KrystalDelusion b42be1d
ci: Fix test-cells
KrystalDelusion d63f43a
ci: iverilog before yosys
KrystalDelusion 94d0787
test-sanitizers.yml: Build in-tree
KrystalDelusion 1cdf058
ci: Fix iverilog version caching
KrystalDelusion 3ca2b79
memlib: Fix ubsan
KrystalDelusion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,109 @@ | ||
| name: Check clang sanitizers | ||
|
|
||
| on: | ||
| # always test main | ||
| push: | ||
| branches: | ||
| - main | ||
| # ignore PRs due to time needed | ||
| # allow triggering tests, ignores skip check | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| pre_job: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
| steps: | ||
| - id: skip_check | ||
| uses: fkirc/skip-duplicate-actions@v5 | ||
| with: | ||
| # don't run on documentation changes | ||
| paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' | ||
|
|
||
| run_san: | ||
| name: Build and run tests | ||
| runs-on: ${{ matrix.os }} | ||
| needs: pre_job | ||
| if: needs.pre_job.outputs.should_skip != 'true' | ||
| env: | ||
| CC: clang | ||
| ASAN_OPTIONS: halt_on_error=1 | ||
| UBSAN_OPTIONS: halt_on_error=1 | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| sanitizer: ['undefined,address'] | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout Yosys | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup environment | ||
| uses: ./.github/actions/setup-build-env | ||
|
|
||
| - name: Get iverilog | ||
| id: get-iverilog | ||
| shell: bash | ||
| run: | | ||
| git clone https://github.com/steveicarus/iverilog.git | ||
| cd iverilog | ||
| echo "IVERILOG_GIT=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Get vcd2fst | ||
| shell: bash | ||
| run: | | ||
| git clone https://github.com/mmicko/libwave.git | ||
| mkdir -p ${{ github.workspace }}/.local/ | ||
| cd libwave | ||
| cmake . -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.local | ||
| make -j$procs | ||
| make install | ||
|
|
||
| - name: Cache iverilog | ||
| id: cache-iverilog | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .local/ | ||
| key: ${{ matrix.os }}-${{ steps.get-iverilog.outputs.IVERILOG_GIT }} | ||
|
|
||
| - name: Build iverilog | ||
| if: steps.cache-iverilog.outputs.cache-hit != 'true' | ||
| shell: bash | ||
| run: | | ||
| mkdir -p ${{ github.workspace }}/.local/ | ||
| cd iverilog | ||
| autoconf | ||
| CC=gcc CXX=g++ ./configure --prefix=${{ github.workspace }}/.local | ||
| make -j$procs | ||
| make install | ||
|
|
||
| - name: Check iverilog | ||
| shell: bash | ||
| run: | | ||
| iverilog -V | ||
|
|
||
| - name: Build | ||
| shell: bash | ||
| run: | | ||
| make config-$CC | ||
| echo 'SANITIZER = ${{ matrix.sanitizer }}' >> Makefile.conf | ||
| make -j$procs ENABLE_LTO=1 | ||
|
|
||
| - name: Log yosys-config output | ||
| run: | | ||
| ./yosys-config || true | ||
|
|
||
| - name: Run tests | ||
| shell: bash | ||
| run: | | ||
| make -j$procs test TARGETS= EXTRA_TARGETS= CONFIG=$CC | ||
|
|
||
| - name: Report errors | ||
| if: ${{ failure() }} | ||
| shell: bash | ||
| run: | | ||
| find tests/**/*.err -print -exec cat {} \; |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm morbidly curious why this change is required 🤔 Is something about how
find_single_capis declared interfering with the implicit conversion to bool?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual fix is assigning a default value to
PortVariant::clk_en, this change was incidental while investigating but it made sense to me to leave it in since it helps with readability.