Skip to content

Merge pull request #72 from scruffaluff/feature/remove-bloatware #589

Merge pull request #72 from scruffaluff/feature/remove-bloatware

Merge pull request #72 from scruffaluff/feature/remove-bloatware #589

Workflow file for this run

# GitHub Actions workflow file.
#
# For more information, visit
# https://docs.github.com/actions/learn-github-actions.
---
name: test
# Makes workflow run on push or pull request to the main branch.
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
inputs:
debug:
default: false
description: Use Tmate session for debugging
type: boolean
job:
default: debian
description: CI job to run
options:
- alpine
- arch
- debian
- fedora
- freebsd
- macos
- suse
- ubuntu
- windows
type: choice
platform:
default: amd64
description: Docker architecture platform
options:
- amd64
- arm64
type: choice
jobs:
alpine:
name: Test bootstrapping software for Alpine Linux
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'alpine' }}
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
build-args: test=true
context: .
file: tests/integration/alpine.dockerfile
platforms: linux/${{ inputs.platform || 'amd64' }}
push: false
tags: docker.io/scruffaluff/bootware:alpine
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
arch:
name: Test bootstrapping software for Arch Linux
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'arch' }}
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
build-args: test=true
context: .
file: tests/integration/arch.dockerfile
platforms: linux/${{ inputs.platform || 'amd64' }}
push: false
tags: docker.io/scruffaluff/bootware:arch
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
debian:
name: Test bootstrapping software for Debian Linux
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'debian' }}
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
build-args: test=true
context: .
file: tests/integration/debian.dockerfile
platforms: linux/${{ inputs.platform || 'amd64' }}
push: false
tags: docker.io/scruffaluff/bootware:debian
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
fedora:
name: Test bootstrapping software for Fedora Linux
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'fedora' }}
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
build-args: test=true
context: .
file: tests/integration/fedora.dockerfile
platforms: linux/${{ inputs.platform || 'amd64' }}
push: false
tags: docker.io/scruffaluff/bootware:fedora
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
freebsd:
name: Test bootstrapping software for FreeBSD
# Removed from default test suite until
# https://github.com/vmactions/freebsd-vm supports MacOS and CPU
# acceleration again to avoid action timeouts.
if: >-
${{ github.event_name == 'workflow_dispatch' && inputs.job == 'freebsd' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test installation, setup, and bootstrapping
env:
BOOTWARE_GITHUB_TOKEN: ${{ github.token }}
uses: vmactions/freebsd-vm@v1
with:
envs: BOOTWARE_GITHUB_TOKEN
prepare: |
sudo freebsd-update fetch
sudo freebsd-update install
pkg install --yes curl
release: "14.1"
run: |
set -eou pipefail
./install.sh
./bootware.sh setup
./bootware.sh bootstrap --dev --no-passwd --retries 3 --tags desktop,extras
bash -c 'source $HOME/.bashrc && tests/integration/roles.test.ts --arch amd64 freebsd'
usesh: true
# To login into the FreeBSD VM from the MacOS runner, execute `ssh -t
# freebsd` and `cd /root/work/bootware/bootware`.
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
macos:
name: Test bootstrapping software for MacOS
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'macos' }}
runs-on: macos-latest
steps:
- name: Free disk space
run: rm -fr "${HOME}/Library/Android" "${HOME}/Library/Developer"
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Bootware
run: |
./install.sh
sudo cp bootware.sh $(which bootware)
- name: Install dependencies for Bootware
run: bootware setup
- name: Test bootstrapping
env:
BOOTWARE_GITHUB_TOKEN: ${{ github.token }}
run: >-
bootware bootstrap --dev --no-passwd --retries 3 --tags desktop,extras
# Yazi hangs during startup on GitHub Arm64 MacOS runners.
- name: Test installed binaries for roles
run: |
source ${HOME}/.bashrc
node tests/integration/roles.test.cjs --arch arm64 --skip yazi macos
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
package:
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'package' }}
name: Test building a ${{ matrix.package }} package
strategy:
fail-fast: false
matrix:
package:
- alpm
- apk
- brew
- deb
- rpm
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Test building package
run: scripts/package.sh test ${{ matrix.package }}
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
suse:
name: Test bootstrapping software for Suse Linux
if: >-
${{ github.event_name == 'workflow_dispatch' && inputs.job == 'suse' }}
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
build-args: test=true
context: .
file: tests/integration/suse.dockerfile
platforms: linux/${{ inputs.platform || 'amd64' }}
push: false
tags: docker.io/scruffaluff/bootware:suse
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
ubuntu:
name: Test Bootware collection on Ubuntu Linux
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'ubuntu' }}
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
build-args: test=true
context: .
file: tests/integration/ubuntu.dockerfile
platforms: linux/${{ inputs.platform || 'amd64' }}
push: false
tags: docker.io/scruffaluff/bootware:ubuntu
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3
windows:
name: Test bootstrapping software for Windows
if: >-
${{ github.event_name != 'workflow_dispatch' || inputs.job == 'windows' }}
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: Vampire/setup-wsl@v3
with:
# Setup WSL uses the version 11 for Debian which has an out of date
# version of Ansible.
distribution: Ubuntu-24.04
set-as-default: "true"
# Variable ${{ github.ref_name }} does not replace this step, since
# ref_name will be name of the pull request instead of the branch.
- name: Get current branch
id: branch
uses: tj-actions/branch-names@v8
- name: Install Bootware
run: |
./install.ps1 --version ${{ steps.branch.outputs.current_branch }}
Copy-Item -Destination "C:/Program Files/Bootware/bootware.ps1" -Path "./bootware.ps1"
shell: powershell
# The GitHub Windows server does not seem to update its path correctly.
# Appears to work on other Windows servers. Default shell must be older
# version of PowerShell only GitHub hosted Windows runner to prevent
# "xml.etree.ElementTree.ParseError" errors during Bootware PowerShell
# role.
- name: Install dependencies for Bootware
run: |
$Env:Path = "C:\Program Files\Bootware;$Env:Path"
bootware setup --checkout ${{ steps.branch.outputs.current_branch }}
New-ItemProperty `
-Force `
-Name DefaultShell `
-Path 'HKLM:\SOFTWARE\OpenSSH' `
-PropertyType String `
-Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
shell: powershell
- name: Log all firewall rules on Windows host
run: Get-NetFirewallRule -All
shell: powershell
# IdentitiesOnly is required to avoid an infinite wait for user password
# input if the private key is rejected. Localhost is used since
# Vampire/setup-wsl@v2 sets up WSL version 1.
- name: Test SSH connection from WSL to Windows host
run: >-
wsl ssh -vvv -i '$HOME/.ssh/bootware' -o IdentitiesOnly=yes -o
StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
$Env:UserName@127.0.0.1 dir
shell: powershell
- name: Copy Bootware configuration file
run: |
$Env:Path = "C:\Program Files\Bootware;$Env:Path"
bootware config --empty
shell: powershell
# Scoop FFSend and Qsv installers are broken as of 12/19/2023 and
# 03/09/2024 respectively due to hash checksum issues. As of 09/08/2024,
# QEMU installer experiences timeout issues.
- name: Test bootstrapping
env:
BOOTWARE_GITHUB_TOKEN: ${{ github.token }}
run: |
$Env:Path = "C:\Program Files\Bootware;$Env:Path"
bootware bootstrap --dev --no-setup --retries 3 --skip ffsend,qemu,qsv --tags desktop,extras
shell: powershell
# The GitHub Windows server does not seem to update its path correctly.
# Appears to work on other Windows servers. LLDB is already installed on
# Github hosted runner and is broken.
- name: Test installed binaries for roles
run: |
$Env:Path = "C:\Program Files\Datree;C:\Program Files\Deno\bin;C:\Program Files\Kubeshark;C:\ProgramData\scoop\shims;$HOME\.krew\bin;$HOME\scoop\shims;$HOME\scoop\apps\qemu\current;$Env:LocalAppData\Programs\mongosh;$Env:Path"
node tests/integration/roles.test.cjs --arch amd64 --skip ffsend,lldb,qemu,qsv windows
- name: Setup Tmate session if debug enabled
if: >-
${{ always() && github.event_name == 'workflow_dispatch' &&
inputs.debug }}
timeout-minutes: 60
uses: mxschmitt/action-tmate@v3