Skip to content

Commit

Permalink
Add build for Linux ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
oshaked1 committed Sep 8, 2024
1 parent 48d94bc commit 0918bdf
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-wireshark-headers-unix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
- name: Configure Wireshark
run: |
mkdir wireshark/build
cmake -G Ninja -B wireshark/build -S wireshark -DENABLE_CCACHE=Yes -DENABLE_WERROR=ON -DDISABLE_WERROR=OFF
cmake -G Ninja -B wireshark/build -S wireshark -DPython3_EXECUTABLE=$(which python3.11) -DENABLE_CCACHE=Yes -DENABLE_WERROR=ON -DDISABLE_WERROR=OFF || grep -i python wireshark/build/CMakeCache.txt
shell: bash
- name: Install headers
id: install_headers
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ jobs:
strategy:
matrix:
# macos-14 is ARM64, macos-13 is x86-64
os: [ubuntu-latest, macos-14, macos-13, windows-latest]
os: [ubuntu-latest, macos-14, macos-13, windows-latest, ubuntu_arm64]
wireshark_version: [wireshark-4.2.6, wireshark-4.4.0]
include:
# Ubuntu 22.04 Wireshark package version
- os: ubuntu-latest
wireshark_version: wireshark-3.6.2
- os: ubuntu_arm64
wireshark_version: wireshark-3.6.2
# Ubuntu 24.04 Wireshark package version
- os: ubuntu-latest
wireshark_version: wireshark-4.2.2
- os: ubuntu_arm64
wireshark_version: wireshark-4.2.2

steps:
- name: Disable auto CRLF (Windows)
Expand All @@ -33,8 +37,14 @@ jobs:
- name: Clone Wireshark
run: git clone --depth 1 --branch ${{ matrix.wireshark_version }} https://github.com/wireshark/wireshark

- name: Install older Python (Ubuntu)
if: matrix.os == 'ubuntu_arm64' || matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
uses: actions/setup-python@v5
with:
python-version: '3.11' # 3.12 introduced changes that break builds of older Wireshark versions

- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64'
run: |
sudo apt update
sudo apt install -y ninja-build ccache
Expand All @@ -60,15 +70,15 @@ jobs:
uses: microsoft/setup-msbuild@v2

- name: Install Wireshark headers (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
uses: ./.github/actions/install-wireshark-headers-unix

- name: Install Wireshark headers (Windows)
if: matrix.os == 'windows-latest'
uses: ./.github/actions/install-wireshark-headers-windows

- name: Build Traceeshark (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
run: |
WERROR=y make cmake
make
Expand All @@ -84,7 +94,7 @@ jobs:
shell: cmd

- name: Load Plugins Test (Unix)
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13')
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13')
run: |
make install
.github/load_plugins.py
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,19 @@ jobs:
strategy:
matrix:
# macos-14 is ARM64, macos-13 is x86-64
os: [ubuntu-latest, macos-14, macos-13, windows-latest]
os: [ubuntu-latest, macos-14, macos-13, windows-latest, ubuntu_arm64]
wireshark_version: [wireshark-4.2.6, wireshark-4.4.0]
include:
# Ubuntu 22.04 Wireshark package version
- os: ubuntu-latest
wireshark_version: wireshark-3.6.2
- os: ubuntu_arm64
wireshark_version: wireshark-3.6.2
# Ubuntu 24.04 Wireshark package version
- os: ubuntu-latest
wireshark_version: wireshark-4.2.2
- os: ubuntu_arm64
wireshark_version: wireshark-4.2.2

steps:
- name: Disable auto CRLF (Windows)
Expand All @@ -58,12 +62,22 @@ jobs:
- name: Clone Wireshark
run: git clone --depth 1 --branch ${{ matrix.wireshark_version }} https://github.com/wireshark/wireshark

- name: Install older Python (Ubuntu)
if: matrix.os == 'ubuntu_arm64' || matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64'
run: |
sudo apt update
sudo apt install -y ninja-build ccache
sudo wireshark/tools/debian-setup.sh
# Downgrade to Python 3.11, because 3.12 introduced changes that break builds of older Wireshark versions
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11
- name: Install dependencies (Macos)
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'
Expand All @@ -85,15 +99,15 @@ jobs:
uses: microsoft/setup-msbuild@v2

- name: Install Wireshark headers (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
uses: ./.github/actions/install-wireshark-headers-unix

- name: Install Wireshark headers (Windows)
if: matrix.os == 'windows-latest'
uses: ./.github/actions/install-wireshark-headers-windows

- name: Build Traceeshark (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
run: |
WERROR=y make cmake
make
Expand All @@ -109,7 +123,7 @@ jobs:
shell: cmd

- name: Load Plugins Test (Unix)
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13')
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13')
run: |
make install
.github/load_plugins.py
Expand All @@ -122,7 +136,7 @@ jobs:
shell: cmd

- name: Create distribution archive (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu_arm64' || matrix.os == 'macos-14' || matrix.os == 'macos-13'
run: |
make dist
DIST_PATH=$(ls dist/*.zip | head -n 1)
Expand Down

0 comments on commit 0918bdf

Please sign in to comment.