Skip to content

Commit c1e5f86

Browse files
committed
Add CI tests for 7 additional wolfBoot configurations
- Add test-build-psoc6.yml workflow for Cypress PSoC6 targets - Add test-build-riscv.yml workflow for RISC-V HiFive1 targets - Add test-build-ti-hercules.yml workflow for TI Hercules TMS570 targets - Enable tests for cypsoc6, hifive1, nxp-ls1028a, nxp-ls1028a-tpm, imx-rt1060_hab, raspi3-encrypted, and ti-tms570lc435 configs
1 parent f6594f6 commit c1e5f86

File tree

4 files changed

+374
-15
lines changed

4 files changed

+374
-15
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Wolfboot Reusable Build Workflow for Cypress PSoC6
2+
3+
on:
4+
5+
workflow_call:
6+
inputs:
7+
arch:
8+
required: true
9+
type: string
10+
config-file:
11+
required: true
12+
type: string
13+
make-args:
14+
required: false
15+
type: string
16+
17+
jobs:
18+
19+
build:
20+
runs-on: ubuntu-24.04
21+
timeout-minutes: 30
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: true
27+
28+
- uses: actions/checkout@v4
29+
with:
30+
repository: Infineon/mtb-pdl-cat1
31+
path: lib/psoc6pdl
32+
33+
- uses: actions/checkout@v4
34+
with:
35+
repository: Infineon/TARGET_CY8CKIT-062S2-43012
36+
path: lib/TARGET_CY8CKIT-062S2-43012
37+
38+
- uses: actions/checkout@v4
39+
with:
40+
repository: Infineon/core-lib
41+
path: lib/core-lib
42+
43+
- name: Workaround for sources.list
44+
run: |
45+
# Replace sources
46+
47+
set -euxo pipefail
48+
49+
# Peek (what repos are active now)
50+
apt-cache policy
51+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
52+
53+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
54+
shopt -s nullglob
55+
56+
echo "Replace sources.list (legacy)"
57+
sudo sed -i \
58+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
59+
/etc/apt/sources.list || true
60+
61+
echo "Replace sources.list.d/*.list (legacy)"
62+
for f in /etc/apt/sources.list.d/*.list; do
63+
sudo sed -i \
64+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
65+
"$f"
66+
done
67+
68+
echo "Replace sources.list.d/*.sources (deb822)"
69+
for f in /etc/apt/sources.list.d/*.sources; do
70+
sudo sed -i \
71+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
72+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
73+
"$f"
74+
done
75+
76+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
77+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
78+
# Replace azure with our mirror (idempotent)
79+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
80+
fi
81+
82+
# Peek (verify changes)
83+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
84+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
85+
echo "--- apt-mirrors.txt ---"
86+
cat /etc/apt/apt-mirrors.txt || true
87+
88+
- name: Update repository
89+
run: sudo apt-get update -o Acquire::Retries=3
90+
91+
- name: Install cross compilers
92+
run: |
93+
sudo apt-get install -y gcc-arm-none-eabi
94+
95+
- name: make clean
96+
run: |
97+
make distclean
98+
99+
- name: Select config
100+
run: |
101+
cp ${{inputs.config-file}} .config
102+
103+
- name: Build tools
104+
run: |
105+
make -C tools/keytools && make -C tools/bin-assemble
106+
107+
- name: Build wolfboot
108+
run: |
109+
make ${{inputs.make-args}}
110+
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Wolfboot Reusable Build Workflow for RISC-V
2+
3+
on:
4+
5+
workflow_call:
6+
inputs:
7+
arch:
8+
required: true
9+
type: string
10+
config-file:
11+
required: true
12+
type: string
13+
make-args:
14+
required: false
15+
type: string
16+
17+
jobs:
18+
19+
build:
20+
runs-on: ubuntu-24.04
21+
timeout-minutes: 30
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: true
27+
28+
- uses: actions/checkout@v4
29+
with:
30+
repository: sifive/freedom-e-sdk
31+
path: freedom-e-sdk
32+
submodules: recursive
33+
34+
- name: Workaround for sources.list
35+
run: |
36+
# Replace sources
37+
38+
set -euxo pipefail
39+
40+
# Peek (what repos are active now)
41+
apt-cache policy
42+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
43+
44+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
45+
shopt -s nullglob
46+
47+
echo "Replace sources.list (legacy)"
48+
sudo sed -i \
49+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
50+
/etc/apt/sources.list || true
51+
52+
echo "Replace sources.list.d/*.list (legacy)"
53+
for f in /etc/apt/sources.list.d/*.list; do
54+
sudo sed -i \
55+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
56+
"$f"
57+
done
58+
59+
echo "Replace sources.list.d/*.sources (deb822)"
60+
for f in /etc/apt/sources.list.d/*.sources; do
61+
sudo sed -i \
62+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
63+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
64+
"$f"
65+
done
66+
67+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
68+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
69+
# Replace azure with our mirror (idempotent)
70+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
71+
fi
72+
73+
# Peek (verify changes)
74+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
75+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
76+
echo "--- apt-mirrors.txt ---"
77+
cat /etc/apt/apt-mirrors.txt || true
78+
79+
- name: Update repository
80+
run: sudo apt-get update -o Acquire::Retries=3
81+
82+
- name: Install RISC-V cross compiler
83+
run: |
84+
sudo apt-get install -y gcc-riscv64-unknown-elf
85+
86+
- name: make clean
87+
run: |
88+
make distclean
89+
90+
- name: Select config
91+
run: |
92+
cp ${{inputs.config-file}} .config
93+
94+
- name: Build tools
95+
run: |
96+
make -C tools/keytools && make -C tools/bin-assemble
97+
98+
- name: Build wolfboot
99+
run: |
100+
make FREEDOM_E_SDK=$GITHUB_WORKSPACE/freedom-e-sdk CROSS_COMPILE=riscv64-unknown-elf- ${{inputs.make-args}}
101+
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Wolfboot Reusable Build Workflow for TI Hercules
2+
3+
on:
4+
5+
workflow_call:
6+
inputs:
7+
arch:
8+
required: true
9+
type: string
10+
config-file:
11+
required: true
12+
type: string
13+
make-args:
14+
required: false
15+
type: string
16+
17+
jobs:
18+
19+
build:
20+
runs-on: ubuntu-24.04
21+
timeout-minutes: 60
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: true
27+
28+
- name: Workaround for sources.list
29+
run: |
30+
# Replace sources
31+
32+
set -euxo pipefail
33+
34+
# Peek (what repos are active now)
35+
apt-cache policy
36+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
37+
38+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
39+
shopt -s nullglob
40+
41+
echo "Replace sources.list (legacy)"
42+
sudo sed -i \
43+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
44+
/etc/apt/sources.list || true
45+
46+
echo "Replace sources.list.d/*.list (legacy)"
47+
for f in /etc/apt/sources.list.d/*.list; do
48+
sudo sed -i \
49+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
50+
"$f"
51+
done
52+
53+
echo "Replace sources.list.d/*.sources (deb822)"
54+
for f in /etc/apt/sources.list.d/*.sources; do
55+
sudo sed -i \
56+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
57+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
58+
"$f"
59+
done
60+
61+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
62+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
63+
# Replace azure with our mirror (idempotent)
64+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
65+
fi
66+
67+
# Peek (verify changes)
68+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
69+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
70+
echo "--- apt-mirrors.txt ---"
71+
cat /etc/apt/apt-mirrors.txt || true
72+
73+
- name: Update repository
74+
run: sudo apt-get update -o Acquire::Retries=3
75+
76+
- name: Install dependencies
77+
run: |
78+
sudo apt-get install -y libc6-i386 libusb-0.1-4 libgconf-2-4 build-essential
79+
80+
- name: Download and install TI Code Composer Studio
81+
run: |
82+
# Download CCS installer (ARM compiler tools only)
83+
# Using CCS 12.x which supports headless installation
84+
wget -q https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-J1VdearkvK/12.8.1/CCS12.8.1.00005_linux-x64.tar.gz -O ccs.tar.gz
85+
tar xzf ccs.tar.gz
86+
rm ccs.tar.gz
87+
88+
# Install CCS in headless mode with ARM compiler only
89+
./CCS12.8.1.00005_linux-x64/ccs_setup_12.8.1.00005.run --mode unattended --prefix $HOME/ti/ccs --enable-components PF_TMS470
90+
91+
# Set CCS_ROOT to the ARM compiler tools directory
92+
echo "CCS_ROOT=$HOME/ti/ccs/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS" >> $GITHUB_ENV
93+
94+
- name: Download TI F021 Flash API
95+
run: |
96+
# Download F021 Flash API for Hercules
97+
# The API is available from TI's website
98+
wget -q https://dr-download.ti.com/software-development/software-programming-tool/MD-ZxLC4kbApa/02.01.01/SPNU501G.zip -O f021.zip
99+
unzip -q f021.zip -d $HOME/ti/
100+
rm f021.zip
101+
102+
# Set F021_DIR environment variable
103+
echo "F021_DIR=$HOME/ti/F021 Flash API/02.01.01" >> $GITHUB_ENV
104+
105+
- name: make clean
106+
run: |
107+
make distclean
108+
109+
- name: Select config
110+
run: |
111+
cp ${{inputs.config-file}} .config
112+
113+
- name: Build tools
114+
run: |
115+
make -C tools/keytools && make -C tools/bin-assemble
116+
117+
- name: Build wolfboot
118+
run: |
119+
make ${{inputs.make-args}}
120+

0 commit comments

Comments
 (0)