Skip to content

Commit 5f04a53

Browse files
committed
Tc arm64 support
1 parent af87ed4 commit 5f04a53

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
9-
PLATFORMS: linux/amd64
9+
PLATFORMS: linux/amd64,linux/arm64
1010

1111
permissions:
1212
packages: write
@@ -17,11 +17,13 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
combination:
20-
#Debug
20+
#amd64
2121
- { kernel: 'Linux 6.8', runner: 'ubuntu-24.04', clangs: 'clang-14 clang-15 clang-16 clang-17 clang-18', debug: '1' }
22-
23-
#NDEBUG
2422
- { kernel: 'Linux 6.8', runner: 'ubuntu-24.04', clangs: 'clang-14 clang-15 clang-16 clang-17 clang-18', debug: '0' }
23+
24+
#arm64
25+
- { kernel: 'Linux 6.8', runner: 'ubuntu-24.04-arm', clangs: 'clang-14 clang-15 clang-16 clang-17 clang-18', debug: '1' }
26+
- { kernel: 'Linux 6.8', runner: 'ubuntu-24.04-arm', clangs: 'clang-14 clang-15 clang-16 clang-17 clang-18', debug: '0' }
2527
runs-on: ${{ matrix.combination.runner }}
2628
steps:
2729
- name: "Checkout sfunnel"
@@ -39,7 +41,7 @@ jobs:
3941
bridge-utils python3-scapy python3-pip libbpf-dev \
4042
libelf-dev linux-headers-generic \
4143
linux-libc-dev llvm iptables
42-
sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm
44+
sudo ln -s /usr/include/$(uname -m)-linux-gnu/asm /usr/include/asm
4345
if [[ "${{ matrix.combination.runner }}" == "ubuntu-24.04" ]]; then
4446
sudo apt-get install python3-pytest
4547
else
@@ -66,12 +68,21 @@ jobs:
6668
fail-fast: false
6769
matrix:
6870
combination:
71+
# amd64
6972
- { runner: 'ubuntu-24.04', cni: 'cilium', nodes: '1' }
7073
- { runner: 'ubuntu-24.04', cni: 'cilium', nodes: '2' }
7174

7275
- { runner: 'ubuntu-24.04', cni: 'calico', nodes: '2' }
7376
- { runner: 'ubuntu-24.04', cni: 'flannel', nodes: '2' }
7477
- { runner: 'ubuntu-24.04', cni: 'kindnet', nodes: '2' }
78+
79+
# arm64
80+
- { runner: 'ubuntu-24.04-arm', cni: 'cilium', nodes: '1' }
81+
- { runner: 'ubuntu-24.04-arm', cni: 'cilium', nodes: '2' }
82+
83+
- { runner: 'ubuntu-24.04-arm', cni: 'calico', nodes: '2' }
84+
- { runner: 'ubuntu-24.04-arm', cni: 'flannel', nodes: '2' }
85+
- { runner: 'ubuntu-24.04-arm', cni: 'kindnet', nodes: '2' }
7586
runs-on: ${{ matrix.combination.runner }}
7687
steps:
7788
- name: "Checkout sfunnel"
@@ -89,7 +100,7 @@ jobs:
89100
bridge-utils python3-scapy python3-pip libbpf-dev \
90101
libelf-dev linux-headers-generic \
91102
linux-libc-dev llvm iptables
92-
sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm
103+
sudo ln -s /usr/include/$(uname -m)-linux-gnu/asm /usr/include/asm
93104
if [[ "${{ matrix.combination.runner }}" == "ubuntu-24.04" ]]; then
94105
sudo apt-get install python3-pytest
95106
else

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPY src/ /opt/sfunnel/src/
2121
COPY ./docker/entrypoint.sh /opt/sfunnel
2222
RUN rm /opt/sfunnel/src/ruleset.default && \
2323
chmod +x /opt/sfunnel/entrypoint.sh && \
24-
ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm && \
24+
ln -s /usr/include/$(uname -m)-linux-gnu/asm /usr/include/asm; \
2525
echo "${VERSION}(${COMMIT})" > /opt/sfunnel/VERSION
2626

2727
#Cleanup image

0 commit comments

Comments
 (0)