Skip to content

Commit b8642cd

Browse files
committed
Adds custom jobs
Adds custom release and package jobs
1 parent 547ee61 commit b8642cd

File tree

1 file changed

+51
-22
lines changed

1 file changed

+51
-22
lines changed

appveyor.yml

Lines changed: 51 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,67 @@ image: Visual Studio 2019
22

33
environment:
44
matrix:
5-
- job_name: Package
5+
- job_name: Windows Builds x86
6+
job_group: build
7+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
8+
9+
- job_name: Windows Builds x64
10+
job_group: build
11+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
12+
13+
- job_name: Build Combined
14+
job_depends_on: build
15+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
616

7-
platform:
8-
- x86
9-
- x64
10-
11-
configuration: Release
1217

1318
before_build:
1419
- findstr /V "{48C5258A-FA49-4173-AEE5-0FCA5190DFF2}.Debug {48C5258A-FA49-4173-AEE5-0FCA5190DFF2}.Release" .\ReClass.NET.sln > cleaned.sln # This removes the .Unix project from the solution another option would be to create a custom target inside the project
1520
- rm ReClass.NET.sln
1621
- nuget restore # restore nuget dependencies
1722

18-
# Build the solution with the name cleaned.sln
19-
build:
20-
project: cleaned.sln
21-
verbosity: minimal
22-
23-
# job-specific configurations
2423
for:
25-
-
26-
matrix:
27-
only:
28-
- job_name: Package
29-
build_script:
30-
- echo Job 1
31-
32-
# Package the builded files into a zip and push as artifacts
33-
after_build:
24+
# ======================================
25+
# Build
26+
# ======================================
27+
-
28+
matrix:
29+
only:
30+
- job_name: Windows Builds x86
31+
# Build the solution with the name cleaned.sln
32+
# Build the solution with the name cleaned.sln
33+
build_script:
34+
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
35+
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x86
36+
37+
-
38+
matrix:
39+
only:
40+
- job_name: Windows Builds x64
41+
42+
# Build the solution with the name cleaned.sln
43+
build_script:
44+
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
45+
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x64
46+
47+
48+
# ======================================
49+
# Release
50+
# ======================================
51+
-
52+
matrix:
53+
only:
54+
- job_name: Build Combined
55+
56+
build_script:
57+
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
58+
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x86
59+
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x64
60+
61+
# Package the builded files into a zip and push as artifacts
62+
after_build:
3463
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
3564
- cd Bin # CD into Bin
3665
- cd Release # CD into Release
3766
- set BUILD_ARCHIVE=%APPVEYOR_PROJECT_NAME%-%CONFIGURATION%-%PLATFORM%.zip # Set our output archive as projectname-(Debug|Release)-(x86|x64)
3867
- cmd: 7z a -r %BUILD_ARCHIVE% *.dll *.exe # Add all exe and dll files to our archive
39-
- appveyor PushArtifact %BUILD_ARCHIVE% # Upload the archive as an artifact
68+
- appveyor PushArtifact %BUILD_ARCHIVE% # Upload the archive as an artifact

0 commit comments

Comments
 (0)