SSA CFG: identity remover pass and TLSF backed instruction store #109
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
| name: Code Style Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| chk_coding_style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt --quiet update | |
| sudo apt install --yes shellcheck git openssl | |
| - name: Check for C++ coding style | |
| id: style-check | |
| run: | | |
| output=$(scripts/check_style.sh 2>&1) || { | |
| delimiter="$(openssl rand -hex 8)" | |
| { | |
| echo "output<<${delimiter}" | |
| echo "$output" | |
| echo "${delimiter}" | |
| } >> "$GITHUB_OUTPUT" | |
| exit 1 | |
| } | |
| - name: Comment PR on failure | |
| if: ${{ failure() && steps.style-check.outcome == 'failure' }} | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd #v8.0.0 | |
| env: | |
| STYLE_OUTPUT: ${{ steps.style-check.outputs.output }} | |
| with: | |
| script: | | |
| const output = process.env.STYLE_OUTPUT; | |
| const headSha = context.payload.pull_request.head.sha; | |
| const body = `There was an error when running \`Code Style Check\` for commit \`${headSha}\`: | |
| \`\`\` | |
| ${output} | |
| \`\`\` | |
| Please check that your changes are working as intended.`; | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: body | |
| }); | |
| for (const line of output.split('\n')) { | |
| const match = line.match(/^\[([^\]]+)\]\s*([^:]+\.(cpp|h)):(\d+):/); | |
| if (!match) continue; | |
| const [, errorDescription, filePath, , lineNumber] = match; | |
| try { | |
| await github.rest.pulls.createReviewComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.issue.number, | |
| commit_id: headSha, | |
| path: filePath, | |
| line: parseInt(lineNumber), | |
| side: 'RIGHT', | |
| body: `**Coding style error:** ${errorDescription}` | |
| }); | |
| } catch (error) { | |
| console.log(`Could not add inline comment for ${filePath}:${lineNumber}: ${error.message}`); | |
| } | |
| } | |
| - name: checking shell scripts | |
| run: scripts/chk_shellscripts/chk_shellscripts.sh | |
| - name: Check for broken symlinks | |
| run: scripts/check_symlinks.sh |