Skip to content

Test ci#30

Closed
Mika3578 wants to merge 13 commits into
mainfrom
test-ci
Closed

Test ci#30
Mika3578 wants to merge 13 commits into
mainfrom
test-ci

Conversation

@Mika3578

@Mika3578 Mika3578 commented Nov 13, 2025

Copy link
Copy Markdown
Owner

Summary by Sourcery

Add a custom agent configuration alongside new GitHub Actions workflows to automatically build the eMule Morph project on Windows in both Debug and Release modes, and publish build artifacts (and releases on tag pushes).

New Features:

  • Introduce a custom Copilot CLI build agent configuration for the eMule Morph project
  • Add a Windows Debug build workflow with artifact uploads
  • Add a Windows Release build workflow with artifact uploads and automated GitHub Release creation on version tags

Mika3578 and others added 7 commits November 12, 2025 22:36
Co-authored-by: Mika3578 <58137747+Mika3578@users.noreply.github.com>
Co-authored-by: Mika3578 <58137747+Mika3578@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 13, 2025 11:35
@sourcery-ai

sourcery-ai Bot commented Nov 13, 2025

Copy link
Copy Markdown

Reviewer's Guide

This pull request adds a custom Copilot CLI agent configuration for the eMule Morph Windows C++ project and introduces two new GitHub Actions workflows for automated Windows Debug and Release builds, leveraging MSBuild, NuGet package restoration, and artifact uploads.

Sequence diagram for Windows Release build workflow

sequenceDiagram
  participant GitHub as "GitHub Event (push/tag/PR)"
  participant Actions as "GitHub Actions Runner"
  participant Repo as "Repository"
  participant MSBuild as "MSBuild"
  participant NuGet as "NuGet"
  participant Artifacts as "Artifact Storage"
  participant Release as "GitHub Release"

  GitHub->>Actions: Trigger windows-release.yml
  Actions->>Repo: Checkout repository (with submodules)
  Actions->>MSBuild: Setup MSBuild
  Actions->>NuGet: Restore NuGet packages
  Actions->>MSBuild: Build emule.sln (Release)
  Actions->>Artifacts: Upload .exe and .dll files
  Actions->>Release: Create Release (if tag push)
Loading

Sequence diagram for Windows Debug build workflow

sequenceDiagram
  participant GitHub as "GitHub Event (push/PR)"
  participant Actions as "GitHub Actions Runner"
  participant Repo as "Repository"
  participant MSBuild as "MSBuild"
  participant NuGet as "NuGet"
  participant Artifacts as "Artifact Storage"

  GitHub->>Actions: Trigger windows-debug.yml
  Actions->>Repo: Checkout repository (with submodules)
  Actions->>MSBuild: Setup MSBuild
  Actions->>NuGet: Restore NuGet packages
  Actions->>MSBuild: Build emule.sln (Debug)
  Actions->>Artifacts: Upload .exe, .dll, .pdb files
Loading

File-Level Changes

Change Details Files
Add custom agent configuration for eMule Morph build process
  • Define agent name, description, and YAML front matter
  • Document project overview, supported build configurations, and local build steps
  • Include summary of existing CI/CD workflows
.github/agents/my-agent.agent.md
Introduce Windows Release build GitHub Actions workflow
  • Trigger on pushes to main/master/develop branches, tag events, and PRs
  • Checkout repo with recursive submodules and set up MSBuild and VSWhere
  • Restore NuGet packages and build solution in Release configuration
  • Upload Release artifacts and create GitHub release on version tag
.github/workflows/windows-release.yml
Add Windows Debug build GitHub Actions workflow
  • Trigger on pushes to main/master/develop branches and PRs
  • Checkout repo with recursive submodules and set up MSBuild
  • Restore NuGet packages and build solution in Debug configuration
  • Upload Debug artifacts (executables, DLLs, PDBs)
.github/workflows/windows-debug.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider using version tags (e.g., actions/checkout@v3) instead of specific commit SHAs for GitHub Actions to improve readability and easier maintenance.
  • The debug and release workflows share a lot of steps—consider extracting shared logic into a reusable workflow or using a matrix strategy to eliminate duplication.
  • In the release workflow, you can scope the contents: write permission more narrowly (only for the step that creates the GitHub release) to adhere to the principle of least privilege.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider using version tags (e.g., actions/checkout@v3) instead of specific commit SHAs for GitHub Actions to improve readability and easier maintenance.
- The debug and release workflows share a lot of steps—consider extracting shared logic into a reusable workflow or using a matrix strategy to eliminate duplication.
- In the release workflow, you can scope the `contents: write` permission more narrowly (only for the step that creates the GitHub release) to adhere to the principle of least privilege.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Mika3578

Copy link
Copy Markdown
Owner Author

@copilot The job failed because the workflow could not download the actions/checkout action at the specified commit SHA:

Error:
An action could not be found at the URI 'https://api.github.com/repos/actions/checkout/zipball/a92723a3b2fd6e477b7a2a418b1a52c2b6b5c5ee'

This typically means the specified SHA (a92723a3b2fd6e477b7a2a418b1a52c2b6b5c5ee) for actions/checkout does not exist or is incorrect.

Solution:
Update your workflow to use a valid version of actions/checkout, preferably a tagged release like v4 or v3. In your .github/workflows/windows-release.yml file, find:

- uses: actions/checkout@a92723a3b2fd6e477b7a2a418b1a52c2b6b5c5ee

Change it to:

- uses: actions/checkout@v4

or, for v3:

- uses: actions/checkout@v3

Commit this change and re-run your workflow. This should resolve the issue with the missing action. If you need help locating the line in your workflow file, let me know!

Copilot AI commented Nov 13, 2025

Copy link
Copy Markdown

@Mika3578 I've opened a new pull request, #31, to work on those changes. Once the pull request is ready, I'll request review from you.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/windows-debug.yml
Comment on lines +13 to +16
build:
runs-on: windows-latest
permissions:
contents: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Grant actions permission for release artifact upload

This job restricts the GITHUB_TOKEN to contents: write only. The actions/upload-artifact@v4 step later in the job uses the actions API and will fail without actions: write (or actions: read) permission, so the Release workflow cannot complete successfully. Include the actions scope in the job permissions so artifact publishing works.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces CI/CD automation for the eMule Morph project by adding GitHub Actions workflows and a custom agent configuration file.

  • Adds Windows Debug and Release build workflows using MSBuild
  • Includes automated artifact uploading and GitHub release creation
  • Provides custom agent documentation for build assistance

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/windows-release.yml Workflow for building Release configuration, uploading artifacts, and creating GitHub releases on tag pushes
.github/workflows/windows-debug.yml Workflow for building Debug configuration with debug symbols and uploading artifacts
.github/agents/my-agent.agent.md Custom agent documentation describing the eMule Morph project structure, build configurations, and CI/CD setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/windows-release.yml Outdated
Comment thread .github/workflows/windows-release.yml Outdated
srchybrid/Release/*.exe
srchybrid/Release/*.dll
draft: false
prerelease: false

Copilot AI Nov 13, 2025

Copy link

Choose a reason for hiding this comment

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

The workflow is missing the GITHUB_TOKEN environment variable or token parameter for the softprops/action-gh-release action. While it may inherit from the default token, it's better to explicitly pass it for clarity and to avoid potential permission issues. Add env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} or token: ${{ secrets.GITHUB_TOKEN }} to the action.

Suggested change
prerelease: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/windows-release.yml Outdated
Comment thread .github/workflows/windows-debug.yml Outdated
Co-authored-by: Mika3578 <58137747+Mika3578@users.noreply.github.com>
@Mika3578

Copy link
Copy Markdown
Owner Author

The job failed due to missing required libraries and headers needed for your Visual Studio C++ project:

  1. MFC Libraries Missing
  • Error: error MSB8041: MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets
  • Solution: Update your GitHub Actions Windows runner to include the MFC (Microsoft Foundation Classes) libraries. You can do this by adding an installation step to your workflow to install the "MFC and ATL support" component.
  1. ATL Header Missing
  • Error: fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory
  • Solution: The ATL (Active Template Library) libraries and headers are missing for the toolset. These are provided by the same Visual Studio component as MFC, so installing "MFC and ATL support" fixes both issues.

Code Suggestion for .github/workflows/windows-debug.yml:
Add the following step at the beginning of your job (before build):

- name: Install required Visual Studio components
  uses: microsoft/setup-msbuild@v2
  with:
    vs-version: '2022'
    components: 'Microsoft.VisualStudio.Component.VC.ATL,Microsoft.VisualStudio.Component.VC.MFC'

Or, if you are using a setup script to install dependencies:

- name: Install MFC and ATL
  run: |
    choco install visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.MFC"

After making these changes, your build should no longer fail due to missing MFC/ATL dependencies.

If you need further assistance with a specific YAML file section, let me know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/windows-release.yml Outdated
Comment thread .github/workflows/windows-debug.yml Outdated
Mika3578 and others added 4 commits November 13, 2025 12:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/agents/my-agent.agent.md Outdated
id: get_release_files
shell: pwsh
run: |
$files = Get-ChildItem -Path "srchybrid/Release" -Include *.exe,*.dll -File | ForEach-Object { $_.FullName }

Copilot AI Nov 13, 2025

Copy link

Choose a reason for hiding this comment

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

The Get-ChildItem command is missing the -Recurse parameter, which means it will only search the immediate srchybrid/Release directory. If any .exe or .dll files are in subdirectories, they won't be included in the release. Consider adding -Recurse if subdirectories should be searched, or verify that all release files are in the root Release directory.

Suggested change
$files = Get-ChildItem -Path "srchybrid/Release" -Include *.exe,*.dll -File | ForEach-Object { $_.FullName }
$files = Get-ChildItem -Path "srchybrid/Release" -Include *.exe,*.dll -File -Recurse | ForEach-Object { $_.FullName }

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +59
- name: Get release files
id: get_release_files
shell: pwsh
run: |
$files = Get-ChildItem -Path "srchybrid/Release" -Include *.exe,*.dll -File | ForEach-Object { $_.FullName }
# Join with newline for multi-line YAML input
$filesString = $files -join "`n"
echo "release_files<<EOF" >> $env:GITHUB_OUTPUT
echo "$filesString" >> $env:GITHUB_OUTPUT
echo "EOF" >> $env:GITHUB_OUTPUT

- name: Create Release (on tag push)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.get_release_files.outputs.release_files }}

Copilot AI Nov 13, 2025

Copy link

Choose a reason for hiding this comment

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

The PowerShell script builds a multi-line string with file paths, but the softprops/action-gh-release@v1 action expects the files parameter to be a glob pattern or newline-separated list of file paths. The current approach using GITHUB_OUTPUT with multi-line strings should work, but there's a potential issue: the script outputs full paths (via $_.FullName), which will include the full GitHub workspace path. This will likely cause the action to fail because it won't find files at those absolute paths. Consider using relative paths instead by changing $_.FullName to $_.Name and prepending srchybrid/Release/ to each file, or use a simpler glob pattern directly in the release step like srchybrid/Release/*.exe and srchybrid/Release/*.dll.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Mika3578
Mika3578 deleted the branch main November 13, 2025 19:22
@Mika3578 Mika3578 closed this Nov 13, 2025
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