Skip to content

Commit 0577f7f

Browse files
committed
chore: add arm64 build
Add an linux/arm64 build of the inspector. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 10e78ed commit 0577f7f

File tree

6 files changed

+54
-17
lines changed

6 files changed

+54
-17
lines changed

.codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-07-17T16:25:55Z by kres 5128bc1.
3+
# Generated on 2025-08-04T15:07:55Z by kres 5fb5b90.
44

55
codecov:
66
require_ci_to_pass: false
@@ -9,7 +9,7 @@ coverage:
99
status:
1010
project:
1111
default:
12-
target: 0%
12+
target: 50%
1313
threshold: 0.5%
1414
base: auto
1515
if_ci_failed: success

.github/workflows/ci.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-07-21T17:08:13Z by kres b869533-dirty.
3+
# Generated on 2025-08-04T15:14:13Z by kres 5fb5b90.
44

55
concurrency:
66
group: ${{ github.head_ref || github.run_id }}
@@ -85,12 +85,6 @@ jobs:
8585
- name: unit-tests-race
8686
run: |
8787
make unit-tests-race
88-
- name: coverage
89-
uses: codecov/codecov-action@v5
90-
with:
91-
files: _out/coverage-unit-tests.txt
92-
token: ${{ secrets.CODECOV_TOKEN }}
93-
timeout-minutes: 3
9488
- name: omni-inspector
9589
run: |
9690
make omni-inspector
@@ -110,12 +104,14 @@ jobs:
110104
- name: push-omni-inspector
111105
if: github.event_name != 'pull_request'
112106
env:
107+
PLATFORM: linux/amd64,linux/arm64
113108
PUSH: "true"
114109
run: |
115110
make image-omni-inspector
116111
- name: push-omni-inspector-latest
117112
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
118113
env:
114+
PLATFORM: linux/amd64,linux/arm64
119115
PUSH: "true"
120116
run: |
121117
make image-omni-inspector IMAGE_TAG=latest

.github/workflows/slack-notify.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-07-21T17:08:13Z by kres b869533-dirty.
3+
# Generated on 2025-08-04T15:07:55Z by kres 5fb5b90.
44

55
"on":
66
workflow_run:
@@ -29,11 +29,13 @@ jobs:
2929
method: chat.postMessage
3030
payload: |
3131
{
32-
"channel": "proj-talos-maintainers",
32+
"channel": "ci-all",
33+
"text": "${{ github.event.workflow_run.conclusion }} - ${{ github.repository }}",
34+
"icon_emoji": "${{ github.event.workflow_run.conclusion == 'success' && ':white_check_mark:' || github.event.workflow_run.conclusion == 'failure' && ':x:' || ':warning:' }}",
35+
"username": "GitHub Actions",
3336
"attachments": [
3437
{
3538
"color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}",
36-
"fallback": "test",
3739
"blocks": [
3840
{
3941
"type": "section",
@@ -89,4 +91,4 @@ jobs:
8991
}
9092
]
9193
}
92-
token: ${{ secrets.SLACK_BOT_TOKEN }}
94+
token: ${{ secrets.SLACK_BOT_TOKEN_V2 }}

.kres.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,23 @@ spec:
2222
- source: https://raw.githubusercontent.com/siderolabs/omni/b0f76343100033927a40ea0e604d5be8a84b3592/client/api/omni/resources/resources.proto
2323
subdirectory: resources
2424
genGateway: true
25+
---
26+
kind: common.Image
27+
name: image-omni-inspector
28+
spec:
29+
extraEnvironment:
30+
PLATFORM: linux/amd64,linux/arm64
31+
---
32+
kind: golang.Build
33+
spec:
34+
outputs:
35+
linux-amd64:
36+
GOOS: linux
37+
GOARCH: amd64
38+
linux-arm64:
39+
GOOS: linux
40+
GOARCH: arm64
41+
---
42+
kind: service.CodeCov
43+
spec:
44+
enabled: false

Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2025-07-21T18:32:55Z by kres b869533-dirty.
5+
# Generated on 2025-08-04T15:09:58Z by kres 5fb5b90.
66

77
ARG JS_TOOLCHAIN
88
ARG TOOLCHAIN
@@ -148,7 +148,15 @@ COPY --from=generate / /
148148
WORKDIR /src/cmd/omni-inspector
149149
ARG GO_BUILDFLAGS
150150
ARG GO_LDFLAGS
151-
RUN --mount=type=cache,target=/root/.cache/go-build,id=omni-inspector/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=omni-inspector/go/pkg go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /omni-inspector-linux-amd64
151+
RUN --mount=type=cache,target=/root/.cache/go-build,id=omni-inspector/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=omni-inspector/go/pkg GOARCH=amd64 GOOS=linux go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /omni-inspector-linux-amd64
152+
153+
# builds omni-inspector-linux-arm64
154+
FROM base AS omni-inspector-linux-arm64-build
155+
COPY --from=generate / /
156+
WORKDIR /src/cmd/omni-inspector
157+
ARG GO_BUILDFLAGS
158+
ARG GO_LDFLAGS
159+
RUN --mount=type=cache,target=/root/.cache/go-build,id=omni-inspector/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=omni-inspector/go/pkg GOARCH=arm64 GOOS=linux go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /omni-inspector-linux-arm64
152160

153161
# runs unit-tests with race detector
154162
FROM base AS unit-tests-race
@@ -165,13 +173,17 @@ RUN --mount=type=cache,target=/root/.cache/go-build,id=omni-inspector/root/.cach
165173
FROM scratch AS omni-inspector-linux-amd64
166174
COPY --from=omni-inspector-linux-amd64-build /omni-inspector-linux-amd64 /omni-inspector-linux-amd64
167175

176+
FROM scratch AS omni-inspector-linux-arm64
177+
COPY --from=omni-inspector-linux-arm64-build /omni-inspector-linux-arm64 /omni-inspector-linux-arm64
178+
168179
FROM scratch AS unit-tests
169180
COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt
170181

171182
FROM omni-inspector-linux-${TARGETARCH} AS omni-inspector
172183

173184
FROM scratch AS omni-inspector-all
174185
COPY --from=omni-inspector-linux-amd64 / /
186+
COPY --from=omni-inspector-linux-arm64 / /
175187

176188
FROM scratch AS image-omni-inspector
177189
ARG TARGETARCH

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-07-21T17:08:13Z by kres b869533-dirty.
3+
# Generated on 2025-08-04T15:09:58Z by kres 5fb5b90.
44

55
# common variables
66

@@ -226,8 +226,15 @@ $(ARTIFACTS)/omni-inspector-linux-amd64:
226226
.PHONY: omni-inspector-linux-amd64
227227
omni-inspector-linux-amd64: $(ARTIFACTS)/omni-inspector-linux-amd64 ## Builds executable for omni-inspector-linux-amd64.
228228

229+
.PHONY: $(ARTIFACTS)/omni-inspector-linux-arm64
230+
$(ARTIFACTS)/omni-inspector-linux-arm64:
231+
@$(MAKE) local-omni-inspector-linux-arm64 DEST=$(ARTIFACTS)
232+
233+
.PHONY: omni-inspector-linux-arm64
234+
omni-inspector-linux-arm64: $(ARTIFACTS)/omni-inspector-linux-arm64 ## Builds executable for omni-inspector-linux-arm64.
235+
229236
.PHONY: omni-inspector
230-
omni-inspector: omni-inspector-linux-amd64 ## Builds executables for omni-inspector.
237+
omni-inspector: omni-inspector-linux-amd64 omni-inspector-linux-arm64 ## Builds executables for omni-inspector.
231238

232239
.PHONY: lint-markdown
233240
lint-markdown: ## Runs markdownlint.

0 commit comments

Comments
 (0)