-
-
Notifications
You must be signed in to change notification settings - Fork 498
84 lines (84 loc) · 3.19 KB
/
dietpi-software.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: DietPi-Software test
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: [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'
test:
description: 'Install test builds from dietpi.com'
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.arch }}-${{ github.event.inputs.dist }}-${{ github.event.inputs.soft }}
cancel-in-progress: true
permissions: {}
jobs:
prep:
# https://github.com/actions/runner-images
runs-on: ubuntu-24.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='["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: bullseye }
- { arch: riscv64, dist: bookworm }
fail-fast: false
name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}"
# aarch64 test in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail:
# Processing triggers for libc-bin (2.31-13+deb11u10) ...
# qemu: uncaught target signal 11 (Segmentation fault) - core dumped
runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.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 }}' -t '${{ github.event.inputs.test }}'