|
| 1 | +name: Run checks and build NVDA |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - beta |
| 8 | + - rc |
| 9 | + - try-** |
| 10 | + - release-** |
| 11 | + - githubActions # To be removed |
| 12 | + |
| 13 | + pull_request: |
| 14 | + branches: |
| 15 | + - master |
| 16 | + - beta |
| 17 | + - rc |
| 18 | + - try-** |
| 19 | + - release-** |
| 20 | + |
| 21 | + workflow_dispatch: |
| 22 | +concurrency: |
| 23 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 24 | + cancel-in-progress: true |
| 25 | +env: |
| 26 | + if: $GITHUB_EVENT_NAME == 'pull_request' |
| 27 | + pullRequestNumber: ${{ github.event.number }} |
| 28 | +jobs: |
| 29 | + build: |
| 30 | + runs-on: windows-latest |
| 31 | + defaults: |
| 32 | + run: |
| 33 | + shell: cmd |
| 34 | + permissions: |
| 35 | + contents: write |
| 36 | + pull-requests: write |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + submodules: true |
| 41 | + - name: Install dependencies |
| 42 | + uses: actions/setup-python@v5 |
| 43 | + with: |
| 44 | + python-version: '3.11' |
| 45 | + architecture: x86 |
| 46 | + - name: Set version variables |
| 47 | + run: powershell.exe ci/scripts/setBuildVersionVars.ps1 |
| 48 | + - name: Set scons args |
| 49 | + run: powershell.exe ci/scripts/setSconsArgs.ps1 |
| 50 | + - name: Prepare source code |
| 51 | + run: scons source %sconsArgs% --all-cores |
| 52 | + - name: Run launcher |
| 53 | + run: scons launcher version=%version% --all-cores |
| 54 | + - name: Prepare for tests |
| 55 | + run: powershell.exe ci/scripts/tests/beforeTests.ps1 |
| 56 | + - name: Install NVDA |
| 57 | + run: powershell.exe ci/scripts/installNVDA.ps1 |
| 58 | + - name: Check comments for translators |
| 59 | + run: powershell.exe ci/scripts/tests/translationCheck.ps1 |
| 60 | + - name: License check |
| 61 | + run: powershell.exe ci/scripts/tests/licenseCheck.ps1 |
| 62 | + - name: Run unit tests |
| 63 | + run: powershell.exe ci/scripts/tests/unitTests.ps1 |
| 64 | + - name: Run system tests |
| 65 | + run: powershell.exe ci/scripts/tests/systemTests.ps1 |
| 66 | + - name: Upload NVDA |
| 67 | + uses: actions/upload-artifact@v4 |
| 68 | + with: |
| 69 | + name: NVDA |
| 70 | + path: output/*.exe |
| 71 | + compression-level: 0 |
| 72 | + overwrite: true |
| 73 | + - name: Upload test results |
| 74 | + id: testResults |
| 75 | + uses: actions/upload-artifact@v4 |
| 76 | + with: |
| 77 | + name: Test Results |
| 78 | + path: testOutput |
| 79 | + overwrite: true |
| 80 | + - name: Check tests failure |
| 81 | + run: powershell.exe ci/scripts/tests/checkTestFailure.ps1 |
| 82 | + - name: Get summary |
| 83 | + id: getSummary |
| 84 | + if: ${{ failure() && github.event_name == 'pull_request' }} |
| 85 | + uses: austenstone/job-summary@v2.0 |
| 86 | + with: |
| 87 | + create-pdf: false |
| 88 | + create-pdf-artifact: false |
| 89 | + create-md-artifact: true |
| 90 | + - name: Comment on failure |
| 91 | + if: ${{ failure() && github.event_name == 'pull_request' }} |
| 92 | + uses: peter-evans/create-or-update-comment@v4 |
| 93 | + with: |
| 94 | + issue-number: ${{ github.event.number }} |
| 95 | + body: | |
| 96 | + ${{ steps.getSummary.outputs.job-summary }} |
| 97 | + [Download test results](${{ steps.testResults.artifact-url }}) |
0 commit comments