Skip to content

Commit

Permalink
Update workflow to use filtered solution file
Browse files Browse the repository at this point in the history
Changed the NuGet restore and build steps to use 'Plugins.Filter.slnf' instead of 'Plugins.sln'. This ensures only the relevant projects are included in the build process, optimizing the workflow.

Update Visual Studio version in solution file

Changed the Visual Studio version to 17.12 in the Plugins.sln file. This update ensures compatibility with the latest Visual Studio features and improvements.

Update UnitTests project GUID and adjust solution configuration

Changed the GUID for the UnitTests project to ensure consistency and proper reference within the solution. Additionally, updated solution configurations to reflect the new GUID and added a GlobalSection for Shared MSBuild project files.

Remove Debug configurations for Project B6BEFF

Eliminated redundant Debug configurations for project B6BEFF13-3DDF-87D9-C875-312EA5AA33DB from Plugins.sln. This helps in maintaining a cleaner solution file and avoids unnecessary build configurations.

Update project configurations for Plugins.sln and Plugins.slnx

Added missing build configuration in Plugins.sln for a project, ensuring it builds correctly in Debug mode. Removed unnecessary configuration tags from Plugin-Shared.shproj in Plugins.slnx, simplifying the project file structure.

Update NuGet restore target in workflow

Changed the NuGet restore command to reference "source\Plugins.sln" instead of "source\Plugins.Filter.slnf" in the GitHub Actions workflow. This likely corrects the target solution file for package restoration.

Update build solution path in GitHub Actions workflow

Changed the msbuild command to point to "source/Plugins.sln" instead of "source/Plugins.Filter.slnf". This ensures the correct solution file is used during the build process in the workflow.

Remove redundant Debug build configuration entry

This change deletes an unnecessary Debug build configuration entry from the solution file. The removal helps to streamline the solution configurations, potentially reducing build times and simplifying maintenance.

Configure build output paths for Plugin-Shared project

Added conditional property groups to specify output paths for Debug and Release configurations in the Plugin-Shared shared project. Updated the solution file to explicitly define the configuration for the Plugin-Shared project.

Update project GUIDs and add missing projects

Updated the GUIDs for several projects to correct issues with project references. Also, added the missing "UnitTests" and "WordSpellCheck" projects, and included the "github-workflows" section for improved project organization.

Remove unused workflow and simplify artifact uploads

Deleted `upload-artifacts.yml` and removed its reference from the solution file. Simplified artifact uploads in `main.yml` by explicitly listing each plugin without using a matrix strategy. This streamlines the build process and reduces complexity.

Remove SkipSharedProject flag from msbuild command

This change updates the GitHub Actions workflow by removing the SkipSharedProject flag from the msbuild command during the build step. The goal is to ensure all projects in the solution are built, potentially resolving dependencies on shared projects.

Refactor workflow upload strategy for artifacts

Consolidate artifact upload steps by moving the matrix strategy under a single "Upload Artifact" step. This change simplifies the workflow by removing the commented-out and redundant sections.

Add upload job to GitHub Actions workflow

Renamed the build job to build-job and added a new upload-job. The upload job uses a matrix strategy to handle multiple plugins and utilizes the upload-artifact action to store build artifacts.

Update artifact upload workflow

Reorganized the artifact upload step to be triggered by the 'build' job. This ensures artifacts are uploaded only after the build process completes successfully. Adjusting naming conventions for better readability and maintenance.

Refactor upload-artifacts workflow step

Rename artifact upload step to improve clarity and consistency across the workflow file. This change aims to make the purpose of this step more explicit and easier to understand at a glance.

Refactor artifact upload step in GitHub workflow

Changed the artifact upload step to a reusable workflow call, increasing maintainability and consistency. This update improves the structure by aligning with the new YAML syntax for GitHub Actions workflows.

Update artifact upload step in GitHub Actions workflow

Changed the call-upload-artifacts-workflow step to a named step 'upload artifacts' for better clarity and consistency. This refactor ensures alignment with the naming conventions used throughout the workflow configuration.

Fix workflow syntax for uploading artifacts

The name of the 'call-upload-artifacts-workflow' step was removed to correct the format. This ensures that the 'uses' directive properly calls the 'upload-artifacts.yml' file, improving the workflow execution.

Fix YAML syntax for upload-artifacts workflow call

Enclose the workflow path in quotes to ensure proper YAML parsing. This change avoids potential syntax errors during the GitHub Actions execution.

Fix incorrect path syntax in GitHub Actions workflow

Corrected the path syntax in the 'call-upload-artifacts-workflow' step to ensure compatibility with GitHub Actions. This change should resolve any issues related to incorrect path references in the workflow.

Fix incorrect path in GitHub Actions workflow

Correct the path syntax in the 'call-upload-artifacts-workflow' step to ensure the upload-artifacts.yml workflow is properly referenced and executed. This change resolves an execution issue caused by the incorrect use of backslashes.

Fix usage path in GitHub Actions workflow

Changed the path specification syntax for the 'uses' directive in the main workflow to ensure consistent execution. This update replaces backslashes with single quotes to conform to YAML standards and improve reliability.

Fix upload-artifacts workflow path

Corrected the path for the upload-artifacts workflow in the main GitHub Actions configuration file. This change ensures that the upload-artifacts workflow is called properly during the CI process.

Fix whitespace issue in main GitHub Actions workflow

Corrected unnecessary whitespace in the `call-upload-artifacts-workflow` step. This change ensures cleaner and more readable YAML formatting.

Fix path separator in GitHub Actions workflow

Changed the path separators in the workflow file from forward slashes to backslashes. This ensures compatibility with the intended system and syntax.

Fix syntax error in GitHub Actions workflow

A misplaced dash was corrected in the call-upload-artifacts-workflow step, ensuring proper syntax. This change prevents potential execution errors in the CI/CD pipeline.

Fix typo in GitHub Actions workflow file

Corrected the syntax error from "use" to "uses" in the call-upload-artifacts-workflow step within the GitHub Actions configuration. This change ensures the upload-artifacts action is called correctly, preventing potential workflow failures.

Fix workflow syntax and rename step

Rename and correct the "call-upload-artifacts-workflow" step in the GitHub workflow configuration. This change ensures proper execution and visibility of the artifact upload step.

Add github-actions branch to workflow triggers

This update ensures that workflows are triggered on pushes to the 'github-actions' branch. It also includes minor formatting adjustments for better readability.
  • Loading branch information
ivandrofly committed Nov 22, 2024
1 parent dccc120 commit 75db412
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 185 deletions.
53 changes: 35 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on:
push:
branches:
- main
- github-actions
pull_request:
branches:
- main

jobs:
build:
build-job:
runs-on: windows-latest
# strategy:
# matrix:
# plugin: [ 'NoRecursiveDash', 'HIColorer', 'HI2UC', 'LinesUnbreaker' ]

steps:
# Checkout the repository
Expand Down Expand Up @@ -41,21 +39,40 @@ jobs:

# Build the solution
- name: Build solution
run: msbuild "source\Plugins.Filter.slnf" /p:Configuration=Release /p:SkipSharedProject=true
run: msbuild "source\Plugins.Filter.slnf" /p:Configuration=Release

# Copy dll to target directory
- name: Create archives
shell: pwsh
run: source\zip-plugin-files.ps1

# - name: Upload Artifact (All)
# uses: actions/upload-artifact@v4
# with:
# name: Plugins
# path: C:\plugins\*.dll
call-upload-artifacts-workflow:
- use: ./github/workflows/upload-artifacts.yml
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: ${{matrix.plugin}}
# path: C:\plugins\${{matrix.plugin}}.dll

# Upload plugins/artifacts
- name: Upload HI2UC
uses: actions/upload-artifact@v4
with:
name: HI2UC
path: C:\plugins\HI2UC.dll

- name: Upload HIColorer
uses: actions/upload-artifact@v4
with:
name: HIColorer
path: C:\plugins\HIColorer.dll

- name: Upload TightHyphen
uses: actions/upload-artifact@v4
with:
name: TightHyphen
path: C:\plugins\TightHyphen.dll

- name: Upload NoRecursiveDash
uses: actions/upload-artifact@v4
with:
name: NoRecursiveDash
path: C:\plugins\NoRecursiveDash.dll

- name: Upload LinesUnbreaker
uses: actions/upload-artifact@v4
with:
name: LinesUnbreaker
path: C:\plugins\LinesUnbreaker.dll
18 changes: 0 additions & 18 deletions .github/workflows/upload-artifacts.yml

This file was deleted.

6 changes: 6 additions & 0 deletions source/Plugin-Shared/Plugin-Shared.shproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<Import Project="Plugin-Shared.projitems" Label="Shared" Condition="'$(SkipSharedProject)' != 'true'"/>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
Loading

0 comments on commit 75db412

Please sign in to comment.