-
Notifications
You must be signed in to change notification settings - Fork 10
181 lines (174 loc) · 6.35 KB
/
Copy patharm-linux.yml
File metadata and controls
181 lines (174 loc) · 6.35 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: arm-linux
on:
# Workflow dispatched manually
workflow_dispatch:
# Workflow runs automatically after `arm-windows`
workflow_run:
workflows: [ "arm-windows" ]
types: [ completed ]
permissions:
contents: read
packages: write
jobs:
# The -minimal image can be fetched faster for simple tasks
arm-minimal:
strategy:
matrix:
target: [ arm ]
cfg:
- { version: 9.70.4, lmsc-version: 1.11, lmsc-tag: 123 }
- { version: 9.70.2, lmsc-version: 1.11, lmsc-tag: 123 }
- { version: 9.70.1, lmsc-version: 1.11, lmsc-tag: 123 }
- { version: 9.60.4, lmsc-version: 1.11, lmsc-tag: 123 }
fail-fast: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@main
- if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
file: ./.github/workflows/linux/Dockerfile-${{ matrix.target }}.minimal
build-args: |
TARGET=${{ matrix.target }}
VERSION=${{ matrix.cfg.version }}
LMSC_VERSION=${{ matrix.cfg.lmsc-version }}
LMSC_TAG=${{ matrix.cfg.lmsc-tag }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}:${{ matrix.cfg.version }}-linux-minimal
# Generate the -base image with the IAR Build tools for Arm.
# It includes: -minimal, `cspybat`, `iarbuild` and `cstat`.
# It does not include: vendor-specific device support
arm-base:
needs: [ arm-minimal ]
strategy:
matrix:
target: [ arm ]
version: [ 9.70.4, 9.70.2, 9.70.1, 9.60.4 ]
fail-fast: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@main
- if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
file: ./.github/workflows/linux/Dockerfile-${{ matrix.target }}.base
build-args: |
TARGET=${{ matrix.target }}
VERSION=${{ matrix.version }}
REGISTRY_REPO=ghcr.io/${{ github.repository_owner }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}:${{ matrix.version }}-linux-base
# Generate variant images with the IAR Build Tools for Arm
# *including* vendor-specific device support
arm-device:
needs: [ arm-base ]
strategy:
matrix:
target: [ arm ]
cfg:
- { version: 9.70.4, timestamp: 20260226111516 }
- { version: 9.70.2, timestamp: 20251103173334 }
- { version: 9.70.1, timestamp: 20250625133953 }
- { version: 9.60.4, timestamp: 20250303090915 }
variant:
- additional
- microchip
- renesas
- nxp
- infineon
- st
- ti
fail-fast: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@main
- if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
file: ./.github/workflows/linux/Dockerfile-${{ matrix.target }}.device
build-args: |
TARGET=${{ matrix.target }}
VERSION=${{ matrix.cfg.version }}
VARIANT=${{ matrix.variant }}
TIMESTAMP=${{ matrix.cfg.timestamp }}
REGISTRY_REPO=ghcr.io/${{ github.repository_owner }}
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}:${{ matrix.cfg.version }}-linux-${{ matrix.variant }}
# Regenerate the Docker manifest so that we get the multi-arch image
arm-multi-arch:
needs: [ arm-device ]
strategy:
matrix:
target: [ arm ]
version: [ 9.70.4, 9.70.2, 9.70.1, 9.60.4 ]
registry-repo: [ "ghcr.io/${{ github.repository_owner }}" ]
variant:
- minimal
- base
- additional
- microchip
- renesas
- nxp
- infineon
- st
- ti
fail-fast: false
runs-on: ubuntu-24.04
steps:
- if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
docker manifest create ${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.version }}-${{ matrix.variant }} \
${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.version }}-linux-${{ matrix.variant }} \
${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.version }}-windows-2022-${{ matrix.variant }} \
${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.version }}-windows-2025-${{ matrix.variant }}
- name: Push the manifest
run: |
docker manifest push ${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.version }}-${{ matrix.variant }}
# Finalize manifest
arm-manifest-finalize:
needs: [ arm-multi-arch ]
strategy:
matrix:
target: [ arm ]
latest: [ 9.70.4 ]
registry-repo: [ "ghcr.io/${{ github.repository_owner }}" ]
fail-fast: false
runs-on: ubuntu-24.04
steps:
- if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Regenerate manifest for latest
run: |
docker manifest create ${{ matrix.registry-repo }}/${{ matrix.target }}:latest \
${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.latest }}-linux-base \
${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.latest }}-windows-2022-base \
${{ matrix.registry-repo }}/${{ matrix.target }}:${{ matrix.latest }}-windows-2025-base
- name: Push the manifest
run: |
docker manifest push ${{ matrix.registry-repo }}/${{ matrix.target }}:latest