Skip to content

DOC: cmake; ENH: 内存分配 #87

DOC: cmake; ENH: 内存分配

DOC: cmake; ENH: 内存分配 #87

Workflow file for this run

name: "Build staticlib"
on:
push:
paths:
- "src/**.c"
- "inc/**.h"
- "Makefile"
- ".github/workflows/build-staticlib.yml"
pull_request:
branches: [master]
paths:
- "src/**.c"
- "inc/**.h"
- "Makefile"
- ".github/workflows/build-staticlib.yml"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
# Cortex-M0, Cortex-M0+
build-lib-cortex-m:
strategy:
fail-fast: true
matrix:
target-cpu: ["m0", "m0plus"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
# 设置GCC版本
- uses: fiam/arm-none-eabi-gcc@v1
with:
release: "9-2019-q4"
# 构建
- name: Make static library at cortex-${{ matrix.target-cpu }}
run: |
make lib
env:
MTFMT_BUILD_GCC_PREFIX: "arm-none-eabi-"
MTFMT_BUILD_ARCH: "-mcpu=cortex-${{ matrix.target-cpu }} -mthumb"
MTFMT_BUILD_TARGET_NAME: "mtfmt_${{ matrix.target-cpu }}"
# 打包
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "gcc-lib-${{ matrix.target-cpu }}-without-div"
path: target/*
# Cortex-M, 带除法指令
build-lib-cortex-m-div:
strategy:
fail-fast: true
matrix:
target-cpu: ["m3", "m4", "m7"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
# 设置GCC版本
- uses: fiam/arm-none-eabi-gcc@v1
with:
release: "9-2019-q4"
# 构建
- name: Make static library at cortex-${{ matrix.target-cpu }}
run: |
make lib
env:
MTFMT_BUILD_GCC_PREFIX: "arm-none-eabi-"
MTFMT_BUILD_ARCH: "-mcpu=cortex-${{ matrix.target-cpu }} -mthumb"
MTFMT_BUILD_TARGET_NAME: "mtfmt_${{ matrix.target-cpu }}"
MTFMT_BUILD_C_DEFS: "-D_MSTR_USE_HARDWARE_DIV=1"
# 打包
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "gcc-lib-${{ matrix.target-cpu }}"
path: target/*