Skip to content

Commit c868933

Browse files
committed
try compile linux-aarch64
1 parent 660a260 commit c868933

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- { os: ubuntu-20.04, target: linux, platform: linux-x64,}
18-
- { os: macos-latest, target: darwin, platform: darwin-x64,}
19-
- { os: macos-latest, target: darwin, platform: darwin-arm64}
17+
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
18+
- { os: ubuntu-20.04, target: linux, platform: linux-aarch64 }
19+
- { os: macos-latest, target: darwin, platform: darwin-x64 }
20+
- { os: macos-latest, target: darwin, platform: darwin-arm64 }
2021
- { os: windows-latest, target: windows, platform: win32-x64 }
2122
steps:
2223
- uses: actions/setup-node@v3
@@ -25,12 +26,23 @@ jobs:
2526
- uses: actions/checkout@v3
2627
with:
2728
ref: refs/heads/master
28-
- name: install gcc 11
29-
if: startsWith(matrix.os, 'ubuntu')
29+
- name: Prepare Linux-64
30+
if: ${{ matrix.target == 'linux' && matrix.platform == 'linux-x64' }}
3031
run: |
3132
sudo apt-get install -y gcc-11 g++-11
3233
echo "CC=gcc-11" >> $GITHUB_ENV
3334
echo "CXX=g++-11" >> $GITHUB_ENV
35+
- name: Prepare Linux-aarch64
36+
if: ${{ matrix.target == 'linux' && matrix.platform == 'linux-aarch64' }}
37+
run: |
38+
apt-get update
39+
apt-get install -y software-properties-common
40+
add-apt-repository -y ppa:ubuntu-toolchain-r/test
41+
apt-get update
42+
sudo apt-get install -y gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu
43+
echo "CC=gcc-11-aarch64-linux-gnu" >> $GITHUB_ENV
44+
echo "CXX=g++-11-aarch64-linux-gnu" >> $GITHUB_ENV
45+
3446
- name: Build-Windows
3547
if: startsWith(matrix.os, 'windows')
3648
run: |
@@ -40,7 +52,7 @@ jobs:
4052
cmake --build . --config Release
4153
ctest -V -C Release
4254
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
43-
- name: Build-Linux
55+
- name: Build-Linux-x64
4456
if: startsWith(matrix.os, 'ubuntu')
4557
run: |
4658
mkdir build
@@ -49,6 +61,15 @@ jobs:
4961
cmake --build . --config Release --verbose
5062
ctest -V -C Release
5163
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
64+
- name: Build-Linux-aarch64
65+
if: startsWith(matrix.os, 'ubuntu')
66+
run: |
67+
mkdir build
68+
cd build
69+
cmake .. -DBUILD_GMOCK=OFF -DINSTALL_GTEST=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/cmake/aarch64-linux-gnu.cmake"
70+
cmake --build . --config Release --verbose
71+
ctest -V -C Release
72+
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
5273
- name: Build-macosx
5374
if: startsWith(matrix.os, 'macos')
5475
run: |

0 commit comments

Comments
 (0)