From 29acb48b6aa2ca3e27c8d00e80d200c0169d166f Mon Sep 17 00:00:00 2001 From: Luigi Cruz Date: Fri, 7 May 2021 16:38:25 -0300 Subject: [PATCH] Include patches. --- .github/workflows/release.yml | 50 ---------------------------------- .github/workflows/validate.yml | 4 +-- ansible/standalone.yaml | 1 - ansible/tasks/umount.yaml | 1 + build.sh | 4 +-- build_base.sh | 14 ++++++---- 6 files changed, 13 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 5d741cc..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,50 +0,0 @@ -on: - release: - types: [ created ] - -name: Build & Deploy Image - -jobs: - build: - name: Build & Release Image - runs-on: self-hosted - timeout-minutes: 2880 - env: - working-directory: ./ - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Clean docker - id: clean_docker - working-directory: ${{ env.working-directory }} - run: | - docker system prune -af - docker system prune --volumes -f - docker image prune -af - docker container stop $(docker container ls -aq) || true - docker container rm $(docker container ls -aq) || true - - name: Build project - id: builder - working-directory: ${{ env.working-directory }} - run: | - bash build-docker.sh - echo ::set-output name=filename::$(ls deploy/*.img.xz | xargs -n 1 basename) - - name: Fix Permissions - id: fix_perm_filename - run: | - chmod a+rw ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} - echo ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.LONG_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} - asset_name: ${{ steps.builder.outputs.filename }} - asset_content_type: application/x-tar - - name: Delete Image - id: delete_image - run: | - rm ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 87baa16..69f42ba 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,11 +1,11 @@ -on: ['pull_request'] +on: ['commit'] name: Build & Validate Image jobs: build: name: Build & Validate Image - runs-on: self-hosted + runs-on: arm64 timeout-minutes: 2880 env: working-directory: ./ diff --git a/ansible/standalone.yaml b/ansible/standalone.yaml index 6f4db7c..454ab57 100644 --- a/ansible/standalone.yaml +++ b/ansible/standalone.yaml @@ -5,7 +5,6 @@ vars: PISDR_USER: luigi pre_tasks: - - {include: 'tasks/mount.yaml', tags: 'always'} - {include: 'tasks/update-apt.yaml', tags: 'always'} roles: - {role: 'uhd', tags: 'uhd'} diff --git a/ansible/tasks/umount.yaml b/ansible/tasks/umount.yaml index 4d0933b..3a3ca58 100644 --- a/ansible/tasks/umount.yaml +++ b/ansible/tasks/umount.yaml @@ -2,6 +2,7 @@ - name: Umount pseudo filesystems connection: local shell: umount -l '{{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }}{{ item }}' + ignore_errors: yes with_items: - /proc - /dev/pts diff --git a/build.sh b/build.sh index aee88b0..30014dd 100755 --- a/build.sh +++ b/build.sh @@ -12,9 +12,9 @@ export PISDR_IMG_NAME="$(date '+%Y-%m-%d')-PiSDR-$PISDR_ARCH" #### Build Settings BUILD_BOARD_TEGRA_NANO=true -BUILD_BOARD_TEGRA_AGX=true +BUILD_BOARD_TEGRA_AGX=false BUILD_BOARD_RPI=false -BUILD_BOARD_GRUB=true +BUILD_BOARD_GRUB=false #### Compiler Settings export TARGET="/target" diff --git a/build_base.sh b/build_base.sh index 3f776a2..375ce04 100755 --- a/build_base.sh +++ b/build_base.sh @@ -6,13 +6,15 @@ printf "Create base rootfs directory... " mkdir -p $BASE_DIR printf "(OK)\n" -printf "Enabling qemu kernel components... " -update-binfmts --enable qemu-arm > /dev/null 2>&1 -if [ ! "$(ls -A /proc/sys/fs/binfmt_misc/)" ]; then - printf "(NOK)\n" - exit +if [[ "$PISDR_ARCH" != $(uname -p) ]]; then + printf "Enabling qemu kernel components... " + update-binfmts --enable qemu-arm > /dev/null 2>&1 + if [ ! "$(ls -A /proc/sys/fs/binfmt_misc/)" ]; then + printf "(NOK)\n" + exit + fi + printf "(OK)\n" fi -printf "(OK)\n" echo "Run debootstrap first stage..." if [ ! -f "${BASE_DIR}/.bootstrap_completed" ]; then