Skip to content

Commit

Permalink
Merge pull request #209 from signalwire/arm64
Browse files Browse the repository at this point in the history
[GHA] Add `arm64v8` build target.
  • Loading branch information
s3rj1k authored Apr 17, 2024
2 parents cea69b7 + 2661b49 commit d1254bb
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/docker/debian/bookworm/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG BUILDER_IMAGE=arm64v8/debian:bookworm
ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

SHELL ["/bin/bash", "-c"]

RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
51 changes: 51 additions & 0 deletions .github/docker/debian/bullseye/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG BUILDER_IMAGE=arm64v8/debian:bullseye
ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

SHELL ["/bin/bash", "-c"]

RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
51 changes: 51 additions & 0 deletions .github/docker/debian/buster/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG BUILDER_IMAGE=arm64v8/debian:buster
ARG MAINTAINER="Andrey Volk <andrey@signalwire.com>"

FROM ${BUILDER_IMAGE} AS builder

ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000

MAINTAINER ${MAINTAINER}

SHELL ["/bin/bash", "-c"]

RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget

RUN update-ca-certificates --fresh

ENV DATA_DIR=/data
WORKDIR ${DATA_DIR}

COPY . ${DATA_DIR}
RUN git reset --hard HEAD && git clean -xfd

RUN git config --global --add safe.directory '*'

# Bootstrap and Build
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" && \
make package && mkdir OUT && mv -v *.deb OUT/.

# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /
2 changes: 2 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
runner: ubuntu-latest
- name: arm32v7
runner: ubuntu-latest
- name: arm64v8
runner: ubuntu-latest
# exclude:
# - version: bookworm
# platform:
Expand Down

0 comments on commit d1254bb

Please sign in to comment.