diff --git a/.github/workflows/build-os-bookworm.yml b/.github/workflows/build-os-bookworm.yml index b8472a71d..06b725e93 100644 --- a/.github/workflows/build-os-bookworm.yml +++ b/.github/workflows/build-os-bookworm.yml @@ -31,15 +31,6 @@ concurrency: jobs: build: name: build - strategy: - fail-fast: false - matrix: - variant: - - adafruithat - - planktoscopehat - - fairscope-latest - base_variant_name: - - lite permissions: contents: read packages: write @@ -49,8 +40,7 @@ jobs: with: name: planktoscope base_release_name: bookworm - base_image_variant: ${{ matrix.base_variant_name }} + base_image_variant: lite base_release_date: 2025-05-13 base_file_release_date: 2025-05-13 arch: arm64 - variant: ${{ matrix.variant }} diff --git a/.github/workflows/build-os.yml b/.github/workflows/build-os.yml index 982b980d9..a5deb118a 100644 --- a/.github/workflows/build-os.yml +++ b/.github/workflows/build-os.yml @@ -26,10 +26,6 @@ on: description: 'The CPU architecture of the OS (armhf, arm64)' required: true type: string - variant: - description: 'The name of the RPi OS base image variant (none, segmenter-only, adafruithat, planktoscopehat)' - required: true - type: string jobs: build-os-image: @@ -153,7 +149,7 @@ jobs: ACTUAL_SHA="$(printf "%.7s" "${{ env.ACTUAL_SHA }}")" /run/os-setup/os/ci-record-version.sh \ "github.com/${{ env.REPO }}" "$ACTUAL_SHA" "hash" \ - "${{ inputs.variant }}" "/run/os-setup" + "/run/os-setup" echo "installer-config.yml:" cat /usr/share/planktoscope/installer-config.yml echo "installer-versioning.yml:" @@ -276,7 +272,7 @@ jobs: run: | echo "Running setup scripts..." export DEBIAN_FRONTEND=noninteractive - /run/os-setup/os/setup.sh ${{ inputs.variant }} + /run/os-setup/os/setup.sh echo "Done!" - name: Prepare for a headless first boot on bare metal @@ -330,7 +326,7 @@ jobs: else version="$(printf "%.7s" "${{ github.sha }}")" fi - variant="${{ inputs.variant }}" + variant="" if [[ "${{ inputs.base_release_name }}" != "bookworm" ]]; then variant="$variant.${{ inputs.base_release_name }}" fi diff --git a/os/ci-record-version.sh b/os/ci-record-version.sh index 652a9f891..6f7379866 100755 --- a/os/ci-record-version.sh +++ b/os/ci-record-version.sh @@ -5,7 +5,6 @@ # REPO (the repo used for setup, e.g. github.com/PlanktoScope/PlanktoScope) # VERSION_QUERY (the version query, e.g. a commit hash) # QUERY_TYPE (eitiher branch, tag, or hash) -# HARDWARE (either none, adafruithat, or planktoscopehat) # VERSION_QUERY_DIR (the filesystem path of the git repo used for getting version info) # Utilities for user interaction @@ -99,7 +98,6 @@ main() { info "${BOLD}Repo${NO_COLOR}: ${GREEN}${pretty_repo}${NO_COLOR}" info "${BOLD}Version query${NO_COLOR}: ${GREEN}${VERSION_QUERY}${NO_COLOR}" info "${BOLD}Query type${NO_COLOR}: ${GREEN}${QUERY_TYPE}${NO_COLOR}" - info "${BOLD}Hardware${NO_COLOR}: ${GREEN}${HARDWARE}${NO_COLOR}" if [ -n "${VERBOSE-}" ]; then VERBOSE=v info "${BOLD}Tag prefix${NO_COLOR}: $(with_empty_placeholder "${TAG_PREFIX}")" @@ -160,7 +158,6 @@ main() { "repo" "${pretty_repo}" \ "version-query" "${VERSION_QUERY}" \ "query-type" "${QUERY_TYPE}" \ - "hardware" "${HARDWARE}" \ "tag-prefix" "${TAG_PREFIX}" \ "setup-entrypoint" "${SETUP_ENTRYPOINT}" \ | sudo tee --append "${installer_config_file}" > /dev/null @@ -183,8 +180,7 @@ main() { REPO="$1" VERSION_QUERY="$2" QUERY_TYPE="$3" -HARDWARE="$4" -VERSION_QUERY_DIR="$5" +VERSION_QUERY_DIR="$4" # Set default values for the command-line arguments if [ -z "${REPO-}" ]; then @@ -200,11 +196,6 @@ if [ -z "${QUERY_TYPE-}" ]; then error "QUERY_TYPE environment variable was not set!" exit 1 fi -DEFAULT_HARDWARE="planktoscopehat" -if [ -z "${HARDWARE-}" ]; then - error "HARDWARE environment variable was not set!" - exit 1 -fi DEFAULT_TAG_PREFIX="software/" if [ -z "${TAG_PREFIX-}" ]; then TAG_PREFIX="${DEFAULT_TAG_PREFIX}" diff --git a/os/cleanup.sh b/os/cleanup.sh index 7d44389f9..47bfe35e3 100755 --- a/os/cleanup.sh +++ b/os/cleanup.sh @@ -5,10 +5,6 @@ setup_scripts_root=$(dirname $(realpath $BASH_SOURCE)) -# Get command-line args - -hardware_type="$1" # should be either none, adafruithat, or planktoscopehat - # Set up pretty error printing red_fg=31 @@ -35,16 +31,12 @@ function panic { # Run sub-scripts -if [ $hardware_type = "none" ]; then - echo "Warning: skipping PlanktoScope-specific setup because hardware type was specified as: $hardware_type" +description="remove unnecessary artifacts from the PlanktoScope application environment" +report_starting "$description" +if $setup_scripts_root/planktoscope-app-env/cleanup.sh ; then + report_finished "$description" else - description="remove unnecessary artifacts from the PlanktoScope application environment" - report_starting "$description" - if $setup_scripts_root/planktoscope-app-env/cleanup.sh ; then - report_finished "$description" - else - panic "$description" - fi + panic "$description" fi description="remove unnecessary artifacts from the base operating system" diff --git a/os/planktoscope-app-env/node-red-frontend/install.sh b/os/planktoscope-app-env/node-red-frontend/install.sh index 56488084e..94b409c60 100755 --- a/os/planktoscope-app-env/node-red-frontend/install.sh +++ b/os/planktoscope-app-env/node-red-frontend/install.sh @@ -4,14 +4,6 @@ # Determine the base path for copied files config_files_root=$(dirname "$(realpath "$BASH_SOURCE")") -# Get command-line args -hardware_type="$1" # should be either adafruithat, planktoscopehat, or fairscope-latest -default_config="$hardware_type-latest" -if [ "$hardware_type" = "fairscope-latest" ]; then - hardware_type="planktoscopehat" - default_config="fairscope-latest" -fi - # Install dependencies # smbus is needed by some python3 nodes in the Node-RED dashboard for the Adafruit HAT. # Since the Node-RED systemd service runs as the pi user by default (and we don't override that @@ -38,9 +30,6 @@ sudo cp $config_files_root/30-override.conf /etc/systemd/system/nodered.service. sudo systemctl enable nodered.service rm -rf /home/pi/.node-red -cp "$HOME/PlanktoScope/default-configs/$default_config.config.json" \ - "$HOME"/PlanktoScope/config.json - # Configure node-red npm --prefix "$HOME/PlanktoScope/node-red/nodes" install --omit=dev npm --prefix "$HOME/PlanktoScope/node-red" install --omit=dev diff --git a/os/planktoscope-app-env/python-hardware-controller/install.sh b/os/planktoscope-app-env/python-hardware-controller/install.sh index 923fd5880..08698e285 100755 --- a/os/planktoscope-app-env/python-hardware-controller/install.sh +++ b/os/planktoscope-app-env/python-hardware-controller/install.sh @@ -6,16 +6,6 @@ config_files_root="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" distro_setup_files_root="$(dirname "$(dirname "$config_files_root")")" -# Get command-line args -hardware_type="$1" # should be either adafruithat, planktoscopehat, or fairscope-latest -default_config="$hardware_type-latest" -case "$hardware_type" in -"fairscope-latest") - hardware_type="planktoscopehat" - default_config="fairscope-latest" - ;; -esac - ## Install basic tooling sudo -E apt-get install -y -o Dpkg::Progress-Fancy=0 \ git python3-pip python3-venv pipx diff --git a/os/planktoscope-app-env/setup.sh b/os/planktoscope-app-env/setup.sh index c70f927bb..94ddbeb96 100755 --- a/os/planktoscope-app-env/setup.sh +++ b/os/planktoscope-app-env/setup.sh @@ -11,8 +11,6 @@ build_scripts_root=$(dirname "$(realpath "$BASH_SOURCE")") # Get command-line args -hardware_type="$1" # should be either adafruithat, planktoscopehat, fairscope-latest - # Set up pretty error printing red_fg=31 @@ -47,7 +45,7 @@ fi description="set up Node-RED frontend" report_starting "$description" -if "$build_scripts_root/node-red-frontend/install.sh" "$hardware_type"; then +if "$build_scripts_root/node-red-frontend/install.sh"; then report_finished "$description" else panic "$description" @@ -55,7 +53,7 @@ fi description="set up Python hardware controller" report_starting "$description" -if "$build_scripts_root/python-hardware-controller/install.sh" "$hardware_type"; then +if "$build_scripts_root/python-hardware-controller/install.sh"; then report_finished "$description" else panic "$description" diff --git a/os/setup.sh b/os/setup.sh index 7303c4931..a1b0c960f 100755 --- a/os/setup.sh +++ b/os/setup.sh @@ -9,10 +9,6 @@ setup_scripts_root=$(dirname "$(realpath "$BASH_SOURCE")") -# Get command-line args - -hardware_type="$1" # should be either none, adafruithat, planktoscopehat, or fairscope-latest - # Set up pretty error printing red_fg=31 @@ -50,17 +46,13 @@ else panic "$description" fi -if [ "$hardware_type" = "none" ]; then - echo "Warning: skipping PlanktoScope-specific setup because hardware type was specified as: $hardware_type" +description="set up PlanktoScope application environment" +report_starting "$description" +if "$setup_scripts_root"/planktoscope-app-env/setup.sh; then + report_finished "$description" + source "$setup_scripts_root"/planktoscope-app-env/export-env.sh else - description="set up PlanktoScope application environment" - report_starting "$description" - if "$setup_scripts_root"/planktoscope-app-env/setup.sh "$hardware_type"; then - report_finished "$description" - source "$setup_scripts_root"/planktoscope-app-env/export-env.sh - else - panic "$description" - fi + panic "$description" fi -"$setup_scripts_root"/cleanup.sh "$hardware_type" +"$setup_scripts_root"/cleanup.sh