-
Notifications
You must be signed in to change notification settings - Fork 433
74 lines (61 loc) · 2.21 KB
/
cross.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
name: C/C++ CI linux cross compilation arm64/armhf/mips
on: [push]
jobs:
build:
strategy:
matrix:
include:
- buildtype: Debug
system: arm64
crosscompiler: aarch64-linux-gnu
- buildtype: Release
system: arm64
crosscompiler: aarch64-linux-gnu
- buildtype: Debug
system: armhf
crosscompiler: arm-linux-gnueabihf
- buildtype: Release
system: armhf
crosscompiler: arm-linux-gnueabihf
- buildtype: Debug
system: mips
crosscompiler: mips-linux-gnu
- buildtype: Release
system: mips
crosscompiler: mips-linux-gnu
- buildtype: Debug
system: mipsel
crosscompiler: mipsel-linux-gnu
- buildtype: Release
system: mipsel
crosscompiler: mipsel-linux-gnu
- buildtype: Debug
system: riscv64
crosscompiler: riscv64-linux-gnu
- buildtype: Release
system: riscv64
crosscompiler: riscv64-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: pkg
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ca-certificates xz-utils cmake make pkg-config git g++-${{ matrix.crosscompiler }}
- name: build
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.system }} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=${{ matrix.crosscompiler }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.crosscompiler }}-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DCMAKE_FIND_ROOT_PATH=/usr/aarch64-linux-gnu .
make
- name: cpack
run: |
cpack
echo "artifactPath=$(ls *.deb)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactPath }}
path: ${{ env.artifactPath }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.artifactPath }}