forked from GitTools/GitVersion
-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (84 loc) · 3.06 KB
/
Copy path_artifacts_linux.yml
File metadata and controls
94 lines (84 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
on:
workflow_call:
inputs:
runner:
required: true
type: string
arch:
required: true
type: string
docker_distros:
required: true
type: string
dotnet_versions:
required: true
type: string
env:
DOTNET_INSTALL_DIR: "./.dotnet"
DOTNET_ROLL_FORWARD: "Major"
jobs:
artifacts:
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
runs-on: ${{ inputs.runner }}
strategy:
fail-fast: false
matrix:
docker_distro: ${{ fromJson(inputs.docker_distros) }}
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Restore State
uses: $/.github/actions/cache-restore # NOSONAR -- $/ resolves to the running commit.
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
name: Download nuget packages
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
name: Download native packages
with:
name: native-Linux
path: ${{ github.workspace }}/artifacts/packages/native
- name: Set up Docker
uses: $/.github/actions/docker-setup # NOSONAR -- $/ resolves to the running commit.
# Run both backends concurrently in the same job (GitHub Actions parallel steps).
# Each ArtifactsTest sub-test runs in ephemeral --rm containers, so the runs are independent.
- name: '[Test Artifacts] (libgit2)'
background: true
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
env:
GITVERSION_GIT_BACKEND: libgit2
with:
shell: pwsh
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: |
dotnet run/artifacts.dll `
--target=ArtifactsTest --arch=${{ inputs.arch }} `
--dotnet_version=${{ matrix.dotnet_version }} `
--docker_distro=${{ matrix.docker_distro }}
- name: '[Test Artifacts] (managed)'
background: true
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
env:
GITVERSION_GIT_BACKEND: managed
with:
shell: pwsh
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: |
dotnet run/artifacts.dll `
--target=ArtifactsTest --arch=${{ inputs.arch }} `
--dotnet_version=${{ matrix.dotnet_version }} `
--docker_distro=${{ matrix.docker_distro }}
- name: Wait for artifact backend tests
wait-all: