From a8c4647f54aac3ebb88e667a91aadbde64ab3f65 Mon Sep 17 00:00:00 2001 From: Bindea Cristian Date: Thu, 4 Apr 2024 18:49:02 +0300 Subject: [PATCH] fix Signed-off-by: Bindea Cristian --- .github/workflows/kuiperbuild.yml | 28 ++++++++++++---------------- ci/kuiper/kuiper_build_process.sh | 3 ++- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/kuiperbuild.yml b/.github/workflows/kuiperbuild.yml index facd1209c8..157b6c5866 100644 --- a/.github/workflows/kuiperbuild.yml +++ b/.github/workflows/kuiperbuild.yml @@ -3,32 +3,28 @@ name: Kuiper Scopy Build on: [push, pull_request] env: - BUILD_HOST: ubuntu-22.04 - USERNAME: github-actions + BUILD_HOST: ubuntu-20.04 + USERNAME: runner jobs: - build_scopy_on_ubuntu22: - runs-on: ubuntu-22.04 - container: - image: cristianbindea/scopy2-kuiper:latest - options: --user root + build_scopy_for_kuiper: + runs-on: ubuntu-20.04 + steps: - uses: actions/checkout@v4 + with: + set-safe-directory: 'true' - - name: fix dubious ownership - shell: bash - run: git config --global --add safe.directory $GITHUB_WORKSPACE - - - name: fix HOME variable - shell: bash - run: echo HOME=/home/runner | sudo tee -a $GITHUB_ENV + - name: Pull the Docker Image + run: docker pull cristianbindea/scopy2-kuiper:latest - name: Build Scopy shell: bash run: | - cd $GITHUB_WORKSPACE - ./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 + docker run \ + --mount type=bind,source="$GITHUB_WORKSPACE",target=/home/runner/scopy \ + cristianbindea/scopy2-kuiper:latest /bin/bash -c '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' - name: Set short git commit SHA shell: bash diff --git a/ci/kuiper/kuiper_build_process.sh b/ci/kuiper/kuiper_build_process.sh index 256cc43ae4..9a724804c5 100755 --- a/ci/kuiper/kuiper_build_process.sh +++ b/ci/kuiper/kuiper_build_process.sh @@ -1,6 +1,7 @@ #!/bin/bash set -ex +git config --global --add safe.directory $HOME/scopy SRC_DIR=$(git rev-parse --show-toplevel) source $SRC_DIR/ci/kuiper/kuiper_build_config.sh @@ -417,7 +418,7 @@ create_appimage(){ move_sysroot(){ mkdir -p $STAGING_AREA - sudo mv /home/runner/sysroot $SYSROOT + [ -d /home/runner/sysroot ] && sudo mv /home/runner/sysroot $SYSROOT } move_appimage(){