Attempt to debug failure to detect UART NMEA GPS reliably. #464
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
name: Build Image | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
push: | |
schedule: | |
- cron: '0 0 1 * *' | |
# TODO: These jobs are so similar except for just ssh. | |
# I'd love to find a way to not have so much repetition between these configurations. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize Build Space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 10240 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: List Available Space | |
run: | | |
echo "Free space:" | |
df -h | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y coreutils quilt parted qemu-user-static debootstrap zerofree zip dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc qemu-utils kpartx gpg | |
- name: Checkout SimpleAQ-Device | |
uses: actions/checkout@v3 | |
with: | |
path: SimpleAQ-Device | |
# We will periodically have to update PiGen to a newer version. | |
# Because we've been broken by them in the past, we pin the version to prevent us from being broken by them. | |
- name: Checkout PiGen | |
uses: actions/checkout@v3 | |
with: | |
repository: 'RPi-Distro/pi-gen' | |
path: PiGen | |
fetch-depth: 1 | |
ref: 9249e146d2e3987adf2ea0e5e19e295d37f3f886 | |
# This is where we install all of our PiGen extras. | |
# Helpful: https://geoffhudik.com/tech/2020/05/15/using-pi-gen-to-build-a-custom-raspbian-lite-image/ | |
- name: Install Custom PiGen Files | |
run: | | |
cd PiGen | |
mkdir SimpleAQ-Device | |
cd .. | |
cd SimpleAQ-Device | |
cp -R * ../PiGen/SimpleAQ-Device/ | |
cd custom_pigen | |
cp -R * ../../PiGen/ | |
# See README at https://github.com/RPi-Distro/pi-gen | |
- name: Create Config File | |
id: config | |
run: | | |
cd PiGen | |
NOW=$(date +"%Y-%m-%d-%H%M") | |
IMAGE=SimpleAQ-${GITHUB_REF##*/}-$NOW | |
echo IMG_NAME=$IMAGE > config | |
echo DEPLOY_COMPRESSION=none >> config | |
echo TARGET_HOSTNAME=simpleaq >> config | |
echo TIMEZONE_DEFAULT=Etc/UTC >> config | |
echo FIRST_USER_NAME=pi >> config | |
echo FIRST_USER_PASS=simpleaq >> config | |
echo LOCALE_DEFAULT=en_US.UTF-8 >> config | |
echo KEYBOARD_KEYMAP=us >> config | |
echo KEYBOARD_LAYOUT=\"English\ \(US\)\" >> config | |
echo DISABLE_FIRST_BOOT_USER_RENAME=1 >> config | |
echo "image=$IMAGE" >> $GITHUB_OUTPUT | |
# Greatly speed up our build because we don't need a desktop | |
# or anything more advanced for our little IoT devices. | |
- name: Disable Non-Lite Builds | |
run: | | |
cd PiGen | |
touch ./stage3/SKIP ./stage4/SKIP ./stage5/SKIP | |
touch ./stage4/SKIP_IMAGES ./stage5/SKIP_IMAGES | |
- name: Build Image | |
run: | | |
cd PiGen | |
./build-docker.sh | |
# Pi-Gen does weird things with the image file name, so let's make sure we have it right. | |
- name: Get Image Name | |
id: imagefile | |
run: | | |
cd PiGen | |
cd deploy | |
ls | |
IMAGE_FILE=$(ls *.img) | |
echo "imagefile=$IMAGE_FILE" >> $GITHUB_OUTPUT | |
# The image now exists in deploy/. Let's save it somewhere. | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: ${{ steps.config.outputs.image }} | |
path: PiGen/deploy/${{ steps.imagefile.outputs.imagefile }} | |
build_debug: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize Build Space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 10240 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: List Available Space | |
run: | | |
echo "Free space:" | |
df -h | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y coreutils quilt parted qemu-user-static debootstrap zerofree zip dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc qemu-utils kpartx gpg | |
- name: Checkout SimpleAQ-Device | |
uses: actions/checkout@v3 | |
with: | |
path: SimpleAQ-Device | |
# We will periodically have to update PiGen to a newer version. | |
# Because we've been broken by them in the past, we pin the version to prevent us from being broken by them. | |
- name: Checkout PiGen | |
uses: actions/checkout@v3 | |
with: | |
repository: 'RPi-Distro/pi-gen' | |
path: PiGen | |
fetch-depth: 1 | |
ref: 9249e146d2e3987adf2ea0e5e19e295d37f3f886 | |
# This is where we install all of our PiGen extras. | |
# Helpful: https://geoffhudik.com/tech/2020/05/15/using-pi-gen-to-build-a-custom-raspbian-lite-image/ | |
- name: Install Custom PiGen Files | |
run: | | |
cd PiGen | |
mkdir SimpleAQ-Device | |
cd .. | |
cd SimpleAQ-Device | |
cp -R * ../PiGen/SimpleAQ-Device/ | |
cd custom_pigen | |
cp -R * ../../PiGen/ | |
# See README at https://github.com/RPi-Distro/pi-gen | |
- name: Create Config File | |
id: debugconfig | |
run: | | |
cd PiGen | |
NOW=$(date +"%Y-%m-%d-%H%M") | |
IMAGE=INSECURE-DEBUG-SimpleAQ-${GITHUB_REF##*/}-$NOW | |
echo IMG_NAME=$IMAGE > config | |
echo DEPLOY_COMPRESSION=none >> config | |
echo ENABLE_SSH=1 >> config | |
echo TARGET_HOSTNAME=simpleaq >> config | |
echo TIMEZONE_DEFAULT=Etc/UTC >> config | |
echo FIRST_USER_NAME=pi >> config | |
echo FIRST_USER_PASS=simpleaq >> config | |
echo LOCALE_DEFAULT=en_US.UTF-8 >> config | |
echo KEYBOARD_KEYMAP=us >> config | |
echo KEYBOARD_LAYOUT=\"English\ \(US\)\" >> config | |
echo DISABLE_FIRST_BOOT_USER_RENAME=1 >> config | |
echo "image=$IMAGE" >> $GITHUB_OUTPUT | |
# Greatly speed up our build because we don't need a desktop | |
# or anything more advanced for our little IoT devices. | |
- name: Disable Non-Lite Builds | |
run: | | |
cd PiGen | |
touch ./stage3/SKIP ./stage4/SKIP ./stage5/SKIP | |
touch ./stage4/SKIP_IMAGES ./stage5/SKIP_IMAGES | |
- name: Build Image | |
run: | | |
cd PiGen | |
./build-docker.sh | |
# Pi-Gen does weird things with the image file name, so let's make sure we have it right. | |
- name: Get Image Name | |
id: debugimagefile | |
run: | | |
cd PiGen | |
cd deploy | |
ls | |
IMAGE_FILE=$(ls *.img) | |
echo "imagefile=$IMAGE_FILE" >> $GITHUB_OUTPUT | |
# The image now exists in deploy/. Let's save it somewhere. | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: ${{ steps.debugconfig.outputs.image }} | |
path: PiGen/deploy/${{ steps.debugimagefile.outputs.imagefile }} | |