Skip to content

Commit 9b1e1fb

Browse files
authored
Merge pull request #3854 from arturcic/feature/arm64
update the workflows to test the artifacts and docker images on arm64 runners
2 parents 1cc6bf4 + 8b7bbdc commit 9b1e1fb

File tree

11 files changed

+99
-83
lines changed

11 files changed

+99
-83
lines changed

.github/actions/docker-manifests/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: 'Docker Manifests'
22
description: 'Docker Publish Manifests'
33
inputs:
4-
dockerDistro:
4+
docker_distro:
55
description: 'Linux Distro'
66
required: true
7-
dotnetVersion:
7+
dotnet_version:
88
description: '.net version'
99
required: true
1010
docker_registry_username:
@@ -32,7 +32,10 @@ runs:
3232
-
3333
name: '[Docker Publish Manifests] DockerHub'
3434
shell: pwsh
35-
run: dotnet run/docker.dll --target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub
35+
run: |
36+
dotnet run/docker.dll `
37+
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} `
38+
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub
3639
-
3740
name: Login to GitHub
3841
uses: docker/login-action@v3
@@ -43,4 +46,7 @@ runs:
4346
-
4447
name: '[Docker Publish Manifests] GitHub'
4548
shell: pwsh
46-
run: dotnet run/docker.dll --target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry github
49+
run: |
50+
dotnet run/docker.dll `
51+
--target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} `
52+
--docker_distro=${{ inputs.docker_distro }} --docker_registry github

.github/actions/docker-publish/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ inputs:
44
arch:
55
description: 'Docker architecture'
66
required: true
7-
dockerDistro:
7+
docker_distro:
88
description: 'Linux Distro'
99
required: true
10-
dotnetVersion:
10+
dotnet_version:
1111
description: '.net version'
1212
required: true
1313
docker_registry_username:
@@ -35,7 +35,10 @@ runs:
3535
-
3636
name: '[Docker Publish] DockerHub'
3737
shell: pwsh
38-
run: dotnet run/docker.dll --target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub --verbosity=diagnostic
38+
run: |
39+
dotnet run/docker.dll `
40+
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
41+
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
3942
-
4043
name: Login to GitHub
4144
uses: docker/login-action@v3
@@ -46,4 +49,7 @@ runs:
4649
-
4750
name: '[Docker Publish] GitHub'
4851
shell: pwsh
49-
run: dotnet run/docker.dll --target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry github --verbosity=diagnostic
52+
run: |
53+
dotnet run/docker.dll `
54+
--target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
55+
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Docker Setup'
2+
description: 'Setups the docker engine'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Set up Docker
8+
uses: docker/setup-docker-action@v4
9+
with:
10+
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
11+
- name: Setup Docker Buildx
12+
uses: docker/setup-buildx-action@v3
13+
with:
14+
version: 'latest'
15+
driver-opts: 'image=moby/buildkit:buildx-stable-1'
16+
install: true

.github/actions/docker-test/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ inputs:
44
arch:
55
description: 'Docker architecture'
66
default: 'amd64'
7-
dockerDistro:
7+
docker_distro:
88
description: 'Linux Distro'
99
default: 'debian.12'
10-
dotnetVersion:
10+
dotnet_version:
1111
description: '.net version'
1212
default: '8.0'
1313

@@ -17,8 +17,14 @@ runs:
1717
-
1818
name: '[Docker Build & Test] DockerHub'
1919
shell: pwsh
20-
run: dotnet run/docker.dll --target=DockerTest --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub --verbosity=diagnostic
20+
run: |
21+
dotnet run/docker.dll --target=DockerTest `
22+
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
23+
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
2124
-
2225
name: '[Docker Build & Test] GitHub'
2326
shell: pwsh
24-
run: dotnet run/docker.dll --target=DockerTest --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry github --verbosity=diagnostic
27+
run: |
28+
dotnet run/docker.dll --target=DockerTest `
29+
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
30+
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic

.github/workflows/_artifacts_linux.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
arch:
88
required: true
99
type: string
10-
dockerDistros:
10+
docker_distros:
1111
required: true
1212
type: string
13-
dotnetVersions:
13+
dotnet_versions:
1414
required: true
1515
type: string
1616
env:
@@ -19,13 +19,13 @@ env:
1919

2020
jobs:
2121
artifacts:
22-
name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }}
22+
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
2323
runs-on: ${{ inputs.runner }}
2424
strategy:
2525
fail-fast: false
26-
matrix:
27-
dockerDistro: ${{ fromJson(inputs.dockerDistros) }}
28-
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
26+
matrix:
27+
docker_distro: ${{ fromJson(inputs.docker_distros) }}
28+
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
2929
steps:
3030
-
3131
name: Checkout
@@ -47,7 +47,13 @@ jobs:
4747
with:
4848
name: native-Linux
4949
path: ${{ github.workspace }}/artifacts/packages/native
50+
-
51+
name: Set up Docker
52+
uses: ./.github/actions/docker-setup
5053
-
5154
name: '[Test Artifacts]'
5255
shell: pwsh
53-
run: dotnet run/artifacts.dll --target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnetVersion }} --docker_distro=${{ matrix.dockerDistro }}
56+
run: |
57+
dotnet run/artifacts.dll `
58+
--target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnet_version }} `
59+
--docker_distro=${{ matrix.docker_distro }}

.github/workflows/_docker.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
arch:
88
required: true
99
type: string
10-
dockerDistros:
10+
docker_distros:
1111
required: true
1212
type: string
13-
dotnetVersions:
13+
dotnet_versions:
1414
required: true
1515
type: string
1616
env:
@@ -19,13 +19,13 @@ env:
1919

2020
jobs:
2121
docker:
22-
name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }}
22+
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
2323
runs-on: ${{ inputs.runner }}
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
dockerDistro: ${{ fromJson(inputs.dockerDistros) }}
28-
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
27+
docker_distro: ${{ fromJson(inputs.docker_distros) }}
28+
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
2929
steps:
3030
-
3131
name: Checkout
@@ -43,35 +43,23 @@ jobs:
4343
path: ${{ github.workspace }}/artifacts/packages/nuget
4444
-
4545
name: Set up Docker
46-
uses: docker/setup-docker-action@v4
47-
with:
48-
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
49-
-
50-
name: Setup QEMU
51-
uses: docker/setup-qemu-action@v3
52-
-
53-
name: Setup Docker Buildx
54-
uses: docker/setup-buildx-action@v3
55-
with:
56-
version: 'latest'
57-
driver-opts: 'image=moby/buildkit:buildx-stable-1'
58-
install: true
46+
uses: ./.github/actions/docker-setup
5947
-
6048
name: Docker Test
6149
if: success() && github.event_name == 'pull_request' || github.repository_owner != 'GitTools'
6250
uses: ./.github/actions/docker-test
6351
with:
6452
arch: ${{ inputs.arch }}
65-
dockerDistro: ${{ matrix.dockerDistro }}
66-
dotnetVersion: ${{ matrix.dotnetVersion }}
53+
docker_distro: ${{ matrix.docker_distro }}
54+
dotnet_version: ${{ matrix.dotnet_version }}
6755
-
6856
name: Docker Publish
6957
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main'
7058
uses: ./.github/actions/docker-publish
7159
with:
7260
arch: ${{ inputs.arch }}
73-
dockerDistro: ${{ matrix.dockerDistro }}
74-
dotnetVersion: ${{ matrix.dotnetVersion }}
61+
docker_distro: ${{ matrix.docker_distro }}
62+
dotnet_version: ${{ matrix.dotnet_version }}
7563
docker_registry_username: ${{ secrets.DOCKER_USERNAME }}
7664
docker_registry_password: ${{ secrets.DOCKER_PASSWORD }}
7765
github_registry_username: ${{ github.repository_owner }}

.github/workflows/_docker_manifests.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
on:
22
workflow_call:
33
inputs:
4-
dockerDistros:
4+
docker_distros:
55
required: true
66
type: string
7-
dotnetVersions:
7+
dotnet_versions:
88
required: true
99
type: string
1010
env:
@@ -13,13 +13,13 @@ env:
1313

1414
jobs:
1515
manifest:
16-
name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }}
16+
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
1717
runs-on: ubuntu-24.04
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
dockerDistro: ${{ fromJson(inputs.dockerDistros) }}
22-
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
21+
docker_distro: ${{ fromJson(inputs.docker_distros) }}
22+
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
2323
steps:
2424
-
2525
name: Checkout
@@ -31,26 +31,14 @@ jobs:
3131
uses: ./.github/actions/cache-restore
3232
-
3333
name: Set up Docker
34-
uses: docker/setup-docker-action@v4
35-
with:
36-
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
37-
-
38-
name: Setup QEMU
39-
uses: docker/setup-qemu-action@v3
40-
-
41-
name: Setup Docker Buildx
42-
uses: docker/setup-buildx-action@v3
43-
with:
44-
version: 'latest'
45-
driver-opts: 'image=moby/buildkit:buildx-stable-1'
46-
install: true
34+
uses: ./.github/actions/docker-setup
4735
-
4836
name: Docker Manifests
4937
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main'
5038
uses: ./.github/actions/docker-manifests
5139
with:
52-
dockerDistro: ${{ matrix.dockerDistro }}
53-
dotnetVersion: ${{ matrix.dotnetVersion }}
40+
docker_distro: ${{ matrix.docker_distro }}
41+
dotnet_version: ${{ matrix.dotnet_version }}
5442
docker_registry_username: ${{ secrets.DOCKER_USERNAME }}
5543
docker_registry_password: ${{ secrets.DOCKER_PASSWORD }}
5644
github_registry_username: ${{ github.repository_owner }}

.github/workflows/_prepare.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
on:
22
workflow_call:
33
outputs:
4-
dockerDistros:
4+
docker_distros:
55
description: 'List of Docker distros'
6-
value: ${{ jobs.set_matrix.outputs.dockerDistros }}
7-
dotnetVersions:
6+
value: ${{ jobs.set_matrix.outputs.docker_distros }}
7+
dotnet_versions:
88
description: 'List of .NET versions'
9-
value: ${{ jobs.set_matrix.outputs.dotnetVersions }}
9+
value: ${{ jobs.set_matrix.outputs.dotnet_versions }}
1010
jobs:
1111
prepare:
1212
name: ${{ matrix.os }}
@@ -51,8 +51,8 @@ jobs:
5151
name: Set Matrix
5252
runs-on: ubuntu-24.04
5353
outputs:
54-
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
55-
dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }}
54+
docker_distros: ${{ steps.set_matrix.outputs.docker_distros }}
55+
dotnet_versions: ${{ steps.set_matrix.outputs.dotnet_versions }}
5656
steps:
5757
-
5858
name: Checkout

.github/workflows/_unit_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
workflow_call:
33
inputs:
4-
dotnetVersions:
4+
dotnet_versions:
55
required: true
66
type: string
77
env:
@@ -10,14 +10,14 @@ env:
1010

1111
jobs:
1212
unit_test:
13-
name: ${{ matrix.os }} - net${{ matrix.dotnetVersion }}
13+
name: ${{ matrix.os }} - net${{ matrix.dotnet_version }}
1414
env:
1515
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1616
strategy:
1717
fail-fast: false
1818
matrix:
1919
os: [windows-2025, ubuntu-24.04, macos-15]
20-
dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }}
20+
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
2121

2222
runs-on: ${{ matrix.os }}
2323
steps:
@@ -32,11 +32,11 @@ jobs:
3232
-
3333
name: '[Unit Test]'
3434
shell: pwsh
35-
run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnetVersion }}
35+
run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}
3636

3737
-
3838
name: Test Summary
3939
uses: test-summary/[email protected]
40-
if: matrix.dotnetVersion == '9.0'
40+
if: matrix.dotnet_version == '9.0'
4141
with:
4242
paths: artifacts/test-results/*.results.xml

0 commit comments

Comments
 (0)