-
Notifications
You must be signed in to change notification settings - Fork 2
148 lines (113 loc) · 7.25 KB
/
cmake-linux-cc.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
143
144
145
146
147
148
# ##################################################################
#
# Cross-compile with CMake workflow for areg-sdk Demo project
#
# ##################################################################
name: CMake Linux Cross-Compile
on:
push: # Keep empty to run on each branch when push the code. Otherwise use branches: [ master ]
branches: [ main ]
pull_request: # Set to master to run only when merge with master branch
branches: [ main ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Linux.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
jobs:
job_linux:
name: Linux Platform, x86_64, x86, arm, aarch64 builds
runs-on: ubuntu-latest
steps:
- name: Linux - Checkout AREG SDK Demo project sources and dependencies
uses: actions/checkout@v4
- name: Linux - Setup Java JDK on Windows to run code generator
uses: actions/[email protected]
with:
java-version: 17
java-package: jre
distribution: temurin
- name: Update compilers on Linux
# Update compilers, set C/C++ compilers
run: sudo apt-get update
- name: Linux - Configure Demo, include AREG SDK after project(), GNU on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-x64-so -DAREG_COMPILER_FAMILY=gnu
- name: Linux - Build Demo, include AREG SDK after project(), GNU on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-x64-so -j20
- name: Linux - Install multilib
run: sudo apt-get install -y gcc-multilib g++-multilib
- name: Linux - Configure Demo, include AREG SDK after project(), GNU on x86, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-x86-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=x86
- name: Linux - Build Demo, include AREG SDK after project(), GNU on x86, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-x86-so -j20
- name: Linux - Install GNU 32-bit ARM compilers
run: sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
- name: Linux - Configure Demo, include AREG SDK after project(), GNU on arm32, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-arm-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=arm
- name: Linux - Build Demo, include AREG SDK after project(), GNU on arm32, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-arm-so -j20
- name: Linux - Install GNU 64-bit AARCH64 compilers
run: sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Linux - Configure Demo, include AREG SDK after project(), GNU on aarch64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-aarch64-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=aarch64
- name: Linux - Build Demo, include AREG SDK after project(), GNU on aarch64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-aarch64-so -j20
- name: Linux - Fix 'asm' directory issue by creating symlink.
run: sudo ln -s /usr/include/asm-generic/ /usr/include/asm
- name: Linux - Cross-compile configure, gnu-linux-arm32.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-linux-arm32 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-arm32.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, gnu-linux-arm32.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-linux-arm32 -j20
- name: Linux - Cross-compile configure, gnu-linux-arm64.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-linux-arm64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-arm64.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, gnu-linux-arm64.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-linux-arm64 -j20
- name: Linux - Cross-compile configure, gnu-linux-x64.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-linux-x64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-x64.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, gnu-linux-x64.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-linux-x64 -j20
- name: Linux - Cross-compile configure, gnu-linux-x86.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-linux-x86 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-x86.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, gnu-linux-x86.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-linux-x86 -j20
- name: Linux - Cross-compile configure, clang-linux-arm32.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/clang-linux-arm32 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-arm32.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, clang-linux-arm32.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/clang-linux-arm32 -j20
- name: Linux - Cross-compile configure, clang-linux-arm64.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/clang-linux-arm64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-arm64.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, clang-linux-arm64.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/clang-linux-arm64 -j20
- name: Linux - Cross-compile configure, clang-linux-x64.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/clang-linux-x64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-x64.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, clang-linux-x64.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/clang-linux-x64 -j20
- name: Linux - Cross-compile configure, clang-linux-x86.cmake
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/clang-linux-x86 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-x86.cmake -DAREG_EXTENDED:BOOL=ON
- name: Linux - Cross-compile build, clang-linux-x86.cmake
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/clang-linux-x86 -j20