mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
build-sd-images.yml: Fix qemu-static support for ubuntu-latest runner
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
550724fc18
commit
516935ec9c
10
.github/workflows/build-lxd.yml
vendored
10
.github/workflows/build-lxd.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
||||
then
|
||||
RUNNER_LABEL='["ubuntu-20.04", "ARM64"]'
|
||||
else
|
||||
RUNNER_LABEL='["ubuntu-20.04", "x64"]'
|
||||
RUNNER_LABEL='["ubuntu-20.04"]'
|
||||
fi
|
||||
echo "runner_label=$RUNNER_LABEL" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
@ -65,6 +65,7 @@ jobs:
|
||||
- name: Cleanup lxd
|
||||
run: test -z "$(lxc profile device show default | grep eth0)" || lxc profile device remove default eth0
|
||||
- uses: whywaita/setup-lxd@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
lxd_version: latest/stable
|
||||
- name: Fix LXD
|
||||
@ -89,7 +90,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
build-previous:
|
||||
runs-on: [ ubuntu-20.04, x64 ]
|
||||
runs-on: [ ubuntu-20.04 ]
|
||||
if: ${{ inputs.arch == 'x86' || inputs.arch == '' }}
|
||||
outputs:
|
||||
artifact_name: "${{ env.ARTIFACT_NAME }}"
|
||||
@ -133,6 +134,7 @@ jobs:
|
||||
echo "VERSION=$version" >> "$GITHUB_ENV"
|
||||
echo "previous_version=${version}" >> $GITHUB_OUTPUT
|
||||
- uses: whywaita/setup-lxd@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
lxd_version: latest/stable
|
||||
- name: Fix LXD
|
||||
@ -160,7 +162,7 @@ jobs:
|
||||
test-update:
|
||||
needs:
|
||||
- build-previous
|
||||
runs-on: [ubuntu-20.04, x64]
|
||||
runs-on: [ubuntu-20.04]
|
||||
outputs:
|
||||
artifact_name: "${{ env.ARTIFACT_NAME }}"
|
||||
artifact_file: "${{ steps.pack-lxd.outputs.artifact_file }}"
|
||||
@ -169,6 +171,7 @@ jobs:
|
||||
ARTIFACT_NAME: "${{ needs.build-previous.outputs.artifact_name }}"
|
||||
steps:
|
||||
- uses: whywaita/setup-lxd@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
lxd_version: latest/stable
|
||||
- name: Fix LXD
|
||||
@ -287,6 +290,7 @@ jobs:
|
||||
- name: Cleanup lxd
|
||||
run: test -z "$(lxc profile device show default | grep eth0)" || lxc profile device remove default eth0
|
||||
- uses: whywaita/setup-lxd@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
lxd_version: latest/stable
|
||||
- name: Fix LXD
|
||||
|
||||
45
.github/workflows/build-sd-images.yml
vendored
45
.github/workflows/build-sd-images.yml
vendored
@ -23,7 +23,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [ubuntu-latest, x64]
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
VERSION: "${{ inputs.git_ref }}"
|
||||
LOG_GUEST: "\\033[1;34mGUEST::\\033[0m"
|
||||
@ -38,11 +38,16 @@ jobs:
|
||||
artifact_file: ${{ env.ARTIFACT_FILE }}
|
||||
artifact_name: ${{ github.run_id }}-${{ inputs.board_id }}-image
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
- name: Setup qemu-user-static
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# 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 mkdir -p /etc/binfmt
|
||||
# for conf in qemu-{aarch64,arm}-static.conf
|
||||
@ -64,7 +69,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set -ex
|
||||
export IMG="NextCloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img"
|
||||
export IMG="NextcloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img"
|
||||
[[ "${{ github.ref_protected }}" == true ]] || export DBG=x
|
||||
|
||||
./build/build-SD-armbian.sh "${{ inputs.board_id }}" "${{ inputs.board_name }}"
|
||||
@ -82,7 +87,7 @@ jobs:
|
||||
echo -e "${LOG_CICD} Cleanup armbian build leftovers..."
|
||||
sudo rm -rf armbian/ tmp/ output/
|
||||
|
||||
export IMG="NextCloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img"
|
||||
export IMG="NextcloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img"
|
||||
[[ "${{ github.ref_protected }}" == true ]] || export DBG=x
|
||||
|
||||
./build/build-SD-armbian.sh "${{ inputs.board_id }}" "${{ inputs.board_name }}"
|
||||
@ -104,7 +109,7 @@ jobs:
|
||||
run: |
|
||||
set -ex
|
||||
echo -e "${LOG_CICD} Protected? ${{ github.ref_protected }}"
|
||||
export IMG="NextCloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img"
|
||||
export IMG="NextcloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img"
|
||||
[[ "${{ github.ref_protected }}" == true ]] || export DBG=x
|
||||
wget -q https://github.com/multiarch/qemu-user-static/releases/latest/download/qemu-aarch64-static -O ./qemu-aarch64-static
|
||||
./build/build-SD-rpi.sh
|
||||
@ -130,7 +135,7 @@ jobs:
|
||||
|
||||
test:
|
||||
needs: build
|
||||
runs-on: [ubuntu-latest, x64]
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
VERSION: "${{ inputs.git_ref }}"
|
||||
ARTIFACT_ID: ${{ needs.build.outputs.artifact_name }}
|
||||
@ -144,22 +149,20 @@ jobs:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
- name: Apt update
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# sudo apt-get -y --no-install-recommends install qemu-user-static
|
||||
# - name: Apply workaround for sudo bug (https://github.com/multiarch/qemu-user-static/issues/17)
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get -y --no-install-recommends install binfmt-support qemu-user-static
|
||||
# sudo apt-get install -y binfmt-support
|
||||
# docker run --rm --privileged tonistiigi/binfmt:latest --install all
|
||||
# docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
|
||||
# sudo mkdir -p /etc/binfmt
|
||||
# for conf in qemu-{aarch64,arm}-static.conf
|
||||
# do
|
||||
# sed 's/:F$/:OC/' /usr/lib/binfmt.d/$conf | sudo tee /etc/binfmt/$conf
|
||||
# done
|
||||
# sudo systemctl disable apparmor
|
||||
# sudo mkdir -p /etc/binfmt
|
||||
# for conf in qemu-{aarch64,arm}-static.conf
|
||||
# do
|
||||
# sed 's/:F$/:OC/' /usr/lib/binfmt.d/$conf | sudo tee /etc/binfmt/$conf
|
||||
# done
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
@ -32,6 +32,7 @@ prepare_dirs # tmp cache output
|
||||
# get latest armbian
|
||||
[[ -d armbian ]] || {
|
||||
git clone --depth 100 https://github.com/armbian/build armbian
|
||||
( cd armbian && git checkout c47c9372bf6970d6ca8c32bc5f7ec2a1416ab5bd; )
|
||||
}
|
||||
#( cd armbian && git pull --ff-only --tags && git checkout v23.02 )
|
||||
#sed -i -e '/export rootfs_size=/s/du -sm/du --apparent-size -sm/' armbian/lib/functions/image/partitioning.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user