This repository was archived by the owner on Jul 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (86 loc) · 2.35 KB
/
Copy pathmake-lib.yml
File metadata and controls
89 lines (86 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: "make lib"
on:
push:
branches: [master]
paths:
- "src/**.c"
- "inc/**.h"
- "Makefile"
- ".github/workflows/make-lib.yml"
pull_request:
branches: [master]
paths:
- "src/**.c"
- "inc/**.h"
- "Makefile"
- ".github/workflows/make-lib.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@v4
with:
submodules: true
# 设置GCC版本
- uses: fiam/arm-none-eabi-gcc@v1
with:
release: "10-2020-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
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
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", "m23", "m33", "m55"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
# 设置GCC版本
- uses: fiam/arm-none-eabi-gcc@v1
with:
release: "10-2020-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
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: "gcc-lib-${{ matrix.target-cpu }}"
path: target/*