fixing stream behaviour for rb buffer #123
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: "Build" | |
| on: | |
| issue_comment: | |
| types: [ created ] | |
| jobs: | |
| trigger-comment: | |
| if: github.event.issue.pull_request && contains(github.event.comment.body, '/build_and_test') && (github.actor == 'romerojosh' || github.actor == 'azrael417') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: "Post trigger comment" | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: `🚀 Build workflow triggered! [View run](${workflowUrl})` | |
| }); | |
| build: | |
| needs: trigger-comment | |
| if: github.event.issue.pull_request && contains(github.event.comment.body, '/build_and_test') && (github.actor == 'romerojosh' || github.actor == 'azrael417') | |
| strategy: | |
| matrix: | |
| include: | |
| - name: "GPU build (NVHPC SDK 25.7, Ubuntu 22.04)" | |
| dockerfile: "Dockerfile" | |
| free_space: true | |
| run_tests: false | |
| - name: "GPU build (GNU, Ubuntu 22.04)" | |
| dockerfile: "Dockerfile_gnu" | |
| free_space: true | |
| run_tests: false | |
| - name: "CPU build (GNU, Ubuntu 22.04)" | |
| dockerfile: "Dockerfile_gnu_cpuonly" | |
| free_space: false | |
| run_tests: true | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Free disk space" | |
| if: ${{ matrix.free_space }} | |
| run: | | |
| sudo rm -rf /usr/local/lib/android || true | |
| sudo rm -rf /usr/share/dotnet || true | |
| - name: "Retrieve PR info" | |
| uses: actions/github-script@v7 | |
| id: pr-info | |
| with: | |
| script: | | |
| const pr = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.issue.number | |
| }); | |
| core.setOutput('sha', pr.data.head.sha); | |
| - name: "Checkout PR code" | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ steps.pr-info.outputs.sha }} | |
| - name: "Set up Docker Buildx" | |
| uses: docker/setup-buildx-action@v3 | |
| - name: "Build docker container" | |
| run: | | |
| docker build -t torchfort -f docker/${{ matrix.dockerfile }} . | |
| - name: "Run tests" | |
| if: ${{ matrix.run_tests }} | |
| run: | | |
| docker run -v ${PWD}/.github/scripts:/scripts -w /scripts --rm torchfort ./run_ci_tests.sh | |
| result-comment: | |
| needs: build | |
| if: always() && github.event.issue.pull_request && contains(github.event.comment.body, '/build_and_test') && (github.actor == 'romerojosh' || github.actor == 'azrael417') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: "Post result comment" | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const workflowUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`; | |
| const success = '${{ needs.build.result }}' === 'success'; | |
| const message = success | |
| ? `✅ Build workflow passed! [View run](${workflowUrl})` | |
| : `❌ Build workflow failed! [View run](${workflowUrl})`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: message | |
| }); |