Skip to content

Commit

Permalink
Merge pull request #94 from pi-hole/new/clang
Browse files Browse the repository at this point in the history
Add clang into ftl-build images + code maintainance
  • Loading branch information
DL6ER authored May 24, 2024
2 parents 4ddc5b9 + 801a0b1 commit f575f4d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/ftl-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- 'ftl-build/**'
- '.github/workflows/ftl-build.yml'
push:
branches:
- '**'
tags:
- "**"
paths:
Expand All @@ -28,23 +30,17 @@ jobs:
matrix:
include:
- platform: linux/amd64
container: alpine:3.18
- platform: linux/386
container: alpine:3.18
- platform: linux/arm/v6
container: alpine:3.18
- platform: linux/arm/v7
container: alpine:3.18
- platform: linux/arm64/v8
container: alpine:3.18
- platform: linux/riscv64
container: alpine:edge
steps:
- name: Prepare name for digest up/download
-
name: Prepare name for digest up/download
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
-
name: Checkout Repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -90,7 +86,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
CONTAINER=${{ matrix.container }}
CONTAINER=alpine:${{ ( github.event_name == 'scheduled' || matrix.platform == 'linux/riscv64' ) && 'edge' || 'latest' }}
-
name: Push builder target and push by digest
if: github.event_name != 'pull_request'
Expand All @@ -102,10 +98,9 @@ jobs:
push: ${{ github.event_name != 'workflow_dispatch' }}
target: builder
labels: ${{ steps.meta.outputs.labels }}
build-args: |
CONTAINER=${{ matrix.container }}
outputs: |
type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
type=image,name=${{ env.GITHUB_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
-
name: Export digests
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -142,7 +137,6 @@ jobs:
path: /tmp/digests
pattern: digests-*
merge-multiple: true

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -154,7 +148,6 @@ jobs:
docker_password: ${{ secrets.DOCKERHUB_PASS }}
ghcr_username: ${{ github.repository_owner }}
ghcr_password: ${{ secrets.GITHUB_TOKEN }}

-
name: Docker meta
id: meta_docker
Expand Down Expand Up @@ -188,4 +181,3 @@ jobs:
run: |
docker buildx imagetools inspect ${{ env.DOCKER_REGISTRY_IMAGE }}:${{ steps.meta_docker.outputs.version }}
docker buildx imagetools inspect ${{ env.GITHUB_REGISTRY_IMAGE }}:${{ steps.meta_docker.outputs.version }}
18 changes: 8 additions & 10 deletions ftl-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ RUN apk add --no-cache \
libidn2-static \
libunistring-dev \
libunistring-static \
perl

# Install pdns from community repo
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VER}/community" >> /etc/apk/repositories; \
apk update; \
apk add --no-cache \
pdns \
pdns-backend-sqlite3 \
pdns-recursor \
pdns-doc
perl \
clang \
pdns \
pdns-backend-sqlite3 \
pdns-recursor \
pdns-doc \
gdb

ENV STATIC true
ENV TEST true
Expand Down Expand Up @@ -102,6 +99,7 @@ FROM builder AS tester

# For FTL test compilation
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
ARG TARGETARCH
ARG TARGETVARIANT
ARG CI_ARCH="$TARGETPLATFORM"
Expand Down

0 comments on commit f575f4d

Please sign in to comment.