From 4b74af662bd8d41169a72f889f8b4fb6efa6776c Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Fri, 27 Mar 2020 22:13:41 +0800 Subject: [PATCH 01/12] Ignore windows output files. --- .gitignore | 6 ++++++ doc/.gitignore | 6 ++++++ test/.gitignore | 23 +++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 doc/.gitignore create mode 100644 test/.gitignore diff --git a/.gitignore b/.gitignore index 208b808d..5af402d4 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,9 @@ FMT.build Makefile run-msbuild.bat fmt.pc +/Debug/ +/fmt.dir/ +/x64/ +*.vcxproj.filters +*.vcxproj +*.sln diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 00000000..c014c583 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,6 @@ +/INSTALL.vcxproj +/INSTALL.vcxproj.filters +/PACKAGE.vcxproj +/PACKAGE.vcxproj.filters +/RUN_TESTS.vcxproj +/RUN_TESTS.vcxproj.filters diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 00000000..28999a10 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,23 @@ +/assert-test.dir/ +/chrono-test.dir/ +/format-impl-test.dir/ +/color-test.dir/ +/compile-test.dir/ +/core-test.dir/ +/custom-formatter-test.dir/ +/Debug/ +/format-test.dir/ +/gmock.dir/ +/locale-test.dir/ +/gtest-extra-test.dir/ +/grisu-test.dir/ +/test-main.dir/ +/header-only-test.dir/ +/os-test.dir/ +/ostream-test.dir/ +/posix-mock-test.dir/ +/printf-test.dir/ +/ranges-test.dir/ +/scan-test.dir/ +*.vcxproj.filters +*.vcxproj From e6bebe42fa278dec24929c6420ad5835f69abeeb Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Fri, 27 Mar 2020 22:24:36 +0800 Subject: [PATCH 02/12] Create nuget package and push. --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ fmtlib.nuspec | 19 ++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 fmtlib.nuspec diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..7a3de0cb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Push Build + +on: + push: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + clean: true + fetch-depth: 1 + + - name: Setup NuGet + uses: warrenbuckley/Setup-Nuget@v1 + + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + #with: + # arch: amd64 + # toolset: 16.0 + + - name: CMake + working-directory: . + run: cmake . + + - name: Build Release + working-directory: ./build + run: msbuild /m /p:Configuration=Release FMT.sln + + - name: Build Debug + working-directory: ./build + run: msbuild /m /p:Configuration=Debug FMT.sln + + - name: Nuget Pack + working-directory: . + run: nuget pack fmtlib.nuspec -version 6.1.2 -OutputFileNamesWithoutVersion -OutputDirectory dist + + - name: Nuget Push + working-directory: . + run: nuget push dist\fmtlib.nupkg \ No newline at end of file diff --git a/fmtlib.nuspec b/fmtlib.nuspec new file mode 100644 index 00000000..8872bf20 --- /dev/null +++ b/fmtlib.nuspec @@ -0,0 +1,19 @@ + + + + wuganhao.fmtlib + $version$ + {fmt} lib nuget package + Wu, Ganhao<wuganhao@hotmail.com> + Wu, Ganhao<wuganhao@hotmail.com> + false + fmtlib + Create fmtlib for VS 2019 + fmtlib std::format + + + + + + + \ No newline at end of file From 9235d551266da590c1033a187335f86a31303f03 Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Fri, 27 Mar 2020 22:28:19 +0800 Subject: [PATCH 03/12] Fix - incorrect build folder. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a3de0cb..14c40228 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,11 +28,11 @@ jobs: run: cmake . - name: Build Release - working-directory: ./build + working-directory: . run: msbuild /m /p:Configuration=Release FMT.sln - name: Build Debug - working-directory: ./build + working-directory: . run: msbuild /m /p:Configuration=Debug FMT.sln - name: Nuget Pack From d6e128dcccbf516e692def582dffec7b77a2a8e0 Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Fri, 27 Mar 2020 22:36:24 +0800 Subject: [PATCH 04/12] Fix nuget push --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14c40228..0bc0fefc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,8 +37,8 @@ jobs: - name: Nuget Pack working-directory: . - run: nuget pack fmtlib.nuspec -version 6.1.2 -OutputFileNamesWithoutVersion -OutputDirectory dist + run: nuget pack fmtlib.nuspec -version 6.1.2-rc1 -OutputFileNamesWithoutVersion -OutputDirectory dist - name: Nuget Push working-directory: . - run: nuget push dist\fmtlib.nupkg \ No newline at end of file + run: nuget push dist\fmtlib.nupkg -ApiKey {{secrets.nuget_api_key}} \ No newline at end of file From d91e8f8e8a2d58147296fbf8d25943152b7101d5 Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Fri, 27 Mar 2020 23:55:57 +0800 Subject: [PATCH 05/12] Fix nuget package id --- fmtlib.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmtlib.nuspec b/fmtlib.nuspec index 8872bf20..a2677185 100644 --- a/fmtlib.nuspec +++ b/fmtlib.nuspec @@ -1,7 +1,7 @@ - wuganhao.fmtlib + fmtlib $version$ {fmt} lib nuget package Wu, Ganhao<wuganhao@hotmail.com> From 73a39fae7fa5031246c2d175e3e818d20ba98425 Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Fri, 27 Mar 2020 23:57:19 +0800 Subject: [PATCH 06/12] Fix - use of nuget api key in secrets. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bc0fefc..0d685823 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,4 +41,4 @@ jobs: - name: Nuget Push working-directory: . - run: nuget push dist\fmtlib.nupkg -ApiKey {{secrets.nuget_api_key}} \ No newline at end of file + run: nuget push dist\fmtlib.nupkg -ApiKey ${{secrets.nuget_api_key}} \ No newline at end of file From 1b6f722cec384d27f48caee12ba1877f4d484c32 Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Sat, 28 Mar 2020 00:04:31 +0800 Subject: [PATCH 07/12] Fix - missing source for nuget push --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d685823..b2e02081 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,4 +41,4 @@ jobs: - name: Nuget Push working-directory: . - run: nuget push dist\fmtlib.nupkg -ApiKey ${{secrets.nuget_api_key}} \ No newline at end of file + run: nuget push dist\fmtlib.nupkg -ApiKey ${{secrets.nuget_api_key}} -Source https://api.nuget.org/v3/index.json \ No newline at end of file From e2e44de8b760684d09eb6288175505a43f360c03 Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Sun, 5 Dec 2021 00:12:04 +0800 Subject: [PATCH 08/12] Initial nuget scripts --- .github/workflows/nuget.build.yml | 39 +++++++++++++++++++++++++++ .gitignore | 1 + test/.gitignore | 6 +++++ test/gtest/.gitignore | 3 +++ fmtlib.nuspec => wuganhao.fmt.nuspec | 9 ++++--- wuganhao.fmt.targets | 40 ++++++++++++++++++++++++++++ 6 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/nuget.build.yml create mode 100644 test/gtest/.gitignore rename fmtlib.nuspec => wuganhao.fmt.nuspec (64%) create mode 100644 wuganhao.fmt.targets diff --git a/.github/workflows/nuget.build.yml b/.github/workflows/nuget.build.yml new file mode 100644 index 00000000..607e3612 --- /dev/null +++ b/.github/workflows/nuget.build.yml @@ -0,0 +1,39 @@ +name: windows + +on: [push, pull_request] + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure + # Use a bash shell for $GITHUB_WORKSPACE. + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + cmake -DCMAKE_BUILD_TYPE=Debug -A Win32 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE + cmake -DCMAKE_BUILD_TYPE=Debug -A x64 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE + cmake -DCMAKE_BUILD_TYPE=Release -A Win21 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE + cmake -DCMAKE_BUILD_TYPE=Release -A x64 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE + + - name: Build + working-directory: ${{runner.workspace}}/build + run: | + $threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors + cmake --build . --config ${{matrix.build_type}} --parallel $threads + + - name: Test + working-directory: ${{runner.workspace}}/build + run: ctest -C Debug -V + env: + CTEST_OUTPUT_ON_FAILURE: True + + - name: Pack + run: | + nuget pack -version 1.0.0 wuganhao.fmt.nuspec \ No newline at end of file diff --git a/.gitignore b/.gitignore index 93556fa8..16fb8b97 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ fmt.pc *.vcxproj.filters *.vcxproj *.sln +/Release/ diff --git a/test/.gitignore b/test/.gitignore index 28999a10..33397b1f 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -21,3 +21,9 @@ /scan-test.dir/ *.vcxproj.filters *.vcxproj +/args-test.dir/ +/compile-fp-test.dir/ +/enforce-checks-test.dir/ +/Release/ +/unicode-test.dir/ +/xchar-test.dir/ diff --git a/test/gtest/.gitignore b/test/gtest/.gitignore new file mode 100644 index 00000000..b079302d --- /dev/null +++ b/test/gtest/.gitignore @@ -0,0 +1,3 @@ +/Debug/ +/Release/ +/gtest.dir/ diff --git a/fmtlib.nuspec b/wuganhao.fmt.nuspec similarity index 64% rename from fmtlib.nuspec rename to wuganhao.fmt.nuspec index a2677185..d609cea9 100644 --- a/fmtlib.nuspec +++ b/wuganhao.fmt.nuspec @@ -8,12 +8,13 @@ Wu, Ganhao<wuganhao@hotmail.com> false fmtlib - Create fmtlib for VS 2019 + fmt lib fmtlib std::format - - - + + + + \ No newline at end of file diff --git a/wuganhao.fmt.targets b/wuganhao.fmt.targets new file mode 100644 index 00000000..5320519f --- /dev/null +++ b/wuganhao.fmt.targets @@ -0,0 +1,40 @@ + + + + + $(MSBuildThisFileDirectory)..\include\;%(AdditionalIncludeDirectories) + + + + + fmtd.lib;%(AdditionalDependencies) + + + fmtd.lib;%(AdditionalDependencies) + + + + + fmt.lib;%(AdditionalDependencies) + + + fmt.lib;%(AdditionalDependencies) + + + + + $(MSBuildThisFileDirectory)..\lib\native\lib\x64;%(AdditionalLibraryDirectories) + + + $(MSBuildThisFileDirectory)..\lib\native\lib\x64;%(AdditionalLibraryDirectories) + + + + + $(MSBuildThisFileDirectory)..\lib\native\lib\x86;%(AdditionalLibraryDirectories) + + + $(MSBuildThisFileDirectory)..\lib\native\lib\x86;%(AdditionalLibraryDirectories) + + + \ No newline at end of file From 5a00a8117f1f137f4dfbc33489943daae0949b1a Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Sun, 5 Dec 2021 00:18:45 +0800 Subject: [PATCH 09/12] Generate x64 package only --- .github/workflows/nuget.build.yml | 14 ++++---------- wuganhao.fmt.targets | 8 -------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nuget.build.yml b/.github/workflows/nuget.build.yml index 607e3612..8f676e72 100644 --- a/.github/workflows/nuget.build.yml +++ b/.github/workflows/nuget.build.yml @@ -12,21 +12,15 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build - - name: Configure - # Use a bash shell for $GITHUB_WORKSPACE. - shell: bash - working-directory: ${{runner.workspace}}/build + - name: run: | - cmake -DCMAKE_BUILD_TYPE=Debug -A Win32 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE - cmake -DCMAKE_BUILD_TYPE=Debug -A x64 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE - cmake -DCMAKE_BUILD_TYPE=Release -A Win21 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE - cmake -DCMAKE_BUILD_TYPE=Release -A x64 -DCMAKE_CXX_STANDARD=17 $GITHUB_WORKSPACE + cmake -A x64 -DCMAKE_CXX_STANDARD=17 - name: Build - working-directory: ${{runner.workspace}}/build run: | $threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors - cmake --build . --config ${{matrix.build_type}} --parallel $threads + cmake --build . --config Release --parallel $threads + cmake --build . --config Debug --parallel $threads - name: Test working-directory: ${{runner.workspace}}/build diff --git a/wuganhao.fmt.targets b/wuganhao.fmt.targets index 5320519f..acc864aa 100644 --- a/wuganhao.fmt.targets +++ b/wuganhao.fmt.targets @@ -29,12 +29,4 @@ $(MSBuildThisFileDirectory)..\lib\native\lib\x64;%(AdditionalLibraryDirectories) - - - $(MSBuildThisFileDirectory)..\lib\native\lib\x86;%(AdditionalLibraryDirectories) - - - $(MSBuildThisFileDirectory)..\lib\native\lib\x86;%(AdditionalLibraryDirectories) - - \ No newline at end of file From 69869ca35ae453911b4365ecfbc524950813e76b Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Sun, 5 Dec 2021 00:20:06 +0800 Subject: [PATCH 10/12] Update pipeline name. --- .github/workflows/nuget.build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nuget.build.yml b/.github/workflows/nuget.build.yml index 8f676e72..88f08bfe 100644 --- a/.github/workflows/nuget.build.yml +++ b/.github/workflows/nuget.build.yml @@ -1,4 +1,4 @@ -name: windows +name: nuget.build on: [push, pull_request] From 0469e1d09a8b0685d18e44efc92ae85c3ef516ef Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Sun, 5 Dec 2021 01:10:27 +0800 Subject: [PATCH 11/12] Fix nuspec --- .github/workflows/nuget.build.yml | 2 +- wuganhao.fmt.nuspec => wuganhao.fmtlib.nuspec | 13 ++++++++----- wuganhao.fmt.targets => wuganhao.fmtlib.targets | 0 3 files changed, 9 insertions(+), 6 deletions(-) rename wuganhao.fmt.nuspec => wuganhao.fmtlib.nuspec (61%) rename wuganhao.fmt.targets => wuganhao.fmtlib.targets (100%) diff --git a/.github/workflows/nuget.build.yml b/.github/workflows/nuget.build.yml index 88f08bfe..d4f1ca57 100644 --- a/.github/workflows/nuget.build.yml +++ b/.github/workflows/nuget.build.yml @@ -30,4 +30,4 @@ jobs: - name: Pack run: | - nuget pack -version 1.0.0 wuganhao.fmt.nuspec \ No newline at end of file + nuget pack -version 1.0.0 wuganhao.fmtlib.nuspec -outputdirectory dist \ No newline at end of file diff --git a/wuganhao.fmt.nuspec b/wuganhao.fmtlib.nuspec similarity index 61% rename from wuganhao.fmt.nuspec rename to wuganhao.fmtlib.nuspec index d609cea9..acd33704 100644 --- a/wuganhao.fmt.nuspec +++ b/wuganhao.fmtlib.nuspec @@ -1,7 +1,7 @@ - fmtlib + wuganhao.fmtlib $version$ {fmt} lib nuget package Wu, Ganhao<wuganhao@hotmail.com> @@ -10,11 +10,14 @@ fmtlib fmt lib fmtlib std::format + + + - - - - + + + + \ No newline at end of file diff --git a/wuganhao.fmt.targets b/wuganhao.fmtlib.targets similarity index 100% rename from wuganhao.fmt.targets rename to wuganhao.fmtlib.targets From 81a37d760ec6d4f3d806dc0ca31f6497269871bb Mon Sep 17 00:00:00 2001 From: "Wu, Ganhao" Date: Sun, 5 Dec 2021 01:45:30 +0800 Subject: [PATCH 12/12] Remove unused pipeline. --- .github/workflows/build.yml | 44 ------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index b2e02081..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Push Build - -on: - push: - -jobs: - build: - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - clean: true - fetch-depth: 1 - - - name: Setup NuGet - uses: warrenbuckley/Setup-Nuget@v1 - - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 - #with: - # arch: amd64 - # toolset: 16.0 - - - name: CMake - working-directory: . - run: cmake . - - - name: Build Release - working-directory: . - run: msbuild /m /p:Configuration=Release FMT.sln - - - name: Build Debug - working-directory: . - run: msbuild /m /p:Configuration=Debug FMT.sln - - - name: Nuget Pack - working-directory: . - run: nuget pack fmtlib.nuspec -version 6.1.2-rc1 -OutputFileNamesWithoutVersion -OutputDirectory dist - - - name: Nuget Push - working-directory: . - run: nuget push dist\fmtlib.nupkg -ApiKey ${{secrets.nuget_api_key}} -Source https://api.nuget.org/v3/index.json \ No newline at end of file