Skip to content

Use GitHub Actions to build and test NVDA#17728

Merged
seanbudd merged 192 commits intonvaccess:masterfrom
nvdaes:githubActions
Apr 7, 2025
Merged

Use GitHub Actions to build and test NVDA#17728
seanbudd merged 192 commits intonvaccess:masterfrom
nvdaes:githubActions

Conversation

@nvdaes
Copy link
Copy Markdown
Collaborator

@nvdaes nvdaes commented Feb 23, 2025

Link to issue number:

fixes #10516

Summary of the issue:

Currently Appveyor is used to build and test NVDA. GitHub Actions may be preferred, since it's on GitHub and may be easier to use.

Description of user facing changes

None

Description of development approach

  1. New GitHub Workflows:

    • .github/workflows/testAndPublish.yml: CI / CD for NVDA - to replace AppVeyor
    • .github/workflows/scan-release.yml: For scanning published releases with Virus Total
  2. Pre-commit Configuration:

    • .pre-commit-config.yaml: Updated to consider changes to pyproject.toml when running license check files.
  3. Tests:

    • tests/checkPot.py: Updated print statements to direct output to stderr for certain messages.
    • tests/unit/test_checkPot/__init__.py: Adjusted the redirection of stdout and stderr for ordered output and modified assertions.
  4. Project Configuration:

    • pyproject.toml: Removed several dependencies from the ignore_packages list (due to Apache compatibility now claimed) and adjusted the licenses section.

Testing strategy:

Example PR with failures: https://github.com/nvaccess/nvda/actions/runs/14255068906
Sample release:

Known issues with pull request:

Note: incomplete parity to AppVeyor: #17878

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@nvdaes nvdaes changed the title githubActions Use GitHub Actions to build and test NVDA Feb 23, 2025
@AppVeyorBot
Copy link
Copy Markdown

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit ac008495eb

@AppVeyorBot
Copy link
Copy Markdown

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit 73bfa0bf5c

@AppVeyorBot
Copy link
Copy Markdown

  • Build execution time has reached the maximum allowed time for your plan (60 minutes).

See test results for failed build of commit 44cfa0d95b

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Feb 24, 2025
@nvdaes nvdaes closed this Mar 1, 2025
@nvdaes nvdaes reopened this Mar 1, 2025
@nvdaes
Copy link
Copy Markdown
Collaborator Author

nvdaes commented Mar 1, 2025

Here GitHub Actions cannot post a comment since this is not approved by NV Access, I think. But I tested this on this pull request on my fork:

nvdaes#10

@AppVeyorBot
Copy link
Copy Markdown

  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • PASS: License check.
  • FAIL: Unit tests. See test results for more information.
  • PASS: Lint check.
  • PASS: System tests (tags: installer NVDA).
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/htlvtguox2te5rcr/artifacts/output/nvda_snapshot_pr17728-35501,b1523531.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.3,
    INSTALL_END 1.1,
    BUILD_START 0.0,
    BUILD_END 17.9,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.4,
    TEST_START 0.0,
    TEST_END 18.9,
    FINISH_END 0.1

See test results for failed build of commit b15235319b

@nvdaes nvdaes marked this pull request as ready for review March 1, 2025 12:26
@nvdaes nvdaes requested a review from a team as a code owner March 1, 2025 12:26
@nvdaes nvdaes requested a review from SaschaCowley March 1, 2025 12:26
@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Mar 5, 2025

@nvdaes - it's really exciting that you've got this working now! I do think we'd like to take advantage of the modularisation capabilities of GitHub actions - creating separate workflows for independent tasks

@seanbudd seanbudd marked this pull request as draft March 5, 2025 03:11
@nvdaes
Copy link
Copy Markdown
Collaborator Author

nvdaes commented Mar 5, 2025

Thanks @seanbudd .
Perhaps we can create a composite action for future maintenance of the four parallel workflows, avoiding duplications, for example when the Python version needs to be changed.
I can create it and if you want I can transfer it to NV Access, though we are using my build-discussion action in the store from my account.
The composite action may be used to prepare the source code with all cores.

@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Mar 5, 2025

Yes a composite action that kicks off each workflow and especially one which caches scons source and the venv would be ideal

@nvdaes
Copy link
Copy Markdown
Collaborator Author

nvdaes commented Mar 5, 2025

Yes a composite action that kicks off each workflow and especially one which caches scons source and the venv would be ideal

OK, I had thought about catching, but I waited for comments.

@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Mar 5, 2025

Could you also make it so there's an easy way to retrigger a build?

Also for testing with this PR, can you introduce an error into each of these test workflows, so we can see how GitHub handles a failure?

We can remove them before merging.

@AppVeyorBot
Copy link
Copy Markdown

  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • FAIL: License check. See C:\projects\nvda\testOutput\license\licenseCheckResults.md for more information.
  • FAIL: Unit tests. See test results for more information.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/wyb9hdg451xrru79/artifacts/output/nvda_snapshot_pr17728-35878,f2b18737.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.2,
    INSTALL_END 0.9,
    BUILD_START 0.0,
    BUILD_END 17.7,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.4,
    TEST_START 0.0,
    TEST_END 18.9,
    FINISH_END 0.1

See test results for failed build of commit f2b18737a8

@AppVeyorBot
Copy link
Copy Markdown

  • FAIL: Translation comments check. Translation comments missing or unexpectedly included. See build log for more information.
  • FAIL: License check. See C:\projects\nvda\testOutput\license\licenseCheckResults.md for more information.
  • FAIL: Unit tests. See test results for more information.
  • FAIL: System tests (tags: installer NVDA). See test results for more information.
  • Build (for testing PR): https://ci.appveyor.com/api/buildjobs/s47g48ketq7sw1ro/artifacts/output/nvda_snapshot_pr17728-35879,31b369b7.exe
  • CI timing (mins):
    INIT 0.0,
    INSTALL_START 1.2,
    INSTALL_END 1.0,
    BUILD_START 0.0,
    BUILD_END 18.1,
    TESTSETUP_START 0.0,
    TESTSETUP_END 0.4,
    TEST_START 0.0,
    TEST_END 19.1,
    FINISH_END 0.1

See test results for failed build of commit 31b369b741

@seanbudd seanbudd marked this pull request as ready for review April 4, 2025 00:56
@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Apr 4, 2025

I've updated the PR description and fleshed out the logging, error reporting and artifacts a bit more. I think this is in a much better state than appveyor now

@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Apr 4, 2025

Things to note for devs testing the new UX:

  • Example PR with failures: https://github.com/nvaccess/nvda/actions/runs/14255068906
  • jobs are split and appear as separate checks on the PR.
  • With NVDA CI/CD on GitHub actions, we can use Copilot to debug build failures. Click on each failed job and try using "explain error".
  • Job summaries contain information on failure/success of jobs
  • Annotations contain further line references on unit/system test failures
  • Artifacts are grouped by job as we can only download in zips anyway
  • I've reworked scons checkPot (translation comment check) to output errors to stderr to improve logging behaviour. On AppVeyor you had to view build logs to fix these CI/CD errors.

@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Apr 4, 2025

@seanbudd seanbudd added this to the 2025.2 milestone Apr 4, 2025
Copy link
Copy Markdown
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really love this! Just some remaining very minor things.

Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Copy link
Copy Markdown
Member

@SaschaCowley SaschaCowley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @nvdaes and @seanbudd!

@seanbudd seanbudd merged commit 99445b8 into nvaccess:master Apr 7, 2025
13 checks passed
SaschaCowley pushed a commit that referenced this pull request Apr 7, 2025
Fixup to #17728 
Due to #17878 

Summary of the issue:
GitHub actions is now building NVDA, however we are not ready to release
and deploy a signed copy of NVDA yet (see #17878).
As such, we shouldn't build tagged releases with GitHub actions

Description of user facing changes
None

Description of development approach
Disable tagged releases from GitHub actions until #17878 is closed
nvdaes added a commit to nvdaes/nvda that referenced this pull request Apr 10, 2025
fixes nvaccess#10516

Summary of the issue:
Currently Appveyor is used to build and test NVDA. GitHub Actions may be preferred, since it's on GitHub and may be easier to use.

Description of user facing changes
None

Description of development approach
New GitHub Workflows:

.github/workflows/testAndPublish.yml: CI / CD for NVDA - to replace AppVeyor
.github/workflows/scan-release.yml: For scanning published releases with Virus Total
Pre-commit Configuration:

.pre-commit-config.yaml: Updated to consider changes to pyproject.toml when running license check files.
Tests:

tests/checkPot.py: Updated print statements to direct output to stderr for certain messages.
tests/unit/test_checkPot/__init__.py: Adjusted the redirection of stdout and stderr for ordered output and modified assertions.
Project Configuration:

pyproject.toml: Removed several dependencies from the ignore_packages list (due to Apache compatibility now claimed) and adjusted the licenses section.
nvdaes pushed a commit to nvdaes/nvda that referenced this pull request Apr 10, 2025
Fixup to nvaccess#17728 
Due to nvaccess#17878 

Summary of the issue:
GitHub actions is now building NVDA, however we are not ready to release
and deploy a signed copy of NVDA yet (see nvaccess#17878).
As such, we shouldn't build tagged releases with GitHub actions

Description of user facing changes
None

Description of development approach
Disable tagged releases from GitHub actions until nvaccess#17878 is closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to use GitHub Actions to build NVDA

9 participants