Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Linux arm64 build and tests on native CI runners #61

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 23 additions & 31 deletions .github/workflows/ringrtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,38 +99,26 @@ jobs:
- name: Run rust tests
run: cd src/rust && ./scripts/run-tests

aarch64_cross:
name: Cross compile Linux aarch64 (using prebuilt WebRTC)
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler crossbuild-essential-arm64 libpulse-dev
- uses: actions/checkout@v4
- run: rustup target add aarch64-unknown-linux-gnu
- run: ./bin/fetch-artifact --platform linux-arm64 --release -o out-arm
- run: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc TARGET_ARCH=arm64 OUTPUT_DIR=out-arm ./bin/build-electron --ringrtc-only --release

electron:
name: Electron Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest, macos-13]
include:
- os: ubuntu-22.04
install-deps: sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream && sudo apt-get update && sudo apt-get install -y protobuf-compiler libpulse-dev libpulse0 pipewire && systemctl --user daemon-reload && systemctl --user --now enable pipewire pipewire-pulse
test-runner: xvfb-run --auto-servernum
- os: windows-latest
install-deps: choco install protoc
- os: macos-13
install-deps: brew install protobuf coreutils
os: [ubuntu-22.04, windows-latest, macos-13, ubuntu-22.04-arm64-4-cores]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash # as opposed to PowerShell
steps:
- name: Install dependencies
run: ${{ matrix.install-deps }}
run: |
if [[ "${{ matrix.os }}" == macos-* ]]; then
brew install protobuf coreutils
elif [[ "${{ matrix.os }}" == windows-* ]]; then
choco install protoc
elif [[ "${{ matrix.os }}" == ubuntu-* ]]; then
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream && sudo apt-get update && sudo apt-get install -y protobuf-compiler libpulse-dev libpulse0 pipewire && systemctl --user daemon-reload && systemctl --user --now enable pipewire pipewire-pulse
fi
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand All @@ -145,29 +133,33 @@ jobs:
working-directory: src/node
- run: npm run build
working-directory: src/node
- run: ${{ matrix.test-runner }} npm test
- run: xvfb-run --auto-servernum npm test
if: startsWith(matrix.os, 'ubuntu-')
working-directory: src/node
- run: npm test
if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
working-directory: src/node

cargo_build_using_prebuilt:
name: RingRTC as dependency (using Prebuilt WebRTC)
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, windows-latest]
include:
- os: ubuntu-22.04
install-deps: sudo apt-get update && sudo apt-get install -y protobuf-compiler libpulse-dev
- os: macos-13
install-deps: brew install protobuf coreutils
- os: windows-latest
install-deps: choco install protoc
os: [ubuntu-22.04, macos-13, windows-latest, ubuntu-22.04-arm64-4-cores]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash # as opposed to PowerShell
steps:
- name: Install dependencies
run: ${{ matrix.install-deps }}
run: |
if [[ "${{ matrix.os }}" == macos-* ]]; then
brew install protobuf coreutils
elif [[ "${{ matrix.os }}" == windows-* ]]; then
choco install protoc
elif [[ "${{ matrix.os }}" == ubuntu-* ]]; then
sudo apt-get update && sudo apt-get install -y protobuf-compiler libpulse-dev
fi
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion bin/build-electron
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ case "$TARGET_ARCH" in
GN_ARCH=x86
CARGO_ARCH=i686
;;
"arm64")
"arm64"|"aarch64")
GN_ARCH=arm64
CARGO_ARCH=aarch64
# Normalize TARGET_ARCH to arm64
TARGET_ARCH=arm64
;;
*)
echo "Unsupported architecture"
Expand Down
Loading