Skip to content

Commit e82252c

Browse files
committed
CI tests: Cypress test
1 parent 90a5f29 commit e82252c

File tree

3 files changed

+118
-7
lines changed

3 files changed

+118
-7
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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-latest
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/psoc6pdl
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
90+
91+
- name: Install cross compilers
92+
run: |
93+
sudo apt-get install -y gcc-arm-none-eabi
94+
95+
- name: make distclean
96+
run: |
97+
make distclean
98+
99+
- name: Select config
100+
run: |
101+
cp ${{inputs.config-file}} .config && make include/target.h
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}} V=1
110+
111+

.github/workflows/test-configs.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ on:
88

99
jobs:
1010

11-
# TODO: cypsoc6.config requires cy_device_headers.h and component defines
12-
# cypsoc6_test:
13-
# uses: ./.github/workflows/test-build-psoc6.yml
14-
# with:
15-
# arch: arm
16-
# config-file: ./config/examples/cypsoc6.config
11+
cypsoc6_test:
12+
uses: ./.github/workflows/test-build-psoc6.yml
13+
with:
14+
arch: arm
15+
config-file: ./config/examples/cypsoc6.config
1716

1817
hifive1_test:
1918
uses: ./.github/workflows/test-build-riscv.yml

arch.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,8 @@ ifeq ($(TARGET),psoc6)
967967
-I$(CYPRESS_CORE_LIB)/include \
968968
-I$(CYPRESS_PDL)/devices/include/ip \
969969
-I$(CYPRESS_PDL)/devices/templates/COMPONENT_MTB \
970-
-DCY8C624ABZI_D44
970+
-DCY8C624ABZI_D44 \
971+
-DCY_DEVICE_COMMON
971972
ARCH_FLASH_OFFSET=0x10000000
972973
ifneq ($(PSOC6_CRYPTO),0)
973974
CFLAGS+=-DWOLFSSL_PSOC6_CRYPTO

0 commit comments

Comments
 (0)