Skip to content

Commit

Permalink
amd64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
blesswinsamuel committed May 7, 2024
1 parent 71cfff5 commit 5dc7b54
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ jobs:
with:
checkout: false
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
docker-build-platforms: linux/arm64
docker-build-platforms: linux/amd64

- name: Create release tarball
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
docker create ghcr.io/${{ github.repository }} > /tmp/container_id
docker cp $(cat /tmp/container_id):/bin/ebpf-firewall ./router-monitor
chmod +x router-monitor
tar czf router-monitor-aarch64-linux.tar.gz router-monitor
tar czf router-monitor-amd64-linux.tar.gz router-monitor
- name: Create github release
id: create_release
uses: ncipollo/release-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
artifacts: router-monitor-aarch64-linux.tar.gz
artifacts: router-monitor-amd64-linux.tar.gz
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN apt-get update && apt-get install -y \
# ;

# RUN ln -sf /usr/include/asm-generic/ /usr/include/asm
RUN ln -sf /usr/include/aarch64-linux-gnu/asm/ /usr/include/asm
# RUN ln -sf /usr/include/aarch64-linux-gnu/asm/ /usr/include/asm
RUN ln -sf /usr/include/x86_64-linux-gnu/asm/ /usr/include/asm

WORKDIR /src

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.generate
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN apt-get update && apt-get install -y \
# ;

# RUN ln -sf /usr/include/asm-generic/ /usr/include/asm
RUN ln -sf /usr/include/aarch64-linux-gnu/asm/ /usr/include/asm
# RUN ln -sf /usr/include/aarch64-linux-gnu/asm/ /usr/include/asm
RUN ln -sf /usr/include/x86_64-linux-gnu/asm/ /usr/include/asm

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion internal/firewall/gen.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package firewall

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target arm64 ebpfFirewall ebpf_firewall.c
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64 ebpfFirewall ebpf_firewall.c

0 comments on commit 5dc7b54

Please sign in to comment.