Skip to content

Commit 831b782

Browse files
committed
- github action as starting point
- update NuGet.CommandLine -> NuGet.CommandLine.6.4.0 - add initial appveyor.yml CI config - prepare for boost 1.81.0 - fix unittest compilation issue - disabled upload of nuget to avoid upload quota exceeded with appveyor
1 parent c3a6df5 commit 831b782

File tree

8 files changed

+187
-6
lines changed

8 files changed

+187
-6
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "nuget" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
# Maintain dependencies for GitHub Actions
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"

.github/workflows/CI_build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI_build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: windows-latest
9+
strategy:
10+
max-parallel: 6
11+
matrix:
12+
build_configuration: [Release]
13+
build_platform: [Any CPU]
14+
build_boost_version: [1_81_0]
15+
build_boost_version_dot: [1.81.0]
16+
build_msvc_version_dot: [14.2, 14.1]
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Nuget.exe
22+
uses: nuget/setup-nuget@v1
23+
24+
- name: restore input nuget packages
25+
working-directory: builder\
26+
run: |
27+
nuget restore builder\packages.config -PackagesDirectory packages
28+
nuget restore builderTest\packages.config -PackagesDirectory packages
29+
30+
- name: Setup to add MSBuild.exe to path
31+
uses: microsoft/setup-msbuild@v1
32+
33+
- name: MSBuild of builder
34+
working-directory: builder\
35+
run: |
36+
msbuild builder.sln /m /verbosity:minimal /t:restore /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"
37+
msbuild builder.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"
38+
39+
- name: boost download
40+
working-directory: .
41+
run: |
42+
Set-Location -Path 'D:\a'
43+
New-Item -ItemType directory -Path D:\a\boostorg
44+
Set-Location -Path 'D:\a\boostorg'
45+
(New-Object System.Net.WebClient).DownloadFile("https://boostorg.jfrog.io/artifactory/main/release/${{ matrix.build_boost_version_dot }}/binaries/boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-64.exe", "D:\a\boostorg\boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-64.exe")
46+
(New-Object System.Net.WebClient).DownloadFile("https://boostorg.jfrog.io/artifactory/main/release/${{ matrix.build_boost_version_dot }}/binaries/boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-32.exe", "D:\a\boostorg\boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-32.exe")
47+
.\boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-64.exe /SILENT /DIR=D:\a\boostorg\boost | Out-Null
48+
.\boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-32.exe /SILENT /DIR=D:\a\boostorg\boost | Out-Null
49+
50+
- name: run builder
51+
working-directory: builder\builder\bin\Release\
52+
run: .\builder.exe

appveyor.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
version: 1.81.{build}
2+
3+
4+
environment:
5+
matrix:
6+
7+
- PlatformToolset: v143
8+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
9+
BUILD_BOOST_VERSION: 1_81_0
10+
BUILD_BOOST_VERSION_DOT: 1.81.0
11+
BUILD_MSVC_VERSION_DOT: 14.2
12+
13+
configuration:
14+
- Release
15+
#- Debug
16+
17+
platform:
18+
- Any CPU
19+
20+
install:
21+
- if "%platform%"=="Any CPU" set archi=amd64
22+
- if "%platform%"=="Any CPU" set platform_input=Any CPU
23+
24+
25+
- if "%PlatformToolset%"=="v140" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi%
26+
- if "%PlatformToolset%"=="v141" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
27+
- if "%PlatformToolset%"=="v142" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
28+
- if "%PlatformToolset%"=="v143" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
29+
30+
- cd "%APPVEYOR_BUILD_FOLDER%"\..\..
31+
- mkdir boostorg
32+
- cd boostorg
33+
# build from source, but fails due to runtime limitation as each build takes ~ 40min
34+
#- appveyor DownloadFile https://boostorg.jfrog.io/artifactory/main/release/%BUILD_BOOST_VERSION_DOT%/source/boost_%BUILD_BOOST_VERSION%.7z
35+
#- boost.bat
36+
37+
# Free disk space for boost zip package
38+
- rmdir /q /s C:\Qt
39+
- rmdir /q /s C:\Python26
40+
- rmdir /q /s C:\Python26-x64
41+
- rmdir /q /s C:\Python27
42+
- rmdir /q /s C:\Python27-x64
43+
- rmdir /q /s C:\Python33
44+
- rmdir /q /s C:\Python33-x64
45+
- rmdir /q /s C:\Python34
46+
- rmdir /q /s C:\Python34-x64
47+
- rmdir /q /s C:\Python35
48+
- rmdir /q /s C:\Python35-x64
49+
- rmdir /q /s C:\Python36
50+
- rmdir /q /s C:\Python36-x64
51+
- rmdir /q /s C:\Python37
52+
- rmdir /q /s C:\Python37-x64
53+
- rmdir /q /s C:\Python38
54+
- rmdir /q /s C:\Python38-x64
55+
- rmdir /q /s C:\Python39
56+
- rmdir /q /s C:\Python39-x64
57+
- rmdir /q /s C:\Python310
58+
- rmdir /q /s C:\Python310-x64
59+
60+
# complete zip, but fails due to storage limitations on appveyor (artifactory download is much faster than sourceforge)
61+
- appveyor DownloadFile https://boostorg.jfrog.io/artifactory/main/release/%BUILD_BOOST_VERSION_DOT%/binaries/boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z
62+
#- appveyor DownloadFile https://sourceforge.net/projects/boost/files/boost-binaries/%BUILD_BOOST_VERSION_DOT%/boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z
63+
- 7z x -y boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z > nul
64+
- del /q boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z
65+
- rename boost_%BUILD_BOOST_VERSION% boost
66+
67+
68+
#- appveyor DownloadFile https://boostorg.jfrog.io/artifactory/main/release/%BUILD_BOOST_VERSION_DOT%/binaries/boost_%BUILD_BOOST_VERSION%-msvc-%BUILD_MSVC_VERSION_DOT%-32.exe
69+
#- appveyor DownloadFile https://boostorg.jfrog.io/artifactory/main/release/%BUILD_BOOST_VERSION_DOT%/binaries/boost_%BUILD_BOOST_VERSION%-msvc-%BUILD_MSVC_VERSION_DOT%-64.exe
70+
#- boost_%BUILD_BOOST_VERSION%-msvc-%BUILD_MSVC_VERSION_DOT%-64.exe /SILENT /DIR=C:\boostorg\boost
71+
#- boost_%BUILD_BOOST_VERSION%-msvc-%BUILD_MSVC_VERSION_DOT%-32.exe /SILENT /DIR=C:\boostorg\boost
72+
73+
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\builder\builder\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\builder\packages
74+
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\builder\builderTest\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\builder\packages
75+
76+
77+
build_script:
78+
- cd "%APPVEYOR_BUILD_FOLDER%"\builder
79+
- msbuild builder.sln /m /verbosity:minimal /t:restore /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
80+
- msbuild builder.sln /m /verbosity:minimal /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
81+
- cd "%APPVEYOR_BUILD_FOLDER%"
82+
83+
after_build:
84+
- cd "%APPVEYOR_BUILD_FOLDER%"\builder\builder\bin\Release\
85+
- call builder.exe
86+
87+
artifacts:
88+
#- path: installer\build\**\*.*
89+
# name: releases
90+
91+
deploy:
92+
provider: GitHub
93+
auth_token:
94+
secure: #!TODO!
95+
artifact: releases
96+
draft: false
97+
prerelease: false
98+
force_update: true
99+
on:
100+
appveyor_repo_tag: true
101+
PlatformToolset: v143
102+
configuration: Release

builder/builder/Nuspec.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ private static void CreateNuspec(
8585
nuspec.CreateDocument().Save(nuspecFile);
8686
Process.Start(
8787
new ProcessStartInfo(
88-
@"..\..\..\packages\NuGet.CommandLine.5.11.3\tools\nuget.exe",
88+
@"..\..\..\packages\NuGet.CommandLine.6.4.0\tools\nuget.exe",
8989
"pack " + nuspecFile)
9090
{
9191
UseShellExecute = false,
9292
}).WaitForExit();
9393
var nupkgFile = id + "." + version + ".nupkg";
9494
Console.WriteLine("uploading: " + nupkgFile);
9595
{
96-
var p = Process.Start(
96+
/* var p = Process.Start(
9797
new ProcessStartInfo(
98-
@"..\..\..\packages\NuGet.CommandLine.5.10.0\tools\nuget.exe",
98+
@"..\..\..\packages\NuGet.CommandLine.6.4.0\tools\nuget.exe",
9999
$"push {nupkgFile} -Source https://api.nuget.org/v3/index.json -ApiKey {ApiKey.Value}")
100100
{
101101
UseShellExecute = false,
@@ -104,7 +104,7 @@ private static void CreateNuspec(
104104
if (p.ExitCode != 0) {
105105
Environment.Exit(p.ExitCode);
106106
}
107-
}
107+
*/ }
108108
}
109109

110110
public static void Create(

builder/builder/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Framework.G1" version="1.0.13.0" targetFramework="net45" userInstalled="true" />
4-
<package id="NuGet.CommandLine" version="5.11.3" targetFramework="net48" userInstalled="true" developmentDependency="true" />
4+
<package id="NuGet.CommandLine" version="6.4.0" targetFramework="net48" userInstalled="true" developmentDependency="true" />
55
</packages>

builder/builderTest/UnitTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void VersionTestMethod()
6363
// M(Enumerable.Empty<string>());
6464
// Lib(Enumerable.Empty<Package>());
6565
Assert.AreEqual(new UnstableVersion(1, 56, 0, "rc1").ToString(), "1.56.0-rc1");
66-
Assert.AreEqual(new StableVersion(1, 55, 0, 16).ToString(), "1.55.0.16");
66+
Assert.AreEqual(new StableVersion(1, 55, 0).ToString(), "1.55.0");
6767
}
6868
}
6969
}

builder/builderTest/builderTest.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@
4040
<SpecificVersion>False</SpecificVersion>
4141
<HintPath>..\packages\Framework.G1.1.0.13.0\lib\portable-net45+sl50+win+wp80+MonoAndroid10+MonoTouch10\Framework.G1.dll</HintPath>
4242
</Reference>
43+
<Reference Include="Microsoft.Build.Utilities.v4.0" />
44+
<Reference Include="Microsoft.CSharp" />
4345
<Reference Include="System" />
46+
<Reference Include="System.ComponentModel.Composition" />
47+
<Reference Include="System.ComponentModel.Composition.Registration" />
48+
<Reference Include="System.ComponentModel.DataAnnotations" />
49+
<Reference Include="System.IO.Compression" />
50+
<Reference Include="System.Net.Http" />
51+
<Reference Include="System.Xml" />
52+
<Reference Include="System.Xml.Linq" />
4453
</ItemGroup>
4554
<Choose>
4655
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Framework.G1" version="1.0.13.0" targetFramework="net451" />
4+
<package id="NuGet.CommandLine" version="6.4.0" targetFramework="net48" developmentDependency="true" />
45
</packages>

0 commit comments

Comments
 (0)