Compare commits

...
Author SHA1 Message Date
Cédric Verstraeten 20b6226ba3 Update Darwin build job to use macOS 13 for consistency 2025-09-12 11:24:02 +00:00
Cédric Verstraeten aba07a4527 Update Darwin build job to use macOS 13 xlarge for improved performance 2025-09-12 11:23:20 +00:00
Cédric Verstraeten 8a6b2da968 Replace manual Docker installation steps with setup action in Darwin build job 2025-09-12 11:21:50 +00:00
Cédric Verstraeten 8240d7b9b0 Fix Docker machine creation command in Darwin build job 2025-09-12 11:19:52 +00:00
Cédric Verstraeten 36a234976f Update Darwin build job to run on macOS latest and configure Docker machine 2025-09-12 11:18:29 +00:00
Cédric Verstraeten 502c892e33 Remove Docker Buildx setup step from Darwin build job 2025-09-12 11:15:09 +00:00
Cédric Verstraeten 722b94d88f Update Darwin build job to run on macOS 26 and install Docker 2025-09-12 11:12:21 +00:00
Cédric Verstraeten 69be9eabeb Fix Darwin build job to run on macOS 15 instead of macOS 26 2025-09-12 11:08:26 +00:00
Cédric Verstraeten af69d46c95 Update Darwin build job to run on macOS and remove obsolete GOOS argument 2025-09-12 11:07:22 +00:00
Cédric Verstraeten c114b3da5b Add GOOS argument to Dockerfiles for build environment configuration 2025-09-12 12:33:11 +02:00
Cédric Verstraeten e715575f20 Refactor PR build workflow to target arm64 for Darwin binaries and remove obsolete cross-compilation Dockerfiles 2025-09-12 12:23:00 +02:00
Cédric Verstraeten b4cf49d4be Add build process for Darwin binaries in PR workflow 2025-09-12 12:18:22 +02:00
Cédric Verstraeten d41c45ba59 Add support for cross-compilation in Docker workflows and create Darwin binary 2025-09-12 12:15:10 +02:00
4 changed files with 73 additions and 2 deletions
+31 -2
View File
@@ -54,7 +54,7 @@ jobs:
with: with:
name: agent-${{matrix.architecture}}.tar name: agent-${{matrix.architecture}}.tar
path: agent-${{matrix.architecture}}.tar path: agent-${{matrix.architecture}}.tar
build-arm64: build-arm64:
runs-on: ubuntu-24.04-arm runs-on: ubuntu-24.04-arm
permissions: permissions:
@@ -92,9 +92,38 @@ jobs:
name: agent-${{matrix.architecture}}.tar name: agent-${{matrix.architecture}}.tar
path: agent-${{matrix.architecture}}.tar path: agent-${{matrix.architecture}}.tar
build-darwin:
runs-on: ubuntu-24.04
permissions:
contents: write
strategy:
matrix:
architecture: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Darwin binary with Docker
run: |
docker build -f Dockerfile.cross \
--build-arg GOOS=darwin \
--build-arg GOARCH=${{matrix.architecture}} \
-t darwin-${{matrix.architecture}} .
CID=$(docker create darwin-${{matrix.architecture}})
docker cp ${CID}:/home/agent ./output-${{matrix.architecture}}
docker rm ${CID}
- name: Tar Darwin binary and clean
run: tar -cf agent-darwin-${{matrix.architecture}}.tar -C output-${{matrix.architecture}} . && rm -rf output-${{matrix.architecture}}
- name: Upload darwin artifact
uses: actions/upload-artifact@v4
with:
name: agent-darwin-${{matrix.architecture}}.tar
path: agent-darwin-${{matrix.architecture}}.tar
create-manifest: create-manifest:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
needs: [build-amd64, build-arm64] needs: [build-amd64, build-arm64, build-darwin]
steps: steps:
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v2 uses: docker/login-action@v2
+36
View File
@@ -72,4 +72,40 @@ jobs:
with: with:
name: agent-${{matrix.architecture}}.tar name: agent-${{matrix.architecture}}.tar
path: agent-${{matrix.architecture}}.tar path: agent-${{matrix.architecture}}.tar
build-darwin:
runs-on: macos-13
permissions:
contents: write
strategy:
matrix:
architecture: [arm64]
steps:
- name: Setup Docker on macOS
uses: douglascamata/setup-docker-macos-action@v1.0.0
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout
uses: actions/checkout@v3
- uses: benjlevesque/short-sha@v2.1
id: short-sha
with:
length: 7
- name: Build Darwin binary with Docker
run: |
docker build -f Dockerfile.arm64 \
-t darwin-${{matrix.architecture}} .
CID=$(docker create darwin-${{matrix.architecture}})
docker cp ${CID}:/home/agent ./output-${{matrix.architecture}}
docker rm ${CID}
- name: Tar Darwin binary and clean
run: tar -cf agent-darwin-${{matrix.architecture}}.tar -C output-${{matrix.architecture}} . && rm -rf output-${{matrix.architecture}}
- name: Upload darwin artifact
uses: actions/upload-artifact@v4
with:
name: agent-darwin-${{matrix.architecture}}.tar
path: agent-darwin-${{matrix.architecture}}.tar
+3
View File
@@ -32,6 +32,9 @@ RUN cat /go/src/github.com/kerberos-io/agent/machinery/version
################## ##################
# Build Machinery # Build Machinery
ARG GOOS=linux
ENV GOOS=${GOOS}
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \ RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
go mod download && \ go mod download && \
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \ go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \
+3
View File
@@ -32,6 +32,9 @@ RUN cat /go/src/github.com/kerberos-io/agent/machinery/version
################## ##################
# Build Machinery # Build Machinery
ARG GOOS=linux
ENV GOOS=${GOOS}
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \ RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
go mod download && \ go mod download && \
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \ go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \