-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added build and integration test steps to the manual workflow.
- Loading branch information
Ivan Davidov
committed
Jul 22, 2021
1 parent
2eed414
commit b527198
Showing
7 changed files
with
166 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
# This script shuts down the OS after one minute. | ||
sleep 30 && poweroff & | ||
|
||
cat << CEOF | ||
[1m Minimal Linux Live will shut down in 30 seconds.[0m | ||
CEOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh | ||
|
||
# This script is supposed to be executed by GitHub workflow. | ||
|
||
set -e | ||
|
||
cd ../src | ||
|
||
sudo apt-get -qq -y install wget make gawk gcc bc xz-utils bison flex xorriso libelf-dev libssl-dev | ||
|
||
PREFIXES="00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16" | ||
|
||
for PREFIX in ${PREFIXES} | ||
do | ||
SCRIPTS=`ls ${PREFIX}_*.sh` | ||
for SCRIPT in ${SCRIPTS} | ||
do | ||
echo "`date` | Running script '${SCRIPT}'." | ||
set +e | ||
./${SCRIPT} > /tmp/mll.log 2>&1 | ||
set -e | ||
|
||
if [ "$?" = "0" ] ; then | ||
echo "`date` | Success." | ||
tail -n 40 /tmp/mll.log | ||
echo "*** *** ***" | ||
else | ||
echo "`date` | !!! FAILURE !!!" | ||
tail -n 1000 /tmp/mll.log | ||
exit 1 | ||
fi | ||
done | ||
done | ||
|
||
cat << CEOF | ||
###################### | ||
# # | ||
# MLL build is OK. # | ||
# # | ||
###################### | ||
CEOF | ||
|
||
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# This script is supposed to be executed by GitHub workflow. | ||
|
||
set -e | ||
|
||
# Apply GitHub workflow specific patches | ||
mkdir -p ../src/minimal_overlay/rootfs/etc/autorun | ||
cp 99_autoshutdown.sh ../src/minimal_overlay/rootfs/etc/autorun | ||
chmod +x ../src/minimal_overlay/rootfs/etc/autorun/99_autoshutdown.sh | ||
cp -f syslinux.cfg ../src/minimal_boot/bios/boot/syslinux/syslinux.cfg | ||
sed -i "s|OVERLAY_LOCATION.*|OVERLAY_LOCATION=rootfs|" ../src/.config | ||
|
||
sudo apt-get -qq -y update | ||
sudo apt-get -qq -y upgrade | ||
|
||
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SERIAL 0 | ||
DEFAULT operatingsystem | ||
LABEL operatingsystem | ||
LINUX /boot/kernel.xz | ||
APPEND console=tty0 console=ttyS0 | ||
INITRD /boot/rootfs.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
# This script is supposed to be executed by GitHub workflow. | ||
|
||
set -e | ||
|
||
cd ../src | ||
|
||
echo "`date` | *** MLL Docker test - BEGIN ***" | ||
|
||
docker import mll_image.tgz minimal-linux-live:latest | ||
docker run minimal-linux-live /bin/cat /etc/motd | ||
|
||
echo "`date` | *** MLL Docker test - END ***" | ||
|
||
cat << CEOF | ||
######################### | ||
# # | ||
# Docker test passed. # | ||
# # | ||
######################### | ||
CEOF | ||
|
||
set +e | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
# This script is supposed to be executed by GitHub workflow. | ||
|
||
set -e | ||
|
||
cd ../src | ||
|
||
sudo apt-get -qq -y install qemu-system-x86-64 | ||
|
||
echo "`date` | *** MLL QEMU test - BEGIN ***" | ||
|
||
qemu-system-x86_64 -m 256M -cdrom minimal_linux_live.iso -boot d -nographic & | ||
|
||
sleep 5 | ||
|
||
if [ "`ps -ef | grep -i [q]emu-system-x86_64`" = "" ] ; then | ||
echo "`date` | !!! FAILURE !!! Minimal Linux Live is not running in QEMU." | ||
exit 1 | ||
else | ||
echo "`date` | Minimal Linux Live is running in QEMU. Waiting 120 seconds for automatic shutdown." | ||
fi | ||
|
||
sleep 120 | ||
|
||
if [ "`ps -ef | grep -i [q]emu-system-x86_64`" = "" ] ; then | ||
echo "`date` | Minimal Linux Live is not running in QEMU." | ||
else | ||
echo "`date` | !!! FAILURE !!! Minimal Linux Live is still running in QEMU." | ||
ps -ef | grep -i [q]emu-system-x86_64 | ||
exit 1 | ||
fi | ||
|
||
echo "`date` | *** MLL QEMU test - END ***" | ||
|
||
cat << CEOF | ||
####################### | ||
# # | ||
# QEMU test passed. # | ||
# # | ||
####################### | ||
CEOF | ||
|
||
set +e | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
name: 'Manual workflow' | ||
name: 'MLL With Integration Tests' | ||
on: 'workflow_dispatch' | ||
jobs: | ||
mll: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Install Prerequisites' | ||
- name: 'Apply Workflow Patches' | ||
run: | | ||
sudo apt install wget make gawk gcc bc bison flex xorriso libelf-dev libssl-dev | ||
- name: 'Build MLL' | ||
cd .github | ||
bash ./github-ci.sh | ||
- name: 'Build Minimal Linux Live' | ||
run: | | ||
cd src | ||
./build_minimal_linux_live.sh | ||
cd .github | ||
bash ./build_mll.sh | ||
- name: 'Test Docker' | ||
run: | | ||
cd .github | ||
bash ./test_docker.sh | ||
- name: 'Test QEMU' | ||
run: | | ||
cd .github | ||
bash ./test_qemu.sh |