-
Notifications
You must be signed in to change notification settings - Fork 613
101 lines (83 loc) · 3.8 KB
/
cpp-cross-linux-arm.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
name: C/C++ CI linux cross armv6/armv7/arm64
on: [push]
jobs:
build:
strategy:
matrix:
include:
- buildtype: Debug
archtype: arm
arch: armv6l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-10.2.0-pi_0-1.tar.gz
prefix: arm-linux-gnueabihf
- buildtype: Release
archtype: arm
arch: armv6l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-10.2.0-pi_0-1.tar.gz
prefix: arm-linux-gnueabihf
- buildtype: Debug
archtype: arm
arch: armv7l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-10.2.0-pi_2-3.tar.gz
prefix: arm-linux-gnueabihf
- buildtype: Release
archtype: arm
arch: armv7l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-10.2.0-pi_2-3.tar.gz
prefix: arm-linux-gnueabihf
- buildtype: Debug
archtype: arm64
arch: arm64
prefix: aarch64-linux-gnu
- buildtype: Release
archtype: arm64
arch: arm64
prefix: aarch64-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary directories to free up space
run: |
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags
- name: pkg
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends g++ autoconf automake libtool xz-utils cmake p7zip-full
if [ -z "${{ matrix.crosscompiler }}" ]; then
sudo apt-get install -y --no-install-recommends gcc-${{ matrix.prefix }} g++-${{ matrix.prefix }}
else
wget -qO- ${{ matrix.crosscompiler }} | tar xz
echo "$(pwd)/$(ls -d cross-pi-gcc-*)/bin" >> $GITHUB_PATH
fi
- name: depot_tools
run: |
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$(pwd)/depot_tools" >> $GITHUB_PATH
- name: fetch webrtc
run: |
mkdir webrtc
pushd webrtc
fetch --nohooks webrtc
popd
- name: build
run: |
export PATH=$(pwd)/webrtc/src/third_party/llvm-build/Release+Asserts/bin:$PATH
cmake -DWEBRTCROOT=$(pwd)/webrtc -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -DCMAKE_LIBRARY_ARCHITECTURE=${{ matrix.prefix }} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=${{ matrix.prefix }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.prefix }}-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 -DWEBRTCDESKTOPCAPTURE=OFF .
make
- name: cpack
run: |
rm -f *.tar.gz
cpack
echo "artifactPath=$(ls *.tar.gz)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactPath }}
path: ${{ env.artifactPath }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.artifactPath }}