-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (126 loc) · 4.22 KB
/
builder.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: musl-cross-builder
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ver:
- { gcc: 12.2.0 }
arch:
[
# aarch64-linux-musl,
# aarch64_be-linux-musl,
# arm-linux-musleabi,
# arm-linux-musleabihf,
# armeb-linux-musleabi,
# armeb-linux-musleabihf,
# armel-linux-musleabi,
# armel-linux-musleabihf,
# armv5l-linux-musleabi,
# armv5l-linux-musleabihf,
# armv5te-linux-musleabi,
# armv6-linux-musleabi,
# armv6-linux-musleabihf,
# armv7-linux-musleabi,
# armv7-linux-musleabihf,
# armv7l-linux-musleabihf,
# armv7m-linux-musleabi,
# armv7r-linux-musleabihf,
# i486-linux-musl,
# i686-linux-musl,
# i586-linux-musl,
# m68k-linux-musl,
# microblaze-linux-musl,
# microblazeel-linux-musl,
# mips-linux-musl,
# mips-linux-muslsf,
# mips-linux-musln32sf,
# mips64-linux-musl,
# mips64-linux-musln32,
# mips64-linux-musln32sf,
# mips64el-linux-musl,
# mips64el-linux-musln32,
# mips64el-linux-musln32sf,
# mipsel-linux-musl,
# mipsel-linux-musln32,
# mipsel-linux-musln32sf,
# mipsel-linux-muslsf,
# or1k-linux-musl,
# powerpc-linux-musl,
# powerpc-linux-muslsf,
# powerpc64-linux-musl,
# powerpc64le-linux-musl,
# powerpcle-linux-musl,
# powerpcle-linux-muslsf,
# riscv32-linux-musl,
# riscv64-linux-musl,
# s390x-linux-musl,
# sh2-linux-musl,
# sh2-linux-muslfdpic,
# sh2eb-linux-musl,
# sh2eb-linux-muslfdpic,
# sh4-linux-musl,
# sh4eb-linux-musl,
# x86_64-linux-musl,
# x86_64-linux-muslx32,
loongarch64-linux-musl,
]
exclude:
- arch: sh2-linux-muslfdpic
- arch: sh2eb-linux-muslfdpic
name: ${{ matrix.arch }}-${{ matrix.ver.gcc }}
env:
PKG_NAME: ${{ matrix.arch }}-${{ matrix.ver.gcc }}
steps:
- name: Host - update
run: sudo apt-get update
- name: Host - Install host bison
run: sudo apt-get install -y bison
# 检出builder
- name: Checkout
uses: actions/checkout@v4
- name: checkout musl-cross-make
uses: actions/checkout@v4
with:
repository: benjaminwan/musl-cross-make
path: musl-cross-make
ref: master
submodules: recursive
# 复制config.mak
- name: Copy config.mak to build directory
run: cp config.mak musl-cross-make/config.mak
# 编译 & install
- name: make & install ${{ matrix.arch }} toolchain
run: |
cd musl-cross-make
make -j$(nproc) install TARGET=${{ matrix.arch }} OUTPUT=/opt/${{ matrix.arch }}
# 复制execinfo.h
- name: Copy updated config.mak to build directory
run: cp execinfo.h /opt/${{ matrix.arch }}/${{ matrix.arch }}/include/execinfo.h
# 7z压缩
- name: archive ${{ matrix.arch }} toolchain
run: 7z a ${{ env.PKG_NAME }}.7z /opt/${{ matrix.arch }}/
# 上传artifact
# - name: upload
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.PKG_NAME }}
# path: ${{ env.PKG_NAME }}.7z
# 创建Changelog文件 triggered by git tag push
- name: set release info dynamically from config.mak
run: |
printf "%s\n" "$(sed -rn "/GCC_VER = (.*)/,/LINUX_VER = (.*)/p" config.mak)" > release.md
# 创建release 上传release
# https://github.com/marketplace/actions/create-release
- name: Create release and upload-archive
uses: ncipollo/release-action@v1
with:
prerelease: false
bodyFile: release.md
artifacts: ${{ env.PKG_NAME }}.7z
allowUpdates: true
artifactContentType: application/x-7z-compressed
token: ${{ secrets.GITHUB_TOKEN }}