Skip to content

Commit

Permalink
adapt CI build to new cmake build (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
chcg authored Apr 1, 2023
1 parent 6923671 commit 66c2656
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 33 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
56 changes: 34 additions & 22 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,46 @@ on: [push, pull_request]
jobs:
build:

runs-on: windows-2019
runs-on: windows-latest
strategy:
max-parallel: 4
fail-fast: false
matrix:
build_configuration: [Unicode Release, Unicode Debug]
build_platform: [x64, Win32]

include:
- build_configuration: RelWithDebInfo
build_platform: x64
build_platform_vcpkg: x64
- build_configuration: Debug
build_platform: x64
build_platform_vcpkg: x64
- build_configuration: RelWithDebInfo
build_platform: Win32
build_platform_vcpkg: x86
- build_configuration: Debug
build_platform: Win32
build_platform_vcpkg: x86

steps:
- name: Checkout repo
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Setup to add MSBuild.exe to path
uses: warrenbuckley/Setup-MSBuild@v1
- name: Restore vcpkg packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: vcpkg integrate install

- name: MSBuild of plugin dll
working-directory: src\NppBplistPlugin\
run: msbuild NppBplistPlugin.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v142"
- name: generate cmake
run: |
mkdir _build
cd _build
cmake -G "Visual Studio 17 2022" -A ${{ matrix.build_platform }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.build_platform_vcpkg }}-windows-static ..
- name: Archive artifacts for x64
if: matrix.build_platform == 'x64'
uses: actions/upload-artifact@v1
with:
name: plugin_dll_x64
path: src\NppBplistPlugin\${{ matrix.build_platform }}\${{ matrix.build_configuration }}\NppBplistPlugin.dll
- name: build cmake
run: |
cd _build
cmake --build . --config ${{ matrix.build_configuration }}
- name: Archive artifacts for Win32
if: matrix.build_platform == 'Win32'
uses: actions/upload-artifact@v1
- name: Archive artifacts for ${{ matrix.build_platform }}
if: matrix.build_configuration == 'RelWithDebInfo'
uses: actions/upload-artifact@v3
with:
name: plugin_dll_x86
path: src\NppBplistPlugin\src\${{ matrix.build_configuration }}\NppBplistPlugin.dll
name: plugin_dll_${{ matrix.build_platform }}
path: bin\${{ matrix.build_configuration }}\NppBplistPlugin.dll
20 changes: 9 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.3.0.{build}
version: 2.0.0.{build}
image: Visual Studio 2022


Expand Down Expand Up @@ -31,31 +31,29 @@ install:

build_script:
- echo %vcpkg_triplet_arch%
- cmake . -B"build" -G "Visual Studio 17 2022" -A %platform% -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=%vcpkg_triplet_arch%-windows-static -DVCPKG_OVERLAY_TRIPLETS=./vcpkg/triplets
- cmake . -B"build" -G "Visual Studio 17 2022" -A %platform_input% -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=%vcpkg_triplet_arch%-windows-static -DVCPKG_OVERLAY_TRIPLETS=./vcpkg/triplets
- cmake --build "build" --config RelWithDebInfo

after_build:
- cd "%APPVEYOR_BUILD_FOLDER%"/bin
- dir RelWithDebInfo
- dir $env:PLATFORM_INPUT\$env:CONFIGURATION\
- cd "%APPVEYOR_BUILD_FOLDER%"
- ps: >-
if ($env:PLATFORM_INPUT -eq "x64") {
#Push-AppveyorArtifact "$env:PLATFORM_INPUT\$env:CONFIGURATION\NppBplistPlugin.dll" -FileName NppBplistPlugin.dll
Push-AppveyorArtifact "bin\$env:CONFIGURATION\NppBplistPlugin.dll" -FileName NppBplistPlugin.dll
}
if ($env:PLATFORM_INPUT -eq "Win32" ) {
#Push-AppveyorArtifact "src\$env:CONFIGURATION\NppBplistPlugin.dll" -FileName NppBplistPlugin.dll
Push-AppveyorArtifact "bin\$env:CONFIGURATION\NppBplistPlugin.dll" -FileName NppBplistPlugin.dll
}
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:PLATFORMTOOLSET -eq "%PlatformToolset%") {
if($env:PLATFORM_INPUT -eq "x64"){
$ZipFileName = "NppBplistPlugin_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName $env:PLATFORM_INPUT\$env:CONFIGURATION\NppBplistPlugin.dll
$ZipFileName = "NppBplistPlugin_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName bin\$env:CONFIGURATION\NppBplistPlugin.dll
}
if($env:PLATFORM_INPUT -eq "Win32"){
$ZipFileName = "NppBplistPlugin_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName src\$env:CONFIGURATION\NppBplistPlugin.dll
$ZipFileName = "NppBplistPlugin_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName bin\$env:CONFIGURATION\NppBplistPlugin.dll
}
}
Expand Down

0 comments on commit 66c2656

Please sign in to comment.