Skip to content

Commit 4649af9

Browse files
committed
(build) test the native binaries, updated azdo/github actions
1 parent 9dd9330 commit 4649af9

File tree

4 files changed

+87
-51
lines changed

4 files changed

+87
-51
lines changed

.azurepipelines/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ steps:
22
- template: common-steps.yml
33
- pwsh: ./build.ps1 -target Pack
44
displayName: '[Cake build & pack]'
5-
- publish: $(System.DefaultWorkingDirectory)
6-
displayName: 'Upload pipeline artifacts'
5+
- publish: $(System.DefaultWorkingDirectory)/artifacts
6+
displayName: 'Upload artifacts folder'
77
condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))
88
artifact: storage
9+
- publish: $(System.DefaultWorkingDirectory)/artifacts/native
10+
displayName: 'Upload native folder'
11+
artifact: storage-$(VM_IMAGE)

.azurepipelines/common-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ steps:
1616
displayName: Cache dotnet locally
1717
- ${{ if eq(parameters.includeArtifacts, true) }}:
1818
- task: DownloadPipelineArtifact@2
19-
displayName: 'Download pipeline artifacts'
19+
displayName: 'Download artifacts folder'
2020
inputs:
2121
source: current
22-
path: $(Build.SourcesDirectory)
22+
path: $(Build.SourcesDirectory)/artifacts
2323
artifact: storage

.azurepipelines/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
parameters:
2+
oses: ['windows', 'ubuntu', 'macos']
13
steps:
24
- template: common-steps.yml
35
parameters:
46
includeArtifacts: true
7+
- ${{ each os in parameters.oses }}:
8+
- task: DownloadPipelineArtifact@2
9+
displayName: 'Download ${{os}} native folder'
10+
inputs:
11+
source: current
12+
path: $(Build.SourcesDirectory)/artifacts/native
13+
artifact: storage-${{os}}-latest
514
- pwsh: ./build.ps1 -target Release
615
displayName: '[Release]'
716
env:

.github/workflows/build.yml

Lines changed: 71 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ jobs:
5050
with:
5151
name: storage
5252
path: ${{ github.workspace }}/artifacts
53-
name: 'Upload Package'
53+
name: 'Upload artifacts folder'
54+
- uses: actions/upload-artifact@v1
55+
with:
56+
name: storage-${{ matrix.os }}
57+
path: ${{ github.workspace }}/artifacts/native
58+
name: 'Upload native folder'
5459

5560
test:
5661
name: Unit Test
@@ -112,6 +117,7 @@ jobs:
112117
path: .dotnet
113118
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
114119
- uses: actions/download-artifact@v1
120+
name: Download artifacts folder
115121
with:
116122
name: storage
117123
path: ${{ github.workspace }}/artifacts
@@ -151,6 +157,7 @@ jobs:
151157
path: .dotnet
152158
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
153159
- uses: actions/download-artifact@v1
160+
name: Download artifacts folder
154161
with:
155162
name: storage
156163
path: ${{ github.workspace }}/artifacts
@@ -174,29 +181,30 @@ jobs:
174181
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
175182
CHOCOLATEY_API_URL: ${{ secrets.CHOCOLATEY_API_URL }}
176183
steps:
177-
- uses: actions/checkout@v2
178-
- name: Fetch all history for all tags and branches
179-
run: |
180-
git fetch --prune --unshallow
181-
- name: Cache tools
182-
id: cache-tools
183-
uses: actions/cache@v1
184-
with:
185-
path: tools
186-
key: ${{ runner.os }}-tools-${{ hashFiles('build.cake') }}
187-
- name: Cache dotnet
188-
id: cache-dotnet
189-
uses: actions/cache@v1
190-
with:
191-
path: .dotnet
192-
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
193-
- uses: actions/download-artifact@v1
194-
with:
195-
name: storage
196-
path: ${{ github.workspace }}/artifacts
197-
- name: '[Publish]'
198-
shell: pwsh
199-
run: ./build.ps1 -target Publish-${{ matrix.taskName }}
184+
- uses: actions/checkout@v2
185+
- name: Fetch all history for all tags and branches
186+
run: |
187+
git fetch --prune --unshallow
188+
- name: Cache tools
189+
id: cache-tools
190+
uses: actions/cache@v1
191+
with:
192+
path: tools
193+
key: ${{ runner.os }}-tools-${{ hashFiles('build.cake') }}
194+
- name: Cache dotnet
195+
id: cache-dotnet
196+
uses: actions/cache@v1
197+
with:
198+
path: .dotnet
199+
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
200+
- uses: actions/download-artifact@v1
201+
name: Download artifacts folder
202+
with:
203+
name: storage
204+
path: ${{ github.workspace }}/artifacts
205+
- name: '[Publish]'
206+
shell: pwsh
207+
run: ./build.ps1 -target Publish-${{ matrix.taskName }}
200208

201209
release:
202210
name: Release
@@ -205,26 +213,42 @@ jobs:
205213
env:
206214
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
207215
steps:
208-
- uses: actions/checkout@v2
209-
- name: Fetch all history for all tags and branches
210-
run: |
211-
git fetch --prune --unshallow
212-
- name: Cache tools
213-
id: cache-tools
214-
uses: actions/cache@v1
215-
with:
216-
path: tools
217-
key: ${{ runner.os }}-tools-${{ hashFiles('build.cake') }}
218-
- name: Cache dotnet
219-
id: cache-dotnet
220-
uses: actions/cache@v1
221-
with:
222-
path: .dotnet
223-
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
224-
- uses: actions/download-artifact@v1
225-
with:
226-
name: storage
227-
path: ${{ github.workspace }}/artifacts
228-
- name: '[Release]'
229-
shell: pwsh
230-
run: ./build.ps1 -target Release
216+
- uses: actions/checkout@v2
217+
- name: Fetch all history for all tags and branches
218+
run: |
219+
git fetch --prune --unshallow
220+
- name: Cache tools
221+
id: cache-tools
222+
uses: actions/cache@v1
223+
with:
224+
path: tools
225+
key: ${{ runner.os }}-tools-${{ hashFiles('build.cake') }}
226+
- name: Cache dotnet
227+
id: cache-dotnet
228+
uses: actions/cache@v1
229+
with:
230+
path: .dotnet
231+
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
232+
- uses: actions/download-artifact@v1
233+
name: Download artifacts folder
234+
with:
235+
name: storage
236+
path: ${{ github.workspace }}/artifacts
237+
- uses: actions/download-artifact@v1
238+
name: Download windows native folder
239+
with:
240+
name: storage-windows-latest
241+
path: ${{ github.workspace }}/artifacts/native
242+
- uses: actions/download-artifact@v1
243+
name: Download linux native folder
244+
with:
245+
name: storage-ubuntu-latest
246+
path: ${{ github.workspace }}/artifacts/native
247+
- uses: actions/download-artifact@v1
248+
name: Download osx native folder
249+
with:
250+
name: storage-macos-latest
251+
path: ${{ github.workspace }}/artifacts/native
252+
- name: '[Release]'
253+
shell: pwsh
254+
run: ./build.ps1 -target Release

0 commit comments

Comments
 (0)