Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoke #54

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6b05775
Update build-test-image-docker.yml
igorpecovnik Sep 11, 2022
d64bc9f
Update build-test-image-docker.yml
igorpecovnik Sep 11, 2022
b04da86
Update build-test-image-docker.yml
igorpecovnik Sep 11, 2022
2a7d980
Update build-test-image-docker.yml
igorpecovnik Sep 11, 2022
6783c9e
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
94b3d4d
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
8cff07b
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
660ff66
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
bfe6144
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
053b3f6
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
7f9f5e8
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
d6ea973
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
d07d80c
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
087afb4
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
e1f814c
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
7cce8e1
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
90a0f7d
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
cb610c7
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
c2a8978
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
0eb43b9
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
2fce3a0
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
7caee86
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
0ded8ed
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
9fd443c
Update build-test-image-docker.yml
igorpecovnik Sep 12, 2022
5706017
Update runners status
armbianworker Jul 3, 2023
dacb613
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
8ad80a2
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
98cfd07
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
fed5419
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
93abbc7
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
cd7dd17
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
a3d4a6b
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
21e595d
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
68b9b7c
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
0d9523e
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
cb56d42
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
ac02f7e
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
ccee0af
Update smoke-tests.yml
igorpecovnik Jul 3, 2023
833d2b3
Update status.yml
igorpecovnik Sep 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 112 additions & 28 deletions .github/workflows/build-test-image-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ on:
jobs:

gradle:
if: ${{ github.repository_owner }}
strategy:
fail-fast: false
max-parallel: 8
matrix:
#board: [uefi-x86,uefi-arm64]
board: [uefi-x86]
target: ["debian:bullseye:10","debian:sid:12","ubuntu:focal:8","ubuntu:jammy:12"]
#target: ["debian:bullseye:10","ubuntu:jammy:12"]
desktop: [xfce,gnome,mate,cinnamon,budgie,kde-plasma]

name: Make
runs-on: ${{ inputs.runner }}
#runs-on: big
runs-on: ubuntu-latest
outputs:
release: ${{steps.gradle.outputs.release}}
steps:

- name: Runner prepare
Expand Down Expand Up @@ -67,13 +64,6 @@ jobs:
echo "DOCKER_RELEASE=$DOCKER_RELEASE" >> $GITHUB_ENV
echo "DOCKER_COMPILER=$DOCKER_COMPILER" >> $GITHUB_ENV

# - name: Handle exceptions
# run: |
#
# if [[ "${{ env.DISTRO }}" == "debian" && "${{ env.BOARD }}" == "rpi4b" ]]; then
# echo "SKIP=yes" >> $GITHUB_ENV
# fi

- run: |

REFERENCE=${{ inputs.reference }}
Expand Down Expand Up @@ -116,6 +106,8 @@ jobs:
if: ${{ env.SKIP != 'yes' }}
run: |

echo ::set-output name=release::${{ env.RELEASE }}

cd build

# framework init
Expand Down Expand Up @@ -151,27 +143,119 @@ jobs:
BRANCH=current \
RELEASE=${{ env.RELEASE }} \
BUILD_MINIMAL=no \
BUILD_DESKTOP=yes \
BUILD_DESKTOP=no \
KERNEL_ONLY=no \
KERNEL_CONFIGURE=prebuilt \
COMPRESS_OUTPUTIMAGE=no \
IGNORE_UPDATES=yes \
REPOSITORY_INSTALL="u-boot,kernel" \
DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base" \
DESKTOP_ENVIRONMENT=${{ matrix.desktop }} \
DESKTOP_ENVIRONMENT_CONFIG_NAME="" \
DESKTOP_ENVIRONMENT="" \
SKIP_EXTERNAL_TOOLCHAINS=yes \
FORCED_MONTH_OFFSET=12 \
DESKTOP_APPGROUPS_SELECTED="3dsupport browsers" \
ROOTFSCACHE_VERSION="$(shuf -i 1-100000 -n 1)"

# - name: Upload artefacts
# if: ${{ env.SKIP != 'yes' }}
# uses: actions/upload-artifact@v3
# with:
# name: "${{ matrix.board }}-${{ env.RELEASE }}-${{ matrix.desktop }}"
# path: build/output/images/*
# if-no-files-found: error
# retention-days: 7

- name: Upload artefacts
if: ${{ env.SKIP != 'yes' }}
uses: actions/upload-artifact@v3
with:
name: "${{ matrix.board }}-${{ env.RELEASE }}"
path: build/output/images/*
if-no-files-found: error
retention-days: 7

- name: Runner prepare
uses: armbian/actions/runner-prepare@main

make-list:
needs: gradle
strategy:
fail-fast: false
max-parallel: 8
matrix:
board: [uefi-x86]
target: ["debian:bullseye:10","debian:sid:12","ubuntu:focal:8","ubuntu:jammy:12"]

runs-on: qemu
name: "Test"
steps:

- name: Prepare
run: |

sudo apt-get -y install qemu-kvm libvirt-daemon-system libvirt-clients virtinst cpu-checker libguestfs-tools libosinfo-bin dnsmasq gir1.2-spiceclientgtk-3.0 virt-viewer sshpass

- name: Read
run: |

RELEASE=$(echo ${{ matrix.target }} | cut -d":" -f2)
echo ${{ matrix.target }}
echo ${RELEASE}
echo "RELEASE=$RELEASE" >> $GITHUB_ENV

# remove old
rm -rf "${{ matrix.board }}-${RELEASE}"

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: "${{ matrix.board }}-${{ env.RELEASE }}"
path: "${{ matrix.board }}-${{ env.RELEASE }}"

- name: Remove previous if any
run: |

sudo virsh destroy Armbian || true
sudo virsh undefine Armbian || true

- name: Convert to QEMU and resize
run: |

IMAGE=$(ls -1 "${{ matrix.board }}-${{ env.RELEASE }}"/*.img)
sudo qemu-img convert -f raw -O qcow2 ${IMAGE} /var/lib/libvirt/images/image.qcow2
sudo qemu-img resize /var/lib/libvirt/images/image.qcow2 +10G

- name: Boot it up and wait 1 minute
run: |

sudo virt-install --name Armbian --memory 2048 --vcpus 4 --disk /var/lib/libvirt/images/image.qcow2,bus=sata --import --os-variant ubuntu22.04 --network bridge=br0 --noautoconsole
sleep 1m

- name: Find and login
run: |

export TERM=linux

# get ip
MAC=$(sudo virsh domiflist Armbian | tail -2 | head -1 | awk '{print $NF}')
USER_HOST=$(sudo nmap -sP 10.0.40.0/24 | grep -i "$MAC" -B 2 | head -1 | awk '{print $NF}')

# login credentials
USER_ROOT=root
PASS_ROOT=testpassword
USER_NORMAL=guest
PASS_NORMAL=testpassword

expect -c "
spawn sshpass -p 1234 ssh -o "StrictHostKeyChecking=accept-new" ${USER_ROOT}@${USER_HOST}
set timeout 120
expect \"Create root password: \"
send \"${PASS_ROOT}\r\"
expect \"Repeat root password: \"
send \"${PASS_ROOT}\r\"
expect \"zsh\"
send \"2\r\"
expect \"*to abort\"
send \"${USER_NORMAL}\r\"
expect \"Create*password:\"
send \"${PASS_NORMAL}\r\"
expect \"Repeat*password:\"
send \"${PASS_NORMAL}\r\"
expect \"Please provide your real name: \"
send \"${NAME_NORMAL}\r\"
expect \"*language based on your location*\"
send \"y\r\"
expect \"*#\"
send \"exit\r\"
"

sshpass -p ${PASS_ROOT} ssh -o "StrictHostKeyChecking=accept-new" ${USER_ROOT}@${USER_HOST} "bash /etc/update-motd.d/10-armbian-header"
sshpass -p ${PASS_ROOT} ssh -o "StrictHostKeyChecking=accept-new" ${USER_ROOT}@${USER_HOST} "apt-get -y update"
67 changes: 37 additions & 30 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,49 @@ jobs:
Prepare:
name: "Power system on"
outputs:
matrix: ${{steps.list_dirs.outputs.matrix}}
matrix: ${{steps.json.outputs.JSON_CONTENT}}
runs-on: [self-hosted, Linux, local]
steps:

- name: Runner prepare
uses: armbian/actions/runner-prepare@main
#- name: Runner prepare
# uses: armbian/actions/runner-prepare@main

- name: Power on
uses: armbian/actions/power-on@main
with:
KEY_POWER_ON: ${{ secrets.KEY_POWER_ON }}
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
#- name: Power on
# uses: armbian/actions/power-on@main
# with:
# KEY_POWER_ON: ${{ secrets.KEY_POWER_ON }}
# USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
# HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
# KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}

- name: Determine changed kernels
id: list_dirs
id: json
run: |

echo ::set-output name=matrix::$(
echo 'JSON_CONTENT<<EOF' >> $GITHUB_OUTPUT
#echo '[
# "FriendlyElec Zero Pi:10.0.30.195",
# "FriendlyElec Nanopi Neo 2 black:10.0.30.184"
# ]' >> $GITHUB_OUTPUT
#
curl -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" -H "Accept: application/json; indent=4" \
"https://stuff.armbian.com/netbox/api/dcim/devices/?limit=500&name__empty=false&tenant=igor&status=active&device_role=DUT&tag=qa" \
| jq '.results[] | .display, .primary_ip.address' | xargs -n2 -d'\n' | grep -v null | sed -e 's/ ([^()]*)//g' \
| sed 's/\/24"/"/g' | sed "s/\" \"/:/g" | sed "s/\"//g" |jq -cnR '[inputs | select(length>0)]' | jq)
| jq '.results[] | .display, .device_type.slug, .primary_ip.address' \
| xargs -n3 -d'\n' | head -3 | grep -v null | sed -e 's/ ([^()]*)//g' \
| sed 's/\/24"/"/g' | sed "s/\" \"/:/g" | sed "s/\"//g" |jq -cnR '[inputs | select(length>0)]' | jq >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT

Test:
name: "DUT"
runs-on: igor
needs: Prepare
if: ${{ needs.Prepare.outputs.matrix != '[]' && needs.Prepare.outputs.matrix != '' }}
#if: ${{ needs.Prepare.outputs.matrix != '[]' && needs.Prepare.outputs.matrix != '' }}
timeout-minutes: 15
strategy:
#max-parallel: 16
fail-fast: false
matrix:

node: ${{fromJson(needs.Prepare.outputs.matrix)}}

steps:
Expand All @@ -72,14 +79,15 @@ jobs:
known_hosts: github.com ssh-rsa AAAAB3Nz
if_key_exists: replace

- name: Read values
- name: "Read values"
run: |

CHUNK="${{ matrix.node }}"
echo "DUT_NAME=$(echo $CHUNK | cut -d":" -f1)" >> $GITHUB_ENV
echo "DUT_IP=$(echo $CHUNK | cut -d":" -f2)" >> $GITHUB_ENV
echo "DUT_SLUG=$(echo $CHUNK | cut -d":" -f2)" >> $GITHUB_ENV
echo "DUT_IP=$(echo $CHUNK | cut -d":" -f3)" >> $GITHUB_ENV

- name: Is online?
- name: "Is ${{ env.DUT_IP }} online?"
run: |

# set this here
Expand Down Expand Up @@ -193,13 +201,12 @@ jobs:

Stop:
name: "Power system off"
if: always()
needs: Test
runs-on: [self-hosted, Linux, local]
steps:

- name: Runner prepare
uses: armbian/actions/runner-prepare@main
#- name: Runner prepare
# uses: armbian/actions/runner-prepare@main

- name: Clean
run: |
Expand Down Expand Up @@ -227,12 +234,12 @@ jobs:
name: status
path: status

- name: Power off
if: always()
uses: armbian/actions/power-off@main
with:
#- name: Power off
# if: always()
# uses: armbian/actions/power-off@main
# with:

KEY_POWER_OFF: ${{ secrets.KEY_POWER_OFF }}
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
# KEY_POWER_OFF: ${{ secrets.KEY_POWER_OFF }}
# USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
# HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
# KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
2 changes: 1 addition & 1 deletion .github/workflows/status.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Get values
on:
workflow_dispatch:
push:
# push:
schedule:
- cron: "*/30 * * * *"

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
|--|--:|--:|
|Cats|12|15 Gb|
|GitHub|40|136 Gb|
|Igor|680|610 Gb|
|JetHub|32|39 Gb|
|Lane|96|93 Gb|
|Xogium|14|7 Gb|
|Hristov|16|15 Gb|
|Igor|232|433 Gb|
|JetHub|12|64 Gb|
|Lane|32|31 Gb|
|Werner|16|62 Gb|
|Xogium|12|7 Gb|
## Donating Virtual Machine to Armbian?

Our CI engine is hungry for CPU and memory resources. In case you have spare resources and you would like to donate it to Armbian, you can do it this way:
Expand Down