-
Notifications
You must be signed in to change notification settings - Fork 12
90 lines (81 loc) · 2.78 KB
/
Build.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
85
86
87
88
89
90
name: Build
on:
push:
branches: [ "master", "dev"]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
# Job1: Prepare list of configrations for Job2
prepare-build:
runs-on: ubuntu-latest
outputs:
builds: ${{ steps.prepare-builds.outputs.builds }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate builds list
id: prepare-builds
run: |
pip3 install toml-cli
builds=($(toml get builds --toml-path ./builds.toml | tr -d "[],'"))
builds_out=()
for build in ${builds[@]} ; do
distro_codename=($(toml get ${build}.distro_codename --toml-path ./builds.toml))
bsp_version=($(toml get ${distro_codename}.bsp_version --toml-path ./configs/bsp_sources.toml))
builds_out+=("${build}-${bsp_version}")
done
output_string="["
for build in ${builds[@]}
do
output_string="${output_string}""\"${build}\","
done
output_string="${output_string::-1}""]"
echo "builds=${output_string}" >> $GITHUB_OUTPUT
# Job2: Actual build job
build:
runs-on: ubuntu-latest
needs: prepare-build
strategy:
matrix:
builds: ${{ fromJson(needs.prepare-build.outputs.builds) }}
name: ${{ matrix.builds }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt upgrade
sudo apt install -y \
pigz expect pv \
binfmtc binfmt-support \
qemu-user qemu-user-static qemu-system-arm \
debian-archive-keyring bdebstrap \
build-essential autoconf automake \
bison flex libssl-dev \
bc u-boot-tools swig python3-pyelftools \
gcc-aarch64-linux-gnu \
gpg curl
sudo apt install --fix-broken
sudo pip3 install toml-cli
sudo pip3 install yamllint
curl -s --compressed https://texasinstruments.github.io/ti-debpkgs/KEY.gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/ti-debpkgs.gpg > /dev/null
- name: Build ${{ matrix.builds }}
run: |
mkdir -p build
sudo ./build.sh ${{ matrix.builds }}
- name: Upload ${{ matrix.builds_out }}
uses: actions/[email protected]
with:
path: build/${{ matrix.builds_out }}.tar.xz
name: ${{ matrix.builds_out }}
if-no-files-found: error
- name: Upload ${{ matrix.builds }}.log
uses: actions/[email protected]
with:
path: logs/${{ matrix.builds }}.log
name: ${{ matrix.builds }}.log
if-no-files-found: error