1818
1919 build :
2020 runs-on : ubuntu-24.04
21+ container :
22+ image : ghcr.io/wolfssl/wolfboot-ci-riscv:v1.0
2123 timeout-minutes : 30
2224 steps :
2325 - uses : actions/checkout@v4
@@ -31,69 +33,16 @@ jobs:
3133 path : freedom-e-sdk
3234 submodules : recursive
3335
34- - name : Workaround for sources.list
36+ - name : Trust workspace
3537 run : |
36- # Replace sources
38+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
3739
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
40+ - name : Add preinstalled RISC-V toolchain to PATH
41+ run : |
42+ echo "/opt/xpack-riscv-none-elf-gcc-15.2.0-1/bin" >> "$GITHUB_PATH"
8143
82- # ============================================================
83- # xPack RISC-V GCC — single toolchain with full multilib
84- # supporting both rv32 and rv64 targets (including rv32imac/ilp32
85- # and rv64imac/lp64 which riscv-collab nightly builds lack).
86- # https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack
87- # ============================================================
88- - name : Download and install xPack RISC-V toolchain
44+ - name : Check RISC-V toolchain
8945 run : |
90- XPACK_VER="15.2.0-1"
91- XPACK_FILE="xpack-riscv-none-elf-gcc-${XPACK_VER}-linux-x64.tar.gz"
92- wget -q "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v${XPACK_VER}/${XPACK_FILE}"
93- echo "aaaa8060c914851a3e5ee1ba82cc3d6f80972f90638a05c6e823a37557a33758 ${XPACK_FILE}" | sha256sum -c -
94- tar -xf "${XPACK_FILE}"
95- echo "$GITHUB_WORKSPACE/xpack-riscv-none-elf-gcc-${XPACK_VER}/bin" >> $GITHUB_PATH
96- export PATH="$GITHUB_WORKSPACE/xpack-riscv-none-elf-gcc-${XPACK_VER}/bin:$PATH"
9746 riscv-none-elf-gcc --version
9847 riscv-none-elf-gcc -print-multi-lib | head -5
9948
0 commit comments