mirror of https://github.com/wolfSSL/wolfBoot.git
81 lines
2.1 KiB
YAML
81 lines
2.1 KiB
YAML
name: Wolfboot Reusable Build Workflow for RISC-V
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
inputs:
|
|
arch:
|
|
required: true
|
|
type: string
|
|
config-file:
|
|
required: true
|
|
type: string
|
|
make-args:
|
|
required: false
|
|
type: string
|
|
pre-build:
|
|
description: Optional shell command run after config select, before the build.
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: ghcr.io/wolfssl/wolfboot-ci-riscv:v1.0
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/checkout@v4
|
|
if: ${{ inputs.arch == 'riscv' }}
|
|
with:
|
|
repository: sifive/freedom-e-sdk
|
|
path: freedom-e-sdk
|
|
submodules: recursive
|
|
|
|
- name: Trust workspace
|
|
run: |
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Add preinstalled RISC-V toolchain to PATH
|
|
run: |
|
|
echo "/opt/xpack-riscv-none-elf-gcc-15.2.0-1/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Check RISC-V toolchain
|
|
run: |
|
|
riscv-none-elf-gcc --version
|
|
riscv-none-elf-gcc -print-multi-lib | head -5
|
|
|
|
# ============================================================
|
|
# Build wolfboot
|
|
# ============================================================
|
|
- name: make clean
|
|
run: |
|
|
make distclean
|
|
|
|
- name: Select config
|
|
run: |
|
|
cp ${{inputs.config-file}} .config
|
|
|
|
- name: Pre-build step
|
|
if: ${{ inputs.pre-build != '' }}
|
|
run: ${{ inputs.pre-build }}
|
|
|
|
- name: Build tools
|
|
run: |
|
|
make -C tools/keytools && make -C tools/bin-assemble
|
|
|
|
- name: Build wolfboot (riscv32)
|
|
if: ${{ inputs.arch == 'riscv' }}
|
|
run: |
|
|
make CROSS_COMPILE=riscv-none-elf- FREEDOM_E_SDK=$GITHUB_WORKSPACE/freedom-e-sdk ${{inputs.make-args}}
|
|
|
|
- name: Build wolfboot (riscv64)
|
|
if: ${{ inputs.arch == 'riscv64' }}
|
|
run: |
|
|
make CROSS_COMPILE=riscv-none-elf- ${{inputs.make-args}}
|