Skip to content

Commit f2e1c8e

Browse files
authored
on demand build for linux-64 (#207)
Build projects for both windows and linux for on demand build
1 parent 3738903 commit f2e1c8e

File tree

37 files changed

+299
-141
lines changed

37 files changed

+299
-141
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: build pixel designer
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
target-os:
7+
required: true
8+
type: string
9+
target-runtime:
10+
required: true
11+
type: string
12+
target-framework:
13+
required: true
14+
type: string
15+
self-contained:
16+
required: true
17+
type: string
18+
19+
jobs:
20+
21+
build-pixel-designer:
22+
runs-on: ${{ inputs.target-os }}
23+
24+
steps:
25+
26+
- name: Install GitVersion
27+
uses: gittools/actions/gitversion/[email protected]
28+
with:
29+
versionSpec: '5.x'
30+
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Determine Version
37+
id: gitversion
38+
uses: gittools/actions/gitversion/[email protected]
39+
40+
- name: Display GitVersion outputs
41+
run: |
42+
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
43+
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
44+
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
45+
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
46+
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
47+
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
48+
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
49+
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
50+
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
51+
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
52+
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
53+
54+
- name: Setup .NET
55+
uses: actions/setup-dotnet@v3
56+
with:
57+
dotnet-version: ${{ matrix.dotnet-version }}
58+
59+
- name : Cache nuget packages
60+
uses: actions/cache@v2
61+
with:
62+
path: ${{ github.workspace }}/.nuget/packages
63+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
64+
restore-keys: |
65+
${{ runner.os }}-nuget-
66+
67+
- name: Restore dependencies
68+
run: dotnet restore Pixel.Automation.sln
69+
70+
- name: Build pixel-designer for runtime win10-64 and targetframework net6.0-windows
71+
run: dotnet build src/Pixel.Automation.Designer.Views/Pixel.Automation.Designer.Views.csproj -c release --no-restore --runtime ${{ inputs.target-runtime }} --self-contained ${{ inputs.self-contained }} -p:TargetFramework=${{ inputs.target-framework }}
72+
73+
- name: Upload pixel-designer artifacts
74+
uses: actions/upload-artifact@v3
75+
with:
76+
name: pixel-designer-${{ matrix.os }}
77+
path: .builds/release/designer/${{ inputs.target-runtime }}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: build pixel persistence
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
target-os:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
12+
build-pixel-persistence:
13+
runs-on: ${{ inputs.target-os }}
14+
15+
steps:
16+
17+
- name: Install GitVersion
18+
uses: gittools/actions/gitversion/[email protected]
19+
with:
20+
versionSpec: '5.x'
21+
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Determine Version
28+
id: gitversion
29+
uses: gittools/actions/gitversion/[email protected]
30+
31+
- name: Display GitVersion outputs
32+
run: |
33+
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
34+
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
35+
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
36+
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
37+
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
38+
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
39+
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
40+
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
41+
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
42+
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
43+
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
44+
45+
- name: Setup .NET
46+
uses: actions/setup-dotnet@v3
47+
with:
48+
dotnet-version: ${{ matrix.dotnet-version }}
49+
50+
- name : Cache nuget packages
51+
uses: actions/cache@v2
52+
with:
53+
path: ${{ github.workspace }}/.nuget/packages
54+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
55+
restore-keys: |
56+
${{ runner.os }}-nuget-
57+
58+
- name: Restore dependencies
59+
run: dotnet restore src/Pixel.Persistence.Services.Api/Pixel.Persistence.Services.Api.csproj
60+
61+
- name: Publish pixel-persistence
62+
run: dotnet publish src/Pixel.Persistence.Services.Api/Pixel.Persistence.Services.Api.csproj -c Release --no-restore -o .builds/release/service
63+
64+
- name: Upload pixel-persistence artifacts
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: pixel-persistence-${{ inputs.target-os }}
68+
path: .builds/release/service
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: build pixel runner
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
target-framework:
7+
required: true
8+
type: string
9+
target-os:
10+
required: true
11+
type: string
12+
target-runtime:
13+
required: true
14+
type: string
15+
self-contained:
16+
required: true
17+
type: string
18+
19+
jobs:
20+
21+
build-pixel-runner:
22+
runs-on: ${{ inputs.target-os }}
23+
24+
steps:
25+
26+
- name: Install GitVersion
27+
uses: gittools/actions/gitversion/[email protected]
28+
with:
29+
versionSpec: '5.x'
30+
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Determine Version
37+
id: gitversion
38+
uses: gittools/actions/gitversion/[email protected]
39+
40+
- name: Display GitVersion outputs
41+
run: |
42+
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
43+
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
44+
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
45+
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
46+
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
47+
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
48+
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
49+
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
50+
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
51+
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
52+
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
53+
54+
- name: Setup .NET
55+
uses: actions/setup-dotnet@v3
56+
with:
57+
dotnet-version: ${{ matrix.dotnet-version }}
58+
59+
- name : Cache nuget packages
60+
uses: actions/cache@v2
61+
with:
62+
path: ${{ github.workspace }}/.nuget/packages
63+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
64+
restore-keys: |
65+
${{ runner.os }}-nuget-
66+
67+
- name: Restore dependencies
68+
run: dotnet restore Pixel.Automation.sln
69+
70+
- name: Build pixel-runner
71+
run: dotnet build src/Pixel.Automation.Test.Runner/Pixel.Automation.Test.Runner.csproj -c release --no-restore --runtime ${{ inputs.target-runtime }} --self-contained ${{ inputs.self-contained }} -p:TargetFramework=${{ inputs.target-framework }}
72+
73+
- name: Upload pixel-runner artifacts
74+
uses: actions/upload-artifact@v3
75+
with:
76+
name: pixel-runner-${{ matrix.os }}
77+
path: .builds/release/runner/${{ inputs.target-runtime }}

.github/workflows/on-demand-build-with-artifact.yml

Lines changed: 33 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -8,83 +8,40 @@ on:
88

99
jobs:
1010

11-
build:
11+
build-pixel-designer-for-win10-x64:
12+
uses: ./.github/workflows/build-pixel-designer.yml
13+
with:
14+
target-os: windows-latest
15+
target-runtime: win10-x64
16+
target-framework: net6.0-windows
17+
self-contained: false
18+
19+
build-pixel-runner-for-win10-x64:
20+
uses: ./.github/workflows/build-pixel-runner.yml
21+
with:
22+
target-os: windows-latest
23+
target-runtime: win10-x64
24+
target-framework: net6.0-windows
25+
self-contained: false
26+
27+
build-pixel-runner-for-linux-x64:
28+
uses: ./.github/workflows/build-pixel-runner.yml
29+
with:
30+
target-os: ubuntu-latest
31+
target-runtime: linux-x64
32+
target-framework: net6.0
33+
self-contained: false
34+
35+
build-pixel-persistence-for-win10-x64:
36+
uses: ./.github/workflows/build-pixel-persistence.yml
37+
with:
38+
target-os: windows-latest
39+
40+
build-pixel-persistence-for-linux-x64:
41+
uses: ./.github/workflows/build-pixel-persistence.yml
42+
with:
43+
target-os: ubuntu-latest
1244

13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
os: [windows-latest]
17-
dotnet-version: [ '6.0.x' ]
1845

19-
steps:
20-
21-
- name: Install GitVersion
22-
uses: gittools/actions/gitversion/[email protected]
23-
with:
24-
versionSpec: '5.x'
25-
26-
- name: Checkout
27-
uses: actions/checkout@v3
28-
with:
29-
fetch-depth: 0
3046

31-
- name: Determine Version
32-
id: gitversion
33-
uses: gittools/actions/gitversion/[email protected]
3447

35-
- name: Display GitVersion outputs
36-
run: |
37-
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
38-
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
39-
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
40-
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
41-
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
42-
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
43-
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
44-
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
45-
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
46-
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
47-
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
48-
49-
- name: Setup .NET
50-
uses: actions/setup-dotnet@v3
51-
with:
52-
dotnet-version: ${{ matrix.dotnet-version }}
53-
54-
- name : Cache nuget packages
55-
uses: actions/cache@v2
56-
with:
57-
path: ${{ github.workspace }}/.nuget/packages
58-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
59-
restore-keys: |
60-
${{ runner.os }}-nuget-
61-
62-
- name: Restore dependencies
63-
run: dotnet restore Pixel.Automation.sln
64-
65-
- name: Build
66-
run: dotnet build Pixel.Automation.sln -c Release --no-restore
67-
68-
- name: Test
69-
run: dotnet test Pixel.Automation.sln -c Release --no-build --verbosity normal
70-
71-
- name: Publish Persistence Service
72-
run: dotnet publish src/Pixel.Persistence.Services.Api/Pixel.Persistence.Services.Api.csproj -c Release --no-restore -o .builds/Release/Service
73-
74-
- name: Upload Designer artifacts
75-
uses: actions/upload-artifact@v3
76-
with:
77-
name: pixel-designer-${{ matrix.os }}
78-
path: .builds/Release/Designer
79-
80-
- name: Upload Runner artifacts
81-
uses: actions/upload-artifact@v3
82-
with:
83-
name: pixel-runner-${{ matrix.os }}
84-
path: .builds/Release/Runner
85-
86-
- name: Upload Persistence artifacts
87-
uses: actions/upload-artifact@v3
88-
with:
89-
name: pixel-persistence-${{ matrix.os }}
90-
path: .builds/Release/Service

src/Pixel.Automation.Assertions.Components/Pixel.Automation.Assertions.Components.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>net6.0;net6.0-windows</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
6-
<EnableDynamicLoading>true</EnableDynamicLoading>
7-
<!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
6+
<EnableDynamicLoading>true</EnableDynamicLoading>
87
<RuntimeIdentifiers>win10-x64;linux-x64</RuntimeIdentifiers>
98
</PropertyGroup>
109

src/Pixel.Automation.Designer.Views/Pixel.Automation.Designer.Views.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
55
<TargetFramework>net6.0-windows</TargetFramework>
6+
<RuntimeIdentifiers>win10-x64;</RuntimeIdentifiers>
67
<UseWPF>true</UseWPF>
7-
<PreserveCompilationContext>true</PreserveCompilationContext>
8-
<!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
9-
<!--<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>-->
10-
<!--<RuntimeIdentifier>win10-x64</RuntimeIdentifier>-->
8+
<PreserveCompilationContext>true</PreserveCompilationContext>
119
<SatelliteResourceLanguages>en-US;</SatelliteResourceLanguages>
1210
</PropertyGroup>
1311

src/Pixel.Automation.Image.Matching.Components/Pixel.Automation.Image.Matching.Components.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net6.0-windows</TargetFrameworks>
5-
<EnableDynamicLoading>true</EnableDynamicLoading>
6-
<!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
4+
<TargetFrameworks>net6.0;net6.0-windows</TargetFrameworks>
5+
<EnableDynamicLoading>true</EnableDynamicLoading>
76
<RuntimeIdentifiers>win10-x64;linux-x64</RuntimeIdentifiers>
87
</PropertyGroup>
98

src/Pixel.Automation.Image.Scrapper/Pixel.Automation.Image.Scrapper.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<OutputType>Library</OutputType>
55
<TargetFramework>net6.0-windows</TargetFramework>
66
<UseWPF>true</UseWPF>
7-
<EnableDynamicLoading>true</EnableDynamicLoading>
8-
<!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
7+
<EnableDynamicLoading>true</EnableDynamicLoading>
98
<RuntimeIdentifiers>win10-x64;</RuntimeIdentifiers>
109
</PropertyGroup>
1110

src/Pixel.Automation.Input.Devices.Components/Pixel.Automation.Input.Devices.Components.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net6.0-windows</TargetFrameworks>
5-
<EnableDynamicLoading>true</EnableDynamicLoading>
6-
<!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
4+
<TargetFrameworks>net6.0;net6.0-windows</TargetFrameworks>
5+
<EnableDynamicLoading>true</EnableDynamicLoading>
76
<RuntimeIdentifiers>win10-x64;linux-x64</RuntimeIdentifiers>
87
</PropertyGroup>
98

0 commit comments

Comments
 (0)