DietPi-Software test #134
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: DietPi-Software | |
on: | |
workflow_dispatch: | |
inputs: | |
arch: | |
description: 'Target architecture' | |
type: choice | |
options: [armv6l, armv7l, aarch64, x86_64, riscv64, all] | |
default: all | |
required: true | |
dist: | |
description: 'Target Debian version' | |
type: choice | |
options: [buster, bullseye, bookworm, trixie, all] | |
default: all | |
required: true | |
soft: | |
description: 'Software ID(s) to test (space separated)' | |
required: true | |
rpi: | |
description: 'Emulate RPi on ARM targets' | |
type: boolean | |
default: false | |
branch: | |
description: 'Override target repo branch' | |
owner: | |
description: 'Override target repo owner' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.inputs.arch }}-${{ github.event.inputs.dist }}-${{ github.event.inputs.soft }} | |
cancel-in-progress: true | |
permissions: {} | |
defaults: | |
run: | |
#working-directory: /dev/shm # uses too much RAM which can lead to OOM kills | |
shell: sh | |
jobs: | |
prep: | |
# https://github.com/actions/runner-images | |
runs-on: ubuntu-22.04 | |
steps: | |
- id: arch | |
run: | | |
if [ '${{ github.event.inputs.arch }}' = 'all' ] | |
then | |
echo arch='["armv6l", "armv7l", "aarch64", "x86_64", "riscv64"]' >> "$GITHUB_OUTPUT" | |
else | |
echo arch='["${{ github.event.inputs.arch }}"]' >> "$GITHUB_OUTPUT" | |
fi | |
- id: dist | |
run: | | |
if [ '${{ github.event.inputs.dist }}' = 'all' ] | |
then | |
echo dist='["buster", "bullseye", "bookworm", "trixie"]' >> "$GITHUB_OUTPUT" | |
else | |
echo dist='["${{ github.event.inputs.dist }}"]' >> "$GITHUB_OUTPUT" | |
fi | |
outputs: | |
arch: ${{ steps.arch.outputs.arch }} | |
dist: ${{ steps.dist.outputs.dist }} | |
install: | |
needs: prep | |
strategy: | |
matrix: | |
arch: ${{ fromJson(needs.prep.outputs.arch) }} | |
dist: ${{ fromJson(needs.prep.outputs.dist) }} | |
exclude: | |
- { arch: riscv64, dist: buster } | |
- { arch: riscv64, dist: bullseye } | |
- { arch: riscv64, dist: bookworm } | |
- { arch: armv6l, dist: trixie } | |
fail-fast: false | |
name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install | |
run: | | |
owner='${{ github.event.inputs.owner }}' | |
[ $owner ] || owner=$GITHUB_REPOSITORY_OWNER | |
branch='${{ github.event.inputs.branch }}' | |
[ $branch ] || branch=$GITHUB_REF_NAME | |
sudo systemctl --now mask ssh mono-xsp4 systemd-resolved | |
echo 'nameserver 1.1.1.1' | sudo tee /etc/resolv.conf > /dev/null | |
sudo bash -c "G_GITOWNER=$owner G_GITBRANCH=$branch; $(curl -sSf "https://raw.githubusercontent.com/$owner/DietPi/$branch/.github/workflows/dietpi-software.bash" || echo false)" -- -a '${{ matrix.arch }}' -d '${{ matrix.dist }}' -s '${{ github.event.inputs.soft }}' -rpi '${{ github.event.inputs.rpi }}' |