Skip to content

Commit 023a853

Browse files
committed
Improve workflows.
1 parent e71f05a commit 023a853

File tree

2 files changed

+11
-28
lines changed

2 files changed

+11
-28
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8-
workflow_call:
98

109
jobs:
1110
build:
@@ -32,9 +31,4 @@ jobs:
3231
- name: Make project
3332
run: make
3433
- name: Install project
35-
run: sudo make install
36-
- name: Store build artifacts
37-
uses: actions/upload-artifact@v4
38-
with:
39-
name: build-output
40-
path: build/
34+
run: sudo make install

.github/workflows/run.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
reuse_build:
11-
uses: gamemann/XDP-Firewall/.github/workflows/build.yml@master
1210
run:
13-
needs: reuse_build
1411
runs-on: ubuntu-latest
1512

1613
steps:
1714
- uses: actions/checkout@v4
1815
with:
1916
submodules: recursive
20-
- name: Download artifact from Build workflow
21-
uses: actions/download-artifact@v4
22-
with:
23-
name: build-output
2417
- name: Run apt update
2518
run: sudo apt update
26-
- name: Install LibConfig
27-
run: sudo apt install libconfig-dev
2819
- name: Install LibELF
29-
run: sudo apt install libelf-dev
20+
run: sudo apt install -y libelf-dev
21+
- name: Install LibConfig
22+
run: sudo apt install -y libconfig-dev
3023
- name: Install LLVM
3124
run: sudo apt install -y llvm
3225
- name: Install LibXDP Depedencies
@@ -35,17 +28,13 @@ jobs:
3528
run: make libxdp
3629
- name: Install LibXDP.
3730
run: sudo make libxdp_install
38-
- name: List files
39-
run: ls -la
40-
- name: Create /etc/xdpfw directory.
41-
run: sudo mkdir -p /etc/xdpfw
42-
- name: Copy XDP program to /etc/xdpfw.
43-
run: sudo cp -f ./xdp/xdp_prog.o /etc/xdpfw
44-
- name: Add execute permissions to executable file
45-
run: sudo chmod +x ./loader/xdpfw
31+
- name: Make project
32+
run: make
33+
- name: Install project
34+
run: sudo make install
4635
- name: Create basic config file.
4736
run: echo 'verbose = 5; filters = ( { enabled = true; log = true; action = 0; tcp_enabled = true; tcp_dport = 22; } );' > ./basic.conf
48-
- name: Retrieve default network interface
37+
- name: Retrieve default network interface.
4938
run: echo "INTERFACE=$(ip route | awk '/default/ {print $5}')" >> $GITHUB_ENV
50-
- name: Run XDP FW for 10 seconds using basic config and default network interface.
51-
run: sudo ./loader/xdpfw -c ./basic.conf -t 10 -i ${{ env.INTERFACE }}
39+
- name: Run XDP Firewall for 10 seconds using basic config and default network interface.
40+
run: sudo xdpfw -c ./basic.conf -t 10 -i ${{ env.INTERFACE }}

0 commit comments

Comments
 (0)