Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
bindea-cristian committed Apr 12, 2024
1 parent 5bccbe0 commit b40f6a1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/kuiperbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

env:
BUILD_HOST: ubuntu-20.04
USERNAME: runner
USERNAME: github-actions

jobs:

Expand All @@ -19,14 +19,23 @@ jobs:
- name: Pull the Docker Image
run: docker pull cristianbindea/scopy2-kuiper:latest

- name: Build Scopy
- name: Create Scopy AppImage
shell: bash
run: |
sudo chown -R 1000:1000 $GITHUB_WORKSPACE
docker run \
--mount type=bind,source="$GITHUB_WORKSPACE",target=/home/runner/scopy \
cristianbindea/scopy2-kuiper:latest /bin/bash -c 'id && cd /home/runner/scopy && ./ci/kuiper/kuiper_build_process.sh install_packages download_cmake download_crosscompiler move_sysroot build_scopy build_iio-emu create_appdir create_appimage move_appimage'
cd $GITHUB_WORKSPACE
sudo apt update
./ci/kuiper/create_sysroot.sh install_packages install_qemu
./ci/kuiper/kuiper_build_process.sh generate_ci_envs
docker run \
--mount type=bind,source="$GITHUB_WORKSPACE",target=$HOME/scopy \
--env-file $GITHUB_WORKSPACE/ci/general/gh-actions.envs \
cristianbindea/scopy2-kuiper:latest \
/bin/bash -c 'cd $HOME && \
sudo chown -R runner:runner scopy && \
cd $HOME/scopy && \
./ci/kuiper/kuiper_build_process.sh install_packages download_cmake download_crosscompiler move_sysroot build_scopy build_iio-emu create_appdir create_appimage move_appimage
'
- name: Set short git commit SHA
shell: bash
run: echo "commit_sha=$(git rev-parse --short ${{ github.sha }})" >> "$GITHUB_ENV"
Expand Down
14 changes: 0 additions & 14 deletions ci/kuiper/copy-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,13 @@ LOCATION=$2


if [ ! -f "${SRC_DIR}"/ci/kuiper/ldd-mod ]; then
ls /usr/arm-linux-gnueabihf/lib
ls /usr/arm-linux-gnueabihf/lib/ld-2.31.so
ls /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3
sed 's|.*RTLDLIST=.*|RTLDLIST="/usr/arm-linux-gnueabihf/lib/ld-2.31.so /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3"|' /usr/bin/ldd | tee "${SRC_DIR}"/ci/kuiper/ldd-mod
chmod +x "${SRC_DIR}"/ci/kuiper/ldd-mod
fi

export LD_LIBRARY_PATH="${APP_DIR}/usr/lib:${SYSROOT}/lib:${SYSROOT}/lib/arm-linux-gnueabihf:${SYSROOT}/usr/arm-linux-gnueabihf/lib:${SYSROOT}/usr/local/qt5.15/lib:${SYSROOT}/usr/local/lib:${SRC_DIR}/build"
LIBS_ARRAY=()
run_ldd(){

if [ ! -z "$(${SRC_DIR}/ci/kuiper/ldd-mod $1 | grep "not found")" ]; then
echo "--- LIB NOT FOUND"
${SRC_DIR}/ci/kuiper/ldd-mod $1
exit 1
fi
if [ ! -z "$(${SRC_DIR}/ci/kuiper/ldd-mod $1 | grep "not a dynamic executable")" ]; then
echo "--- LDD ERROR"
exit 1
fi

for library in $("${SRC_DIR}"/ci/kuiper/ldd-mod "$1" | cut -d '>' -f 2 | awk '{print $1}')
do
# check if the library exists at that path and if it was processed already
Expand Down
4 changes: 2 additions & 2 deletions ci/kuiper/create_sysroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source $SRC_DIR/ci/kuiper/kuiper_build_config.sh
IMAGE_FILE=2023-12-13-ADI-Kuiper-full.img

install_packages(){
sudo apt -y install git wget unzip python3 python
sudo apt -y install git wget unzip python3 python2
}

download_kuiper(){
Expand Down Expand Up @@ -87,7 +87,7 @@ apt -y install build-essential gcc g++ gdb-multiarch cmake autoconf automake bis
libxcb-dpms0-dev libxcb-dri2-0-dev libxcb-ewmh-dev libxcb-imdkit-dev libxcb-xvmc0-dev \
libxcb-present-dev libxcb-record0-dev libxcb-res0-dev libxcb-xrm-dev libx11-xcb-dev libxcb-glx0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-xkb-dev libxkbcommon-x11-dev \
libxcb-screensaver0-dev libxcb-util0-dev libxcb-xf86dri0-dev libxcb-xtest0-dev
apt -y install libunwind-dev libsndfile1-dev mesa-utils* mesa-common-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev python libopenal-dev || true
apt -y install libunwind-dev libsndfile1-dev mesa-utils* mesa-common-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev python2 libopenal-dev || true
apt -y install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev || true
wget https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/utils/SSymlinker
Expand Down
7 changes: 6 additions & 1 deletion ci/kuiper/kuiper_build_process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build_with_cmake() {
$CMAKE $CURRENT_BUILD_CMAKE_OPTS ../
make $JOBS
CURRENT_BUILD_CMAKE_OPTS=""
# TODO: Create build-status file
}

set_config_opts() {
Expand Down Expand Up @@ -324,7 +325,6 @@ create_appdir(){
cp $QT_LOCATION/lib/libQt5EglFSDeviceIntegration.so* $APP_DIR/usr/lib
cp $QT_LOCATION/lib/libQt5DBus.so* $APP_DIR/usr/lib


cp $SYSROOT/lib/arm-linux-gnueabihf/libstdc++.so* $APP_DIR/usr/lib
cp $SYSROOT/lib/arm-linux-gnueabihf/libc.so* $APP_DIR/usr/lib
cp $SYSROOT/lib/arm-linux-gnueabihf/libdl.so* $APP_DIR/usr/lib
Expand Down Expand Up @@ -363,6 +363,11 @@ move_appimage(){
mv $APP_IMAGE $SRC_DIR/Scopy-armhf.AppImage
}

generate_ci_envs()
{
$SRC_DIR/ci/general/gen_ci_envs.sh > $SRC_DIR/ci/general/gh-actions.envs
}

for arg in $@; do
$arg
done

0 comments on commit b40f6a1

Please sign in to comment.