Skip to content
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

APDFL-5453: Add CI for .NET Framework samples with GitHub Actions #30

Conversation

datalogics-saharay
Copy link
Contributor

@datalogics-saharay datalogics-saharay commented Mar 19, 2024

Let's build out the GitHub Actions workflow file to build and run the .NET Framework samples in CI.

Fulfills JIRA issue: APDFL-5453

@datalogics-saharay datalogics-saharay force-pushed the APDFL-5453-add-CI-for-NET-Framework-samples branch from f0e3aa8 to 7bf343e Compare March 19, 2024 21:27
- Let's add the list of sample directories to the workflow file.

- Added steps for checking out code, modifying PATH to include path
  to msbuild, and build sample solution files using MSBuild.

- The reason we need to use MSBuild to build the samples in CI is because
  we are unable to install Visual Studio on the GitHub Actions runner.
- The samples are targeting .NET Framework 4.7.2, and the
  windows-latest runner does not support it. Let's change the
  GitHub runner to windows-2019, which should support .NET Framework 4.
@datalogics-saharay datalogics-saharay force-pushed the APDFL-5453-add-CI-for-NET-Framework-samples branch from 7bf343e to 4759e3e Compare March 19, 2024 21:40
- That way, the msbuild command that builds the sample will be able
  to detect that the APDFL NuGet .NET Framework package is present
  on the GitHub runner.
- Some of the samples do not have .sln files, so there were some failures
  while trying to install NuGet packages. Let's run the nuget restore and
  msbuild commands with the .csproj files instead.

- The WebApplication sample doesn't have a .csproj or .sln file, so
  we will be unable to run it in CI.
- The Display samples were failing to build because a platform was
  not specified. Let's try specifying x64 as the platform to get
  past that error.
@datalogics-saharay datalogics-saharay force-pushed the APDFL-5453-add-CI-for-NET-Framework-samples branch 2 times, most recently from 3e16e25 to 5d7e25d Compare March 20, 2024 21:59
- It seems that the DotNETViewer sample is reliant on the DotNETViewerComponent
  sample in order to build. Let's add some logic to the "Build samples" step, so
  that when we build the DotNetViewer sample the DotNETViewerComponent sample is
  also built.

- The DotNETViewerComponent sample will also require the necessary NuGet packages to
  be installed when testing the DotNETViewer sample. Let's add some logic to the
  "Install NuGet packages" step to install the packages for DotNETViewerComponent when
  the workflow is testing the DotNETViewer sample.
@datalogics-saharay datalogics-saharay force-pushed the APDFL-5453-add-CI-for-NET-Framework-samples branch from 5d7e25d to cd8807a Compare March 21, 2024 16:25
- The Printing samples actually need access to a printer, and the
  GitHub runner cannot be connected to one. Let's just disable the
  Printing samples, so they will not run in CI.
@datalogics-saharay datalogics-saharay force-pushed the APDFL-5453-add-CI-for-NET-Framework-samples branch from 28c56ad to 8b696fe Compare March 21, 2024 17:48
-  The Display samples display a GUI for the user to interact with
   when run. However, the GitHub runner is not capable of displaying
   the GUI, so the job gets stuck. Let's disable those samples in CI
   to allow CI to move forward.
- Also, correct a print statement in the ListPaths sample.
- The DocToImages sample was failing to run in CI because it requires
  some additional command line arguments. Let's add some logic to the
  "Run samples" step to run the DocToImages sample with th  appropriate
  arguments.
- Add a step that saves the sample directory name as an
  environment variable, which will be used to name the directory
  where the sample output will be saved.

- Also, list files in a sample directory for more visibility on
  files that are present.
- When CI goes to artifact the output files produced by the
  sample run, it can't find them. Let's have the samples dump
  their output in the sample directory.
@datalogics-saharay datalogics-saharay marked this pull request as ready for review March 26, 2024 17:30
@datalogics-robl datalogics-robl merged commit 7637212 into datalogics:develop Mar 28, 2024
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants