-
Notifications
You must be signed in to change notification settings - Fork 0
Test ci #33
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
base: main
Are you sure you want to change the base?
Test ci #33
Changes from all commits
cb0e89f
3c8beaa
db83cd9
5beea2a
e52afc9
4a722d2
9f34ce1
b7ad896
62d2573
b1efc52
33283e0
d399d57
b295a50
9c319d7
01bb3e7
ce7d28a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| # Fill in the fields below to create a basic custom agent for your repository. | ||
| # The Copilot CLI can be used for local testing: https://gh.io/customagents/cli | ||
| # To make this agent available, merge this file into the default repository branch. | ||
| # For format details, see: https://gh.io/customagents/config | ||
|
|
||
| name: eMule Morph Build Agent | ||
| description: Specialized agent for building and managing the eMule Morph Windows C++ project | ||
| --- | ||
|
|
||
| # eMule Morph Build Agent | ||
|
|
||
| This agent assists with building and managing the eMule Morph project, which is a Windows-based C++ application built with Visual Studio. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| eMule Morph is a peer-to-peer file sharing client based on eMule. This repository contains: | ||
| - Main emule application (Win32 C++ with MFC) | ||
| - Multiple dependency libraries (cryptlib, ResizableLib, zlib, libpng, cximage, id3lib, libupnp, pthread) | ||
| - Visual Studio solution files targeting Platform Toolset v142 (VS 2019) | ||
| - Git submodules for external dependencies | ||
|
|
||
| ## Build Configurations | ||
|
|
||
| The project supports three build configurations: | ||
| - **Debug**: Development build with debug symbols | ||
| - **Release**: Optimized production build | ||
| - **Beta**: Pre-release build with optimizations | ||
|
|
||
| ## Building the Project | ||
|
|
||
| To build the project locally: | ||
|
|
||
| 1. Clone the repository with submodules: | ||
| ```bash | ||
| git clone --recursive [repository-url] | ||
| ``` | ||
|
|
||
| 2. Initialize submodules (if not cloned recursively): | ||
| ```bash | ||
| git submodule init | ||
| git submodule update | ||
| ``` | ||
|
|
||
| 3. Open `srchybrid/emule.sln` in Visual Studio 2019 or later | ||
|
|
||
| 4. Select the desired configuration (Debug/Release/Beta) and build | ||
|
|
||
| ## GitHub Actions | ||
|
|
||
| The repository includes CI/CD workflows that automatically build the project: | ||
| - Windows Debug build workflow | ||
| - Windows Release build workflow | ||
|
|
||
| These workflows ensure code quality and build integrity on every commit. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Comprehensive CI | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, master, develop ] | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| branches: [ main, master, develop ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-windows: | ||
| name: Build (${{ matrix.configuration }}) | ||
| runs-on: windows-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| configuration: [ Debug, Release, Beta ] | ||
| env: | ||
| SOLUTION_FILE: srchybrid/emule.sln | ||
| BUILD_PLATFORM: Win32 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up MSBuild | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| - name: Cache NuGet packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.nuget/packages | ||
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.config') }} | ||
| restore-keys: ${{ runner.os }}-nuget- | ||
|
|
||
| - name: Restore NuGet packages | ||
| working-directory: ${{ github.workspace }}/srchybrid | ||
| run: nuget restore emule.sln | ||
|
|
||
| - name: Build ${{ matrix.configuration }} configuration | ||
| working-directory: ${{ github.workspace }}/srchybrid | ||
| run: msbuild emule.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ env.BUILD_PLATFORM }} /m /v:minimal | ||
|
|
||
| - name: Upload ${{ matrix.configuration }} artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: emule-${{ matrix.configuration }}-${{ github.run_number }} | ||
| path: | | ||
| srchybrid/${{ matrix.configuration }}/*.exe | ||
| srchybrid/${{ matrix.configuration }}/*.dll | ||
| srchybrid/${{ matrix.configuration }}/*.pdb | ||
| if-no-files-found: warn | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Windows Debug Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, master, develop ] | ||
| pull_request: | ||
| branches: [ main, master, develop ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: windows-latest | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Add MSBuild to PATH | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| - name: Restore NuGet packages | ||
| working-directory: ${{github.workspace}}/srchybrid | ||
| run: nuget restore emule.sln | ||
|
|
||
| - name: Build Debug | ||
| working-directory: ${{github.workspace}}/srchybrid | ||
| run: msbuild emule.sln /p:Configuration=Debug /p:Platform=Win32 /m /v:minimal | ||
|
|
||
| - name: Upload Debug artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: emule-debug-build-${{ github.run_number }} | ||
| path: | | ||
| srchybrid/Debug/*.exe | ||
| srchybrid/Debug/*.dll | ||
| srchybrid/Debug/*.pdb | ||
| if-no-files-found: warn |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Windows Release Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, master, develop ] | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| branches: [ main, master, develop ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: windows-latest | ||
| permissions: | ||
| contents: write | ||
|
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 suggestion (security): Consider limiting Currently this job has Suggested implementation: To fully implement the suggestion you should also:
|
||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Add MSBuild to PATH | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| - name: Restore NuGet packages | ||
| working-directory: ${{github.workspace}}/srchybrid | ||
| run: nuget restore emule.sln | ||
|
Comment on lines
+27
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (performance): NuGet restore in the release workflow could benefit from the same caching strategy as CI to speed up builds. The release workflow restores NuGet packages without using |
||
|
|
||
| - name: Build Release | ||
| working-directory: ${{github.workspace}}/srchybrid | ||
| run: msbuild emule.sln /p:Configuration=Release /p:Platform=Win32 /m /v:minimal | ||
|
|
||
| - name: Upload Release artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: emule-release-build-${{ github.run_number }} | ||
| path: | | ||
| srchybrid/Release/*.exe | ||
| srchybrid/Release/*.dll | ||
| if-no-files-found: warn | ||
|
|
||
| - name: Get release files | ||
| id: get_release_files | ||
| shell: pwsh | ||
| run: | | ||
| $files = Get-ChildItem -Path "srchybrid/Release" -Include *.exe,*.dll -File | ForEach-Object { $_.FullName } | ||
|
Comment on lines
+44
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The release workflow gathers files from Useful? React with 👍 / 👎. |
||
| # 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 }} | ||
| draft: false | ||
| prerelease: false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,5 @@ | |
| **/*Release*/* | ||
| srchybrid/build/* | ||
| *.user | ||
| IUpnp*.txt | ||
| IUpnp*.txt | ||
| wiki/ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (performance): The CI workflow overlaps with the dedicated debug/release workflows, which may cause redundant builds.
This can trigger 2–3 workflows per push/PR that all run the same Debug/Release builds, increasing queue times and CI resource usage. Consider either restricting when the debug/release workflows run (e.g., manual-only) or merging them into this workflow as separate jobs to avoid duplication.
Suggested implementation:
To fully implement your suggestion and avoid redundant Debug/Release builds:
workflow_dispatch), orbuild-windows-debug,build-windows-release) in this sameci.ymlfile.on:section) are aligned across workflows so that only one workflow handles each Debug/Release/Beta scenario.