Skip to content

Commit 49aaff0

Browse files
ci: add self hosted arm runner (#983)
1 parent 4f6d532 commit 49aaff0

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

.github/workflows/ci.yml

+22-19
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
5050

5151
- name: Install apt packages
52-
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt install ${{ matrix.cfg.cpp-version }} libsodium-dev libopus-dev zlib1g-dev rpm
52+
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt-get install -y ${{ matrix.cfg.cpp-version }} libsodium-dev libopus-dev zlib1g-dev rpm
5353

5454
- name: Generate CMake
5555
run: mkdir build && cd build && cmake -DDPP_NO_VCPKG=ON -DAVX_TYPE=AVX0 -DCMAKE_BUILD_TYPE=Release ..
@@ -77,18 +77,20 @@ jobs:
7777
strategy:
7878
fail-fast: false # Don't fail everything if one fails. We want to test each OS/Compiler individually
7979
matrix:
80+
# GitHub hosted runners on Azure
81+
# arm7hf is a self-hosted docker-based runner at Brainbox.cc. Raspberry Pi 4, 8gb 4-core with NEON
8082
cfg:
81-
- { arch: 'amd64', os: ubuntu-20.04, package: clang-10, cpp-version: clang++-10, cmake-flags: '' }
82-
- { arch: 'amd64', os: ubuntu-22.04, package: clang-11, cpp-version: clang++-11, cmake-flags: '' }
83-
- { arch: 'amd64', os: ubuntu-22.04, package: clang-12, cpp-version: clang++-12, cmake-flags: '' }
84-
- { arch: 'amd64', os: ubuntu-22.04, package: clang-13, cpp-version: clang++-13, cmake-flags: '' }
85-
- { arch: 'amd64', os: ubuntu-22.04, package: clang-14, cpp-version: clang++-14, cmake-flags: '' }
86-
- { arch: 'amd64', os: ubuntu-22.04, package: clang-15, cpp-version: clang++-15, cmake-flags: '-DDPP_CORO=ON' }
87-
- { arch: 'amd64', os: ubuntu-22.04, package: g++-12, cpp-version: g++-12, cmake-flags: '-DDPP_CORO=ON' }
88-
- { arch: 'amd64', os: ubuntu-22.04, package: g++-11, cpp-version: g++-11, cmake-flags: '-DDPP_CORO=ON' }
89-
- { arch: 'amd64', os: ubuntu-22.04, package: g++-10, cpp-version: g++-10, cmake-flags: '' }
90-
- { arch: 'amd64', os: ubuntu-20.04, package: g++-9, cpp-version: g++-9, cmake-flags: '' }
91-
83+
- { arch: 'amd64', concurrency: 2, os: ubuntu-20.04, package: clang-10, cpp-version: clang++-10, cmake-flags: '', cpack: 'no' }
84+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-11, cpp-version: clang++-11, cmake-flags: '', cpack: 'no' }
85+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-12, cpp-version: clang++-12, cmake-flags: '', cpack: 'no' }
86+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-13, cpp-version: clang++-13, cmake-flags: '', cpack: 'no' }
87+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-14, cpp-version: clang++-14, cmake-flags: '', cpack: 'no' }
88+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-15, cpp-version: clang++-15, cmake-flags: '-DDPP_CORO=ON', cpack: 'no' }
89+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: g++-12, cpp-version: g++-12, cmake-flags: '-DDPP_CORO=ON', cpack: 'no' }
90+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: g++-11, cpp-version: g++-11, cmake-flags: '-DDPP_CORO=ON', cpack: 'no' }
91+
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: g++-10, cpp-version: g++-10, cmake-flags: '', cpack: 'yes' }
92+
- { arch: 'amd64', concurrency: 2, os: ubuntu-20.04, package: g++-9, cpp-version: g++-9, cmake-flags: '', cpack: 'no' }
93+
- { arch: 'arm7hf', concurrency: 4, os: [self-hosted, linux, ARM], package: g++-12, cpp-version: g++-12, cmake-flags: '', cpack: 'yes' }
9294
steps:
9395
- name: Harden Runner
9496
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
@@ -99,29 +101,29 @@ jobs:
99101
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
100102

101103
- name: Install apt packages
102-
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt install ${{ matrix.cfg.package }} libsodium-dev libopus-dev zlib1g-dev rpm
104+
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt-get install -y ${{ matrix.cfg.package }} pkg-config libsodium-dev libopus-dev zlib1g-dev rpm
103105

104106
- name: Generate CMake
105107
run: mkdir build && cd build && cmake -DDPP_NO_VCPKG=ON -DAVX_TYPE=AVX0 -DCMAKE_BUILD_TYPE=Release ${{matrix.cfg.cmake-flags}} ..
106108
env:
107109
CXX: ${{matrix.cfg.cpp-version}}
108110

109111
- name: Build Project
110-
run: cd build && make -j2
112+
run: cd build && make -j${{ matrix.cfg.concurrency }}
111113

112114
- name: Package distributable
113-
if: ${{ matrix.cfg.cpp-version == 'g++-10' }}
115+
if: ${{ matrix.cfg.cpack == 'yes' }}
114116
run: cd build && cpack --verbose
115117

116118
- name: Upload Binary (DEB)
117-
if: ${{ matrix.cfg.cpp-version == 'g++-10' }}
119+
if: ${{ matrix.cfg.cpack == 'yes' }}
118120
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
119121
with:
120122
name: "libdpp - Debian Package ${{matrix.cfg.arch}}"
121123
path: '${{github.workspace}}/build/*.deb'
122124

123125
- name: Upload Binary (RPM)
124-
if: ${{ matrix.cfg.cpp-version == 'g++-10' }}
126+
if: ${{ matrix.cfg.cpack == 'yes' }}
125127
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
126128
with:
127129
name: "libdpp - RPM Package ${{matrix.cfg.arch}}"
@@ -229,7 +231,8 @@ jobs:
229231
matrix:
230232
cfg:
231233
- {name: "ARM64", os: ubuntu-20.04, cmake-options: -DCMAKE_TOOLCHAIN_FILE=cmake/ARM64ToolChain.cmake}
232-
- {name: "ARMv7 HF", os: ubuntu-20.04, cmake-options: -DCMAKE_TOOLCHAIN_FILE=cmake/ARMv7ToolChain.cmake}
234+
# Replaced with self-hosted runner
235+
# - {name: "ARMv7 HF", os: ubuntu-20.04, cmake-options: -DCMAKE_TOOLCHAIN_FILE=cmake/ARMv7ToolChain.cmake}
233236
- {name: "Linux x86", os: ubuntu-20.04, cmake-options: -DCMAKE_TOOLCHAIN_FILE=cmake/LINUXx86ToolChain.cmake -DBUILD_VOICE_SUPPORT=OFF}
234237
- {name: "ARMv6", os: ubuntu-20.04, cmake-options: -DCMAKE_TOOLCHAIN_FILE=cmake/ARMv6ToolChain.cmake}
235238

@@ -245,7 +248,7 @@ jobs:
245248
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
246249

247250
- name: Install Packages
248-
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt install cmake rpm
251+
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt-get install -y cmake rpm
249252

250253
- name: Generate CMakeFiles
251254
run: mkdir build && cd build && sudo cmake ${{matrix.cfg.cmake-options}} -DDPP_NO_VCPKG=ON -DCMAKE_BUILD_TYPE=Release -DAVX_TYPE=AVX0 ..

0 commit comments

Comments
 (0)