From 6f627dce2de74caee7fce576e43d7174b2c70a99 Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Tue, 24 Sep 2024 10:34:45 +0100 Subject: [PATCH] Switch to github actions for testing (#32) --- .github/workflows/build.yml | 20 ++++ .travis.yml | 3 - CMakeLists.txt | 2 +- appveyor.yml | 16 --- inipp.sln | 48 --------- inipp/inipp.vcxproj | 118 -------------------- inipp/inipp.vcxproj.filters | 22 ---- unittest/unittest.cpp | 7 -- unittest/unittest.vcxproj | 173 ------------------------------ unittest/unittest.vcxproj.filters | 27 ----- 10 files changed, 21 insertions(+), 415 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 inipp.sln delete mode 100644 inipp/inipp.vcxproj delete mode 100644 inipp/inipp.vcxproj.filters delete mode 100644 unittest/unittest.vcxproj delete mode 100644 unittest/unittest.vcxproj.filters diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b29bfbf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: build + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +jobs: + cmake: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + steps: + - uses: actions/checkout@v4 + - run: cmake . + - run: cmake --build . + - run: ctest -V diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c195991..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -dist: focal -language: cpp -script: cmake . && make && make test diff --git a/CMakeLists.txt b/CMakeLists.txt index 42bd63d..b70727e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(inipp) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d30b198..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: 1.0.{build} -image: Visual Studio 2019 -build_script: - - msbuild inipp.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - - nuget pack nuget/IniPP.nuspec -test_script: - - vstest.console /logger:Appveyor /Platform:x64 x64\Debug\unittest.dll -artifacts: - - path: '*.nupkg' -deploy: - provider: NuGet - api_key: - secure: AcLNa0DwCGKnLLFXN23NHZHcl1Xten7fgacP//Cp+5CkwgDLUMN5res8TEx3kkbM - artifact: /.*\.nupkg/ - on: - appveyor_repo_tag: true diff --git a/inipp.sln b/inipp.sln deleted file mode 100644 index 8d7bdfb..0000000 --- a/inipp.sln +++ /dev/null @@ -1,48 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inipp", "inipp\inipp.vcxproj", "{4139EAC6-0B81-4120-9130-07E132310564}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest", "unittest\unittest.vcxproj", "{93B31110-0449-4AD7-8EA8-18F7D31857B4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example\example.vcxproj", "{51631F50-58C3-4D8D-B378-16CE4F4ACB4B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4139EAC6-0B81-4120-9130-07E132310564}.Debug|x64.ActiveCfg = Debug|x64 - {4139EAC6-0B81-4120-9130-07E132310564}.Debug|x64.Build.0 = Debug|x64 - {4139EAC6-0B81-4120-9130-07E132310564}.Debug|x86.ActiveCfg = Debug|Win32 - {4139EAC6-0B81-4120-9130-07E132310564}.Debug|x86.Build.0 = Debug|Win32 - {4139EAC6-0B81-4120-9130-07E132310564}.Release|x64.ActiveCfg = Release|x64 - {4139EAC6-0B81-4120-9130-07E132310564}.Release|x64.Build.0 = Release|x64 - {4139EAC6-0B81-4120-9130-07E132310564}.Release|x86.ActiveCfg = Release|Win32 - {4139EAC6-0B81-4120-9130-07E132310564}.Release|x86.Build.0 = Release|Win32 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Debug|x64.ActiveCfg = Debug|x64 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Debug|x64.Build.0 = Debug|x64 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Debug|x86.ActiveCfg = Debug|Win32 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Debug|x86.Build.0 = Debug|Win32 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Release|x64.ActiveCfg = Release|x64 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Release|x64.Build.0 = Release|x64 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Release|x86.ActiveCfg = Release|Win32 - {93B31110-0449-4AD7-8EA8-18F7D31857B4}.Release|x86.Build.0 = Release|Win32 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Debug|x64.ActiveCfg = Debug|x64 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Debug|x64.Build.0 = Debug|x64 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Debug|x86.ActiveCfg = Debug|Win32 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Debug|x86.Build.0 = Debug|Win32 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Release|x64.ActiveCfg = Release|x64 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Release|x64.Build.0 = Release|x64 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Release|x86.ActiveCfg = Release|Win32 - {51631F50-58C3-4D8D-B378-16CE4F4ACB4B}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/inipp/inipp.vcxproj b/inipp/inipp.vcxproj deleted file mode 100644 index cf961be..0000000 --- a/inipp/inipp.vcxproj +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {4139EAC6-0B81-4120-9130-07E132310564} - inipp - 10.0 - - - - Application - true - v142 - MultiByte - - - Application - false - v142 - true - MultiByte - - - Application - true - v142 - MultiByte - - - Application - false - v142 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - - - - - Level3 - Disabled - true - - - - - Level3 - MaxSpeed - true - true - true - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - - - true - true - - - - - - - - - \ No newline at end of file diff --git a/inipp/inipp.vcxproj.filters b/inipp/inipp.vcxproj.filters deleted file mode 100644 index 65366b2..0000000 --- a/inipp/inipp.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - \ No newline at end of file diff --git a/unittest/unittest.cpp b/unittest/unittest.cpp index 879f6de..d7def02 100644 --- a/unittest/unittest.cpp +++ b/unittest/unittest.cpp @@ -1,9 +1,5 @@ #include "test.h" -#ifdef _MSC_VER -#include "CppUnitTest.h" -using namespace Microsoft::VisualStudio::CppUnitTestFramework; -#else #define TEST_CLASS(T) class T #define TEST_METHOD(Func) void Func() @@ -35,7 +31,6 @@ namespace Logger { } } // namespace Logger -#endif template void WriteMessage(const Ini & ini) { @@ -257,7 +252,6 @@ namespace unittest }; } // namespace unittest -#ifndef _MSC_VER int main() { unittest::UnitTest test; test.TestParseGenerate1(); @@ -279,4 +273,3 @@ int main() { test.TestTrailingComments(); return 0; } -#endif diff --git a/unittest/unittest.vcxproj b/unittest/unittest.vcxproj deleted file mode 100644 index a6f7fc3..0000000 --- a/unittest/unittest.vcxproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {93B31110-0449-4AD7-8EA8-18F7D31857B4} - Win32Proj - unittest - 10.0 - - - - DynamicLibrary - true - v142 - MultiByte - false - - - DynamicLibrary - false - v142 - true - MultiByte - false - - - DynamicLibrary - true - v142 - MultiByte - false - - - DynamicLibrary - false - v142 - true - MultiByte - false - - - - - - - - - - - - - - - - - - - - - true - ..\inipp;$(IncludePath) - - - true - ..\inipp;$(IncludePath) - - - true - ..\inipp;$(IncludePath) - - - true - ..\inipp;$(IncludePath) - - - - Level3 - Disabled - $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - - - Windows - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - for %%f in (*.ini, *.output) do xcopy /y /d %%f $(OutDir) - - - - - Level3 - Disabled - $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions) - true - - - Windows - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - for %%f in (*.ini, *.output) do xcopy /y /d %%f $(OutDir) - - - - - Level3 - MaxSpeed - true - true - $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;%(PreprocessorDefinitions) - true - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - for %%f in (*.ini, *.output) do xcopy /y /d %%f $(OutDir) - - - - - Level3 - MaxSpeed - true - true - $(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions) - true - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - for %%f in (*.ini, *.output) do xcopy /y /d %%f $(OutDir) - - - - - - - - - - - - \ No newline at end of file diff --git a/unittest/unittest.vcxproj.filters b/unittest/unittest.vcxproj.filters deleted file mode 100644 index 02e4817..0000000 --- a/unittest/unittest.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Header Files - - - \ No newline at end of file