Skip to content

Commit

Permalink
ci: build from chimera
Browse files Browse the repository at this point in the history
cross toolchain is easily available and useable without me building it
in another repo
  • Loading branch information
odrling committed Jan 30, 2024
1 parent e5a3ff2 commit 41abc96
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 25 deletions.
15 changes: 12 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
FROM docker.io/amd64/alpine AS bootstrap
RUN apk add tar gzip curl
RUN curl https://repo.chimera-linux.org/live/20240122/chimera-linux-x86_64-ROOTFS-20240122-bootstrap.tar.gz -o chimera.tar.gz && \
echo 'b57b4c84ef1b8c5c628e84aa9f1b80863d748440643041414102b9ee19b0a5e4 chimera.tar.gz' | sha256sum -c && \
mkdir /chimera && tar xf chimera.tar.gz -C /chimera

FROM scratch AS builder
ARG ARCH
FROM ghcr.io/odrling/gentoo-crossdev-images:$ARCH-llvm17 AS builder

COPY --from=bootstrap /chimera /

RUN apk add musl-devel meson clang clang-rt-devel llvm-devel-static git lld

COPY . /dakara_check

ARG ARCH
RUN cd /dakara_check && /dakara_check/ci/build.sh --cross-file ci/$ARCH-unknown-linux-musl.txt
RUN cd /dakara_check && /dakara_check/ci/build.sh

FROM alpine

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[binaries]
c = 'aarch64-unknown-linux-musl-clang'
c = 'aarch64-chimera-linux-musl-clang'
ld = 'ld.lld'
objcopy = 'llvm-objcopy'
strip = 'llvm-strip'
pkg-config = 'aarch64-unknown-linux-musl-pkg-config'

[host_machine]
system = 'linux'
Expand Down
14 changes: 7 additions & 7 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh
export PATH="$PATH:/usr/lib/llvm/17/bin"
export CC=clang
export CC_LD=lld
export UBSAN_OPTIONS="signed-integer-overflow"
export CFLAGS="-D_FORTIFY_SOURCE=3"
export LDFLAGS="-Wl,-O1 -Wl,--as-needed"
export LDFLAGS="-Wl,-Bsymbolic"

meson setup build --buildtype release --strip -Ddefault_library=static -Dprefer_static=true -Dffmpeg:programs=disabled -Dffmpeg:tests=disabled -Dffmpeg:encoders=disabled -Dffmpeg:muxers=disabled -Dffmpeg:avfilter=disabled -Dffmpeg:avdevice=disabled -Dffmpeg:postproc=disabled -Dffmpeg:swresample=disabled -Dffmpeg:swscale=disabled -Dffmpeg:decoders=disabled -Dffmpeg:aac_decoder=enabled -Dffmpeg:aac_fixed_decoder=enabled -Dffmpeg:aac_latm_decoder=enabled -Dffmpeg:version3=enabled "$@"
if [ "$ARCH" != x86_64 ]; then
apk add "base-cross-$ARCH" "clang-rt-cross-$ARCH" "clang-rt-crt-cross-$ARCH"
extra_args="--cross-file ci/$ARCH-chimera-linux-musl.txt"
fi

meson setup build --buildtype release --strip -Ddefault_library=static -Dprefer_static=true -Dffmpeg:programs=disabled -Dffmpeg:tests=disabled -Dffmpeg:encoders=disabled -Dffmpeg:muxers=disabled -Dffmpeg:avfilter=disabled -Dffmpeg:avdevice=disabled -Dffmpeg:postproc=disabled -Dffmpeg:swresample=disabled -Dffmpeg:swscale=disabled -Dffmpeg:decoders=disabled -Dffmpeg:aac_decoder=enabled -Dffmpeg:aac_fixed_decoder=enabled -Dffmpeg:aac_latm_decoder=enabled -Dffmpeg:version3=enabled $extra_args

meson compile -C build
meson install -C build --destdir=../dest/
13 changes: 0 additions & 13 deletions ci/x86_64-unknown-linux-musl.txt

This file was deleted.

0 comments on commit 41abc96

Please sign in to comment.