Create rust-cross image
Aimee OS/container-images/pipeline/head This commit looks good
Details
Aimee OS/container-images/pipeline/head This commit looks good
Details
Splitting up the _build/cross-{target}_ image into two steps, first the C/C++ toolchain and then the Rust toolchain will make it quicker to rebuild the latter stage.rust-cross/main
parent
825e1c17b1
commit
09d32d722c
9
build.sh
9
build.sh
|
@ -5,7 +5,6 @@ SRCDIR=${SELF%/*}
|
|||
. "${SRCDIR}"/lib/common.sh
|
||||
|
||||
target=aarch64-unknown-linux-gnu
|
||||
base=aimee-os.org/build/base
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-t|--target)
|
||||
|
@ -24,9 +23,13 @@ while [ $# -gt 0 ]; do
|
|||
shift
|
||||
done
|
||||
|
||||
if [ -z "${base-}" ]; then
|
||||
base=aimee-os.org/build/cross-"${target}"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
cid=$(buildah from "${base}")
|
||||
buildah_run_script "${cid}" "${SRCDIR}"/lib/sync.sh
|
||||
buildah_run_script "${cid}" "${SRCDIR}"/crossdev.sh "${target}"
|
||||
buildah commit --rm "${cid}" aimee-os.org/build/cross-"${target}"
|
||||
buildah_run_script "${cid}" "${SRCDIR}"/rust-cross.sh "${target}"
|
||||
buildah commit --rm "${cid}" aimee-os.org/build/rust-cross-"${target}"
|
||||
|
|
|
@ -20,7 +20,7 @@ pipeline {
|
|||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'sh -e build.sh --base git.pyrocufflink.net/aimeeos/build/base'
|
||||
sh 'sh -e build.sh --base git.pyrocufflink.net/aimeeos/build/cross-aarch64-unknown-linux-gnu'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ pipeline {
|
|||
git.pyrocufflink.net
|
||||
"""
|
||||
}
|
||||
sh 'buildah push aimee-os.org/build/cross-aarch64-unknown-linux-gnu git.pyrocufflink.net/aimeeos/build/cross-aarch64-unknown-linux-gnu'
|
||||
sh 'buildah push aimee-os.org/build/rust-cross-aarch64-unknown-linux-gnu git.pyrocufflink.net/aimeeos/build/rust-cross-aarch64-unknown-linux-gnu'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,26 +4,6 @@ set -e
|
|||
|
||||
target=$1
|
||||
|
||||
USE=-nls \
|
||||
emerge -kvnj sys-devel/gettext
|
||||
|
||||
mkdir -p /var/db/repos/crossdev/profiles /var/db/repos/crossdev/metadata
|
||||
echo crossdev > /var/db/repos/crossdev/profiles/repo_name
|
||||
echo 'masters = gentoo' > /var/db/repos/crossdev/metadata/layout.conf
|
||||
chown -R portage:portage /var/db/repos/crossdev
|
||||
mkdir -p /etc/portage/repos.conf
|
||||
cat > /etc/portage/repos.conf/crossdev.conf <<EOF
|
||||
[crossdev]
|
||||
location = /var/db/repos/crossdev
|
||||
priority = 10
|
||||
masters = gentoo
|
||||
auto-sync = no
|
||||
EOF
|
||||
|
||||
emerge -kvnj --rebuilt-binaries=y sys-devel/crossdev
|
||||
|
||||
crossdev --stable -t "$1"
|
||||
|
||||
ln -s /var/db/repos/gentoo/sys-devel/rust-std /var/db/repos/crossdev/cross-${target}/
|
||||
|
||||
case ${target%%-*} in
|
Reference in New Issue