-
Notifications
You must be signed in to change notification settings - Fork 0
Array support #7
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
18 commits
Select commit
Hold shift + click to select a range
d3b82d8
Finish one-d array ir generation
anfsity a07c517
Update .clang-format
anfsity a21e076
Update test script and test resources
anfsity e23aa62
Finish lv9 ir part
anfsity 3c5af5d
Fix bugs
anfsity a0ec9a7
Adjust clang format
anfsity 15a5a9e
Adjust devcontainer configuraion
anfsity cc4f675
Update devcontainer configuration
anfsity 12f42b9
Update CI
anfsity 4876eac
Update makefile
anfsity 58e3178
Enhance backend with array support and improve code generation for RI…
anfsity f4bb091
Update CI
anfsity 30da726
Update CI
anfsity 8e01817
Update CI
anfsity 6cd6336
Update CI
anfsity 8c7f7cc
Update CI
anfsity 9311d53
Fix bug
anfsity 417b0ef
Enhance comments
anfsity 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,60 @@ | ||
| name: compiler auto test | ||
| run-name: ${{ github.actor }} is testing out compiler function 🚀 | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'project/**' | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| build_compiler: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: maxxing/compiler-dev | ||
| defaults: | ||
| run: | ||
| working-directory: ./project | ||
| outputs: | ||
| artifact_name: compiler-binary | ||
| steps: | ||
| - name: Check out repository code | ||
| uses: actions/checkout@v5 | ||
| - name: test koopa | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Ninja | ||
| run: | | ||
| autotest -w debug -koopa -s lv1 . | ||
| autotest -w debug -koopa -s lv3 . | ||
| autotest -w debug -koopa -s lv4 . | ||
| autotest -w debug -koopa -s lv5 . | ||
| autotest -w debug -koopa -s lv6 . | ||
| autotest -w debug -koopa -s lv7 . | ||
| autotest -w debug -koopa -s lv8 . | ||
| - name: test riscv | ||
| apt-get update && apt-get install -y ninja-build | ||
| ninja --version | ||
|
|
||
| - name: Build Binary | ||
| run: make | ||
|
|
||
| test_compiler: | ||
| needs: build_compiler | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: maxxing/compiler-dev | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test_type: [koopa, riscv] | ||
| defaults: | ||
| run: | ||
| working-directory: ./project | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Ninja | ||
| run: | | ||
| autotest -w debug -riscv -s lv1 . | ||
| autotest -w debug -riscv -s lv3 . | ||
| autotest -w debug -riscv -s lv4 . | ||
| autotest -w debug -riscv -s lv5 . | ||
| autotest -w debug -riscv -s lv6 . | ||
| autotest -w debug -riscv -s lv7 . | ||
| apt-get update && apt-get install -y ninja-build | ||
| ninja --version | ||
|
|
||
| - name: Run Test | ||
| run: autotest -w debug -${{ matrix.test_type }} . | ||
|
|
||
| - name: Upload Test Logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: test-logs-${{ matrix.test_type }} | ||
| path: project/debug/ | ||
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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| AllowShortCaseLabelsOnASingleLine: true | ||
| AllowShortCaseLabelsOnASingleLine: true | ||
| AllowShortIfStatementsOnASingleLine: AllIfsAndElse |
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
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.
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.
The
test_compilerjob depends onbuild_compilerbut doesn't actually use the built artifact. The build job declares an outputartifact_name: compiler-binarybut never uploads the artifact, and the test job doesn't download it. This means the compiler will be rebuilt in the test job. Either remove the dependency andoutputsdeclaration frombuild_compiler, or implement artifact upload/download to avoid rebuilding in the test job.