Skip to content

Commit f1cb91c

Browse files
Simplify build workflow to single Windows job
Removed separate Linux build and artifact combination steps. The build process now runs entirely on Windows, producing the complete library and associated artifacts, streamlining the workflow and reducing complexity.
1 parent 98bdcd7 commit f1cb91c

File tree

1 file changed

+7
-69
lines changed

1 file changed

+7
-69
lines changed

.github/workflows/build-release.yml

Lines changed: 7 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,8 @@ jobs:
4848
name: appveyor-repo
4949
path: appveyor-lab
5050

51-
# Linux build job - builds core/lib components
52-
linux-build:
53-
runs-on: ubuntu-latest
54-
needs: setup-dependencies
55-
steps:
56-
- uses: actions/checkout@v4
57-
58-
- name: Setup .NET
59-
uses: actions/setup-dotnet@v4
60-
with:
61-
dotnet-version: |
62-
8.0.x
63-
6.0.x
64-
65-
- name: Build core/lib
66-
shell: pwsh
67-
run: ./build/build.ps1 -CoreOnly
68-
69-
- name: Upload Linux artifacts
70-
uses: actions/upload-artifact@v4
71-
with:
72-
name: core-lib-linux
73-
path: artifacts/dbatools.library/core/lib/
74-
75-
# Windows build job - builds desktop/framework components (runs in parallel with Linux)
76-
windows-build:
51+
# Windows build job - builds complete library with all components
52+
build-library:
7753
runs-on: windows-latest
7854
needs: setup-dependencies
7955
steps:
@@ -91,46 +67,13 @@ jobs:
9167
shell: pwsh
9268
run: choco install netfx-4.7.2-devpack -y --no-progress
9369

94-
- name: Build library (Windows components only)
70+
- name: Build complete library
9571
shell: pwsh
9672
run: .\build\build.ps1 -BuildZip
9773

98-
- name: Upload Windows build artifacts
99-
uses: actions/upload-artifact@v4
100-
with:
101-
name: dbatools-library-windows
102-
path: artifacts/dbatools.library/
103-
104-
# Combine artifacts job - merges Linux and Windows builds
105-
combine-artifacts:
106-
runs-on: ubuntu-latest
107-
needs: [linux-build, windows-build]
108-
steps:
109-
- name: Download Linux artifacts
110-
uses: actions/download-artifact@v4
111-
with:
112-
name: core-lib-linux
113-
path: linux-artifacts/
114-
115-
- name: Download Windows artifacts
116-
uses: actions/download-artifact@v4
117-
with:
118-
name: dbatools-library-windows
119-
path: windows-artifacts/
120-
121-
- name: Merge artifacts
74+
- name: Make sqlpackage executable
12275
shell: pwsh
12376
run: |
124-
# Create final structure
125-
New-Item -ItemType Directory -Path ./artifacts/dbatools.library/core/lib -Force | Out-Null
126-
127-
# Copy Windows build (base structure)
128-
Copy-Item -Path "windows-artifacts/*" -Destination "./artifacts/" -Recurse -Force
129-
130-
# Overlay Linux core/lib components
131-
Copy-Item -Path "linux-artifacts/*" -Destination "./artifacts/dbatools.library/core/lib/" -Recurse -Force
132-
133-
# Make sqlpackage executable
13477
chmod +x ./artifacts/dbatools.library/core/lib/dac/linux/sqlpackage || true
13578
chmod +x ./artifacts/dbatools.library/core/lib/dac/mac/sqlpackage || true
13679
@@ -168,12 +111,7 @@ jobs:
168111
}
169112
Write-Host "All critical paths verified!" -ForegroundColor Green
170113
171-
- name: Create release zip
172-
shell: pwsh
173-
run: |
174-
Compress-Archive -Path "./artifacts/dbatools.library" -DestinationPath "./dbatools.library.zip" -Force
175-
176-
- name: Upload combined library artifact
114+
- name: Upload library artifact
177115
uses: actions/upload-artifact@v4
178116
with:
179117
name: dbatools-library
@@ -183,13 +121,13 @@ jobs:
183121
uses: actions/upload-artifact@v4
184122
with:
185123
name: dbatools-library-zip
186-
path: dbatools.library.zip
124+
path: artifacts/dbatools.library.zip
187125

188126
# Test matrix - tests on all platforms with proper dependencies and environment
189127
test-matrix:
190128
name: Test on ${{ matrix.os }}
191129
runs-on: ${{ matrix.os }}
192-
needs: combine-artifacts
130+
needs: build-library
193131
strategy:
194132
fail-fast: false
195133
matrix:

0 commit comments

Comments
 (0)