Skip to content

Commit

Permalink
build-sd-images.yml: Fix test setup
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Knöppler <[email protected]>
  • Loading branch information
theCalcaholic committed Sep 6, 2024
1 parent 93f76ec commit cc1ee5b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build-sd-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
# update-binfmts --display qemu-arm
- name: "Build Armbian"
id: build-armbian
if: "${{ inputs.board_id != 'rpi5b' }}"
continue-on-error: true
run: |
set -ex
Expand All @@ -79,7 +80,7 @@ jobs:
echo "artifact_file=${IMG}" >> $GITHUB_OUTPUT
echo "ARTIFACT_FILE=${IMG}" >> $GITHUB_ENV
- name: "Build Armbian (2nd attempt)"
if: ${{ steps.build-armbian.outcome == 'failure' }}
if: ${{ steps.build-armbian.outcome == 'failure' && inputs.board_id != 'rpi5b' }}
id: build-armbian-2nd
run: |
set -ex
Expand All @@ -96,6 +97,14 @@ jobs:
mv "${artifacts[0]}" "output/$IMG"
echo "artifact_file=${IMG}" >> $GITHUB_OUTPUT
echo "ARTIFACT_FILE=${IMG}" >> $GITHUB_ENV
- name: "Download test image"
if: "${{ inputs.board_id == 'rpi5b' }}"
run: |
mkdir -p output
wget -q -O output/Armbian_Test.img https://pack.minecraft.private-cloud.network/NCP_Armbian_Test.img
echo "ARTIFACT_FILE=Armbian_Test.img" >> $GITHUB_ENV
echo "artifact_file=Armbian_Test.img" >> $GITHUB_OUTPUT
- name: "Upload Armbian logs"
if: ${{ failure() }}
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -129,6 +138,13 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Disable apparmor
run: |
sudo apt-get update
sudo apt-get install -y binfmt-support
curl -L -o /tmp/qemu.sh 'https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh'
bash /tmp/qemu.sh --debian
sudo systemctl disable apparmor
docker run --rm --privileged tonistiigi/binfmt:latest --install all
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
sudo systemctl disable apparmor
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -154,6 +170,7 @@ jobs:
sudo chmod +x raspbian_root/usr/bin/qemu-{arm,aarch64}-static
echo 'Mutex posixsem' | sudo tee -a raspbian_root/etc/apache2/mods-available/ssl.conf
echo 'ignore-warnings ARM64-COW-BUG' | sudo tee -a raspbian_root/etc/redis/redis.conf
sudo sed -i 's/NoExecPaths=.*//g' raspbian_root/usr/lib/systemd/system/redis-server.service
sudo mkdir -p raspbian_root/etc/systemd/system/redis-server.service.d
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
echo 'PrivateUsers=false' | sudo tee -a raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
Expand Down

0 comments on commit cc1ee5b

Please sign in to comment.