Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appveyor or Github CI #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
51 changes: 51 additions & 0 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI_build

on: [push, pull_request]

jobs:
build:

runs-on: windows-latest
strategy:
matrix:
build_configuration: [Release]
build_platform: [Any CPU]
build_boost_version: [1_85_0]
build_boost_version_dot: [1.85.0]
build_msvc_version_dot: [14.3, 14.2, 14.1]
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Nuget.exe
uses: nuget/setup-nuget@v2

- name: restore input nuget packages
working-directory: builder\
run: |
nuget restore builder\packages.config -PackagesDirectory packages
nuget restore builderTest\packages.config -PackagesDirectory packages

- name: Setup to add MSBuild.exe to path
uses: microsoft/setup-msbuild@v2

- name: MSBuild of builder
working-directory: builder\
run: |
msbuild builder.sln /m /verbosity:minimal /t:restore /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"
msbuild builder.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"

- name: boost binary download created by https://github.com/teeks99/boost-release-windows
working-directory: .
run: |
Set-Location -Path 'D:\a'
New-Item -ItemType directory -Path D:\a\boostorg
Set-Location -Path 'D:\a\boostorg'
(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")
(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")
.\boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-64.exe /SILENT /DIR=D:\a\boostorg\boost | Out-Null
.\boost_${{ matrix.build_boost_version }}-msvc-${{ matrix.build_msvc_version_dot }}-32.exe /SILENT /DIR=D:\a\boostorg\boost | Out-Null

- name: run builder
working-directory: builder\builder\bin\Release\
run: .\builder.exe
106 changes: 106 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
version: 1.85.{build}


environment:
matrix:

- PlatformToolset: v143
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
BUILD_BOOST_VERSION: 1_85_0
BUILD_BOOST_VERSION_DOT: 1.85.0
BUILD_MSVC_VERSION_DOT: 14.3

configuration:
- Release
#- Debug

platform:
- Any CPU

install:
- if "%platform%"=="Any CPU" set archi=amd64
- if "%platform%"=="Any CPU" set platform_input=Any CPU


- if "%PlatformToolset%"=="v140" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v141" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v142" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v143" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%

- cd "%APPVEYOR_BUILD_FOLDER%"\..\..
- mkdir boostorg
- cd boostorg
# build from source, but fails due to runtime limitation as each build takes ~ 40min
#- appveyor DownloadFile https://boostorg.jfrog.io/artifactory/main/release/%BUILD_BOOST_VERSION_DOT%/source/boost_%BUILD_BOOST_VERSION%.7z
#- boost.bat

# Free disk space for boost zip package
- rmdir /q /s C:\Qt
- rmdir /q /s C:\Python26
- rmdir /q /s C:\Python26-x64
- rmdir /q /s C:\Python27
- rmdir /q /s C:\Python27-x64
- rmdir /q /s C:\Python33
- rmdir /q /s C:\Python33-x64
- rmdir /q /s C:\Python34
- rmdir /q /s C:\Python34-x64
- rmdir /q /s C:\Python35
- rmdir /q /s C:\Python35-x64
- rmdir /q /s C:\Python36
- rmdir /q /s C:\Python36-x64
- rmdir /q /s C:\Python37
- rmdir /q /s C:\Python37-x64
- rmdir /q /s C:\Python38
- rmdir /q /s C:\Python38-x64
- rmdir /q /s C:\Python39
- rmdir /q /s C:\Python39-x64
- rmdir /q /s C:\Python310
- rmdir /q /s C:\Python310-x64
- rmdir /q /s C:\Python311
- rmdir /q /s C:\Python311-x64
- rmdir /q /s C:\Python312
- rmdir /q /s C:\Python312-x64

# complete zip, but fails due to storage limitations on appveyor (artifactory download is much faster than sourceforge)
- appveyor DownloadFile https://boostorg.jfrog.io/artifactory/main/release/%BUILD_BOOST_VERSION_DOT%/binaries/boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z
#- appveyor DownloadFile https://sourceforge.net/projects/boost/files/boost-binaries/%BUILD_BOOST_VERSION_DOT%/boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z
- 7z x -y boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z > nul
- del /q boost_%BUILD_BOOST_VERSION%-bin-msvc-all-32-64.7z
- rename boost_%BUILD_BOOST_VERSION% boost


#- 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
#- 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
#- boost_%BUILD_BOOST_VERSION%-msvc-%BUILD_MSVC_VERSION_DOT%-64.exe /SILENT /DIR=C:\boostorg\boost
#- boost_%BUILD_BOOST_VERSION%-msvc-%BUILD_MSVC_VERSION_DOT%-32.exe /SILENT /DIR=C:\boostorg\boost

- nuget restore "%APPVEYOR_BUILD_FOLDER%"\builder\builder\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\builder\packages
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\builder\builderTest\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\builder\packages


build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"\builder
- msbuild builder.sln /m /verbosity:minimal /t:restore /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild builder.sln /m /verbosity:minimal /p:configuration="%configuration%" /p:platform="%platform_input%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cd "%APPVEYOR_BUILD_FOLDER%"

after_build:
- cd "%APPVEYOR_BUILD_FOLDER%"\builder\builder\bin\Release\
- call builder.exe

artifacts:
#- path: installer\build\**\*.*
# name: releases

deploy:
provider: GitHub
auth_token:
secure: #!TODO!
artifact: releases
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true
PlatformToolset: v143
configuration: Release
1 change: 1 addition & 0 deletions builder/builder/ApiKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//nuget api key needs to be placed here
2 changes: 1 addition & 1 deletion builder/builder/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/>
</startup>
</configuration>
13 changes: 7 additions & 6 deletions builder/builder/Nuspec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,21 @@ public Dependency(string id, string version)
N("version", version.ToString()),
N("authors", Config.Authors),
N("owners", Config.Owners),
N("licenseUrl", "https://github.com/sergey-shandar/getboost/blob/master/LICENSE"),
N("license", Xml.A("type", "expression")).Append("BSL-1.0"),
N("projectUrl", "https://github.com/sergey-shandar/getboost"),
N("requireLicenseAcceptance", "false"),
N("description", description),
N("dependencies").Append(
N("group", Xml.A("targetFramework", "native")).Append(
dependencyList.Select(
d =>
d =>
N(
"dependency",
Xml.A("id", d.Id),
Xml.A("version", d.Version)
)
)
),
)),
N("tags", string.Join(" ", tags))
),
N("files").Append(fileList.Select(f => f.N))
Expand All @@ -93,7 +94,7 @@ public Dependency(string id, string version)
var nupkgFile = id + "." + version + ".nupkg";
Console.WriteLine("uploading: " + nupkgFile);
{
var p = Process.Start(
/* var p = Process.Start(
new ProcessStartInfo(
@"..\..\..\packages\NuGet.CommandLine.6.9.1\tools\nuget.exe",
$"push {nupkgFile} -Source https://api.nuget.org/v3/index.json -ApiKey {ApiKey.Value}")
Expand All @@ -104,14 +105,14 @@ public Dependency(string id, string version)
if (p.ExitCode != 0) {
Environment.Exit(p.ExitCode);
}
}
*/ }
}

public static void Create(
string nuspecId,
string packageId,
Version version,
string description,
string description,
IEnumerable<Targets.ItemDefinitionGroup> itemDefinitionGroupList,
IEnumerable<File> fileList,
IEnumerable<CompilationUnit> compilationUnitList,
Expand Down
2 changes: 1 addition & 1 deletion builder/builder/builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>builder</RootNamespace>
<AssemblyName>builder</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
11 changes: 10 additions & 1 deletion builder/builderTest/builderTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>builderTest</RootNamespace>
<AssemblyName>builderTest</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand Down Expand Up @@ -40,7 +40,16 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Framework.G1.1.0.13.0\lib\portable-net45+sl50+win+wp80+MonoAndroid10+MonoTouch10\Framework.G1.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.Composition.Registration" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
Expand Down
1 change: 1 addition & 0 deletions builder/builderTest/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Framework.G1" version="1.0.13.0" targetFramework="net451" />
<package id="NuGet.CommandLine" version="6.9.1" targetFramework="net48" developmentDependency="true" />
</packages>