-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable arm64 conform image. Signed-off-by: Noel Georgi <[email protected]>
- Loading branch information
Showing
10 changed files
with
213 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-02-15T11:12:36Z by kres latest. | ||
# Generated on 2024-10-10T13:04:30Z by kres 34e72ac. | ||
|
||
name: default | ||
concurrency: | ||
|
@@ -29,27 +29,44 @@ jobs: | |
- self-hosted | ||
- generic | ||
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) | ||
services: | ||
buildkitd: | ||
image: moby/buildkit:v0.12.5 | ||
options: --privileged | ||
ports: | ||
- 1234:1234 | ||
volumes: | ||
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit | ||
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml | ||
steps: | ||
- name: gather-system-info | ||
id: system-info | ||
uses: kenchan0130/[email protected] | ||
continue-on-error: true | ||
- name: print-system-info | ||
run: | | ||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) | ||
OUTPUTS=( | ||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}" | ||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}" | ||
"Hostname: ${{ steps.system-info.outputs.hostname }}" | ||
"NodeName: ${NODE_NAME}" | ||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}" | ||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}" | ||
"Name: ${{ steps.system-info.outputs.name }}" | ||
"Platform: ${{ steps.system-info.outputs.platform }}" | ||
"Release: ${{ steps.system-info.outputs.release }}" | ||
"Total memory: ${MEMORY_GB} GB" | ||
) | ||
for OUTPUT in "${OUTPUTS[@]}";do | ||
echo "${OUTPUT}" | ||
done | ||
continue-on-error: true | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
- name: Set up Docker Buildx | ||
id: setup-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: remote | ||
endpoint: tcp://localhost:1234 | ||
timeout-minutes: 1 | ||
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 | ||
timeout-minutes: 10 | ||
- name: base | ||
run: | | ||
make base | ||
|
@@ -60,8 +77,11 @@ jobs: | |
run: | | ||
make unit-tests-race | ||
- name: coverage | ||
run: | | ||
make coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: _out/coverage-unit-tests.txt | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
timeout-minutes: 3 | ||
- name: conform | ||
run: | | ||
make conform | ||
|
@@ -81,20 +101,23 @@ jobs: | |
- name: push-conform | ||
if: github.event_name != 'pull_request' | ||
env: | ||
PLATFORM: linux/amd64,linux/arm64 | ||
PUSH: "true" | ||
run: | | ||
make image-conform | ||
- name: push-conform-latest | ||
if: github.event_name != 'pull_request' | ||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | ||
env: | ||
PLATFORM: linux/amd64,linux/arm64 | ||
PUSH: "true" | ||
run: | | ||
make image-conform TAG=latest | ||
make image-conform IMAGE_TAG=latest | ||
- name: Generate Checksums | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
sha256sum _out/conform-* > _out/sha256sum.txt | ||
sha512sum _out/conform-* > _out/sha512sum.txt | ||
cd _out | ||
sha256sum conform-* > sha256sum.txt | ||
sha512sum conform-* > sha512sum.txt | ||
- name: release-notes | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
# syntax = docker/dockerfile-upstream:1.6.0-labs | ||
# syntax = docker/dockerfile-upstream:1.10.0-labs | ||
|
||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-03-01T05:36:30Z by kres latest. | ||
# Generated on 2024-10-10T13:02:45Z by kres 34e72ac. | ||
|
||
ARG TOOLCHAIN | ||
|
||
FROM ghcr.io/siderolabs/ca-certificates:v1.6.0 AS image-ca-certificates | ||
FROM ghcr.io/siderolabs/ca-certificates:v1.8.0 AS image-ca-certificates | ||
|
||
FROM ghcr.io/siderolabs/fhs:v1.6.0 AS image-fhs | ||
FROM ghcr.io/siderolabs/fhs:v1.8.0 AS image-fhs | ||
|
||
# runs markdownlint | ||
FROM docker.io/node:21.6.2-alpine3.19 AS lint-markdown | ||
FROM docker.io/oven/bun:1.1.29-alpine AS lint-markdown | ||
WORKDIR /src | ||
RUN npm i -g [email protected] | ||
RUN npm i [email protected] | ||
RUN bun i [email protected] [email protected] | ||
COPY .markdownlint.json . | ||
COPY ./CHANGELOG.md ./CHANGELOG.md | ||
COPY ./README.md ./README.md | ||
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . | ||
RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . | ||
|
||
# base toolchain image | ||
FROM ${TOOLCHAIN} AS toolchain | ||
FROM --platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain | ||
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev git | ||
|
||
# build tools | ||
FROM --platform=${BUILDPLATFORM} toolchain AS tools | ||
ENV GO111MODULE on | ||
ENV GO111MODULE=on | ||
ARG CGO_ENABLED | ||
ENV CGO_ENABLED ${CGO_ENABLED} | ||
ENV CGO_ENABLED=${CGO_ENABLED} | ||
ARG GOTOOLCHAIN | ||
ENV GOTOOLCHAIN ${GOTOOLCHAIN} | ||
ENV GOTOOLCHAIN=${GOTOOLCHAIN} | ||
ARG GOEXPERIMENT | ||
ENV GOEXPERIMENT ${GOEXPERIMENT} | ||
ENV GOPATH /go | ||
ENV GOEXPERIMENT=${GOEXPERIMENT} | ||
ENV GOPATH=/go | ||
ARG DEEPCOPY_VERSION | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \ | ||
&& mv /go/bin/deep-copy /bin/deep-copy | ||
|
@@ -42,9 +41,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g | |
&& mv /go/bin/golangci-lint /bin/golangci-lint | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \ | ||
&& mv /go/bin/govulncheck /bin/govulncheck | ||
ARG GOIMPORTS_VERSION | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \ | ||
&& mv /go/bin/goimports /bin/goimports | ||
ARG GOFUMPT_VERSION | ||
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \ | ||
&& mv /go/bin/gofumpt /bin/gofumpt | ||
|
@@ -73,15 +69,12 @@ RUN mkdir -p internal/version/data && \ | |
FROM base AS lint-gofumpt | ||
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1) | ||
|
||
# runs goimports | ||
FROM base AS lint-goimports | ||
RUN FILES="$(goimports -l -local github.com/siderolabs/conform/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/conform/ .':\n${FILES}"; exit 1) | ||
|
||
# runs golangci-lint | ||
FROM base AS lint-golangci-lint | ||
WORKDIR /src | ||
COPY .golangci.yml . | ||
ENV GOGC 50 | ||
ENV GOGC=50 | ||
RUN golangci-lint config verify --config .golangci.yml | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml | ||
|
||
# runs govulncheck | ||
|
@@ -187,6 +180,6 @@ ARG TARGETARCH | |
COPY --from=conform conform-linux-${TARGETARCH} /conform | ||
COPY --from=image-fhs / / | ||
COPY --from=image-ca-certificates / / | ||
LABEL org.opencontainers.image.source https://github.com/siderolabs/conform | ||
LABEL org.opencontainers.image.source=https://github.com/siderolabs/conform | ||
ENTRYPOINT ["/conform"] | ||
|
Oops, something went wrong.