mirror of
https://github.com/asherkin/accelerator.git
synced 2025-12-06 18:08:30 +00:00
* overhaul the repository add protobuf change repo url try to restore github python syntax highlighter move breakpad into third_party, update packagescript * AMBuildifying remove unnecessary files Move the git patching into ambuild move lss to a patch Add windows compilation support remove breakpad.bat move postlink libs * Overhaul CI (#4) * Dockerbuild (#5) * make cwd_cmd spew stdout and stderr * add proper docker build support * Overhaul ci (#6) * Setup CI * fix checkout * fix yaml syntax * no fail fast * setup CI cache * Fix pip install * remove pip git * update actions, ditch node 16 * small syntax cleanups * more CI changes * github doc lied --------- Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com> * final push for perfect dockerbuilds in every scenario that i have been able to find * rename cicd->dockerbuild --------- Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com> * Add readme, remode duplicate -fPIC update names of dockerbuild folder in sh files * cleanup dockerfile (#7) * Update 0002-Write-FUNC-records-instead-of-PUBLIC-for-ELF-symbols.patch * Statically link libz, libgcc & libstdc++ * fix submodule path * Review change + comment patch --------- Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com> Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
50 lines
1.4 KiB
Bash
50 lines
1.4 KiB
Bash
#!/bin/bash
|
|
set -euxo pipefail
|
|
|
|
dockerimage="debian:11-slim"
|
|
|
|
|
|
# we do this so that we can be agnostic about where we're invoked from
|
|
# meaning you can exec this script anywhere and it should work the same
|
|
thisiswhereiam=${BASH_SOURCE[0]}
|
|
# this should be /whatever/directory/structure/Open-Fortress-Source
|
|
script_folder=$( cd -- "$( dirname -- "${thisiswhereiam}" )" &> /dev/null && pwd )
|
|
|
|
|
|
# this should be /whatever/directory/structure/[accelerator_root]/cicd
|
|
build_dir="dockerbuild"
|
|
|
|
pushd "${script_folder}" &> /dev/null || exit 99
|
|
|
|
# this is relative to our source dir/build
|
|
internalscript="_accelerator_docker_build_internal.sh"
|
|
|
|
# this should always be our accelerator root dir
|
|
pushd ../ &> /dev/null
|
|
dev_srcdir=$(pwd)
|
|
container_rootdir="accelerator"
|
|
|
|
# add -it flags automatically if in null tty
|
|
itflag=""
|
|
if [ -t 0 ] ; then
|
|
itflag="-it"
|
|
else
|
|
itflag=""
|
|
fi
|
|
|
|
podman run ${itflag} \
|
|
-v "${dev_srcdir}":/"${container_rootdir}" \
|
|
-w /${container_rootdir} \
|
|
${dockerimage} \
|
|
bash ./${build_dir}/${internalscript} "$@"
|
|
|
|
ecodereal=$?
|
|
echo "real exit code ${ecodereal}"
|
|
|
|
popd &> /dev/null || exit
|
|
|
|
popd &> /dev/null || exit
|
|
|
|
exit ${ecodereal}
|
|
|