forked from termux-play-store/termux-packages
-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (78 loc) · 2.5 KB
/
packages.yml
File metadata and controls
85 lines (78 loc) · 2.5 KB
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
85
name: Packages
on:
push:
branches:
- main
- dev
- 'dev/**'
paths:
- 'packages/**'
- 'root-packages/**'
- 'x11-packages/**'
pull_request:
paths:
- 'packages/**'
- 'root-packages/**'
- 'x11-packages/**'
workflow_dispatch:
inputs:
packages:
description: "A space-separated names of packages selected for rebuilding"
required: true
free-space:
description: "Free space even if not building large package (useful when building a large number of packages)"
type: boolean
default: false
permissions: {} # none
concurrency:
# if this is a PR event, group = "pr-<number>", otherwise group = run_id so it never collides with other runs
group: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }}
# only cancel in-progress when it’s a PR
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
permissions:
contents: read # actions/upload-artifact doesn't need contents: write
runs-on: ubuntu-24.04
strategy:
matrix:
target_arch: [aarch64, x86_64]
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 1000
- name: Lint packages
run: |
declare -a package_recipes=()
for repo_path in $(jq --raw-output 'del(.pkg_format) | keys | .[]' repo.json); do
repo=$(jq --raw-output '.["'${repo_path}'"].name' repo.json)
if [ -f "./built_${repo}_packages.txt" ]; then
package_recipes+=($(cat "./built_${repo}_packages.txt" | repo_path="${repo_path}" awk '{print ENVIRON["repo_path"]"/"$1"/build.sh"}'))
fi
done
if [[ "${#package_recipes[@]}" -gt 0 ]]; then
./scripts/lint-packages.sh "${package_recipes[@]}"
fi
test-buildorder-random:
permissions:
contents: read
runs-on: ubuntu-slim
steps:
- name: Clone repository
uses: actions/checkout@v6
- name: Randomise buildorder.py test
run: ./scripts/bin/test-buildorder-random
- name: Randomise buildorder.py test (aarch64)
env:
TERMUX_ARCH: aarch64
run: ./scripts/bin/test-buildorder-random
- name: Randomise buildorder.py test (arm)
env:
TERMUX_ARCH: arm
run: ./scripts/bin/test-buildorder-random
- name: Randomise buildorder.py test (x86_64)
env:
TERMUX_ARCH: x86_64
run: ./scripts/bin/test-buildorder-random