forked from ValdikSS/GoodbyeDPI
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 2.44 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build GoodbyeDPI
on:
push:
paths:
- 'src/**'
workflow_dispatch:
env:
WINDIVERT_URL: https://reqrypt.org/download/WinDivert-2.2.2-A.zip
WINDIVERT_NAME: WinDivert-2.2.2-A.zip
WINDIVERT_BASENAME: WinDivert-2.2.2-A
WINDIVERT_SHA256: 63cb41763bb4b20f600b6de04e991a9c2be73279e317d4d82f237b150c5f3f15
LLVM_MINGW_VERSION: 20240805
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Declare short commit variable
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Install dependencies
run: |
sudo apt update &&
sudo apt install -y wget unzip
- name: Download and install LLVM-Mingw
run: |
LLVM_MINGW_URL="https://github.com/mstorsjo/llvm-mingw/releases/download/${{ env.LLVM_MINGW_VERSION }}/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64.tar.xz" &&
wget $LLVM_MINGW_URL &&
tar -xf llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64.tar.xz &&
sudo cp -r llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64/* /usr/local/
- name: Download WinDivert from cache
id: windivert-cache
uses: actions/cache@v4
with:
path: ${{ env.WINDIVERT_NAME }}
key: ${{ env.WINDIVERT_SHA256 }}
- name: Download WinDivert from the website
if: steps.windivert-cache.outputs.cache-hit != 'true'
run: |
wget ${{ env.WINDIVERT_URL }} &&
(echo ${{ env.WINDIVERT_SHA256 }} ${{ env.WINDIVERT_NAME }} | sha256sum -c)
- name: Unpack WinDivert
run: unzip ${{ env.WINDIVERT_NAME }}
- name: Compile x86_64
run: |
cd src && make clean &&
make CC=x86_64-w64-mingw32-clang CPREFIX=x86_64-w64-mingw32- BIT64=1 WINDIVERTHEADERS=../${{ env.WINDIVERT_BASENAME }}/include WINDIVERTLIBS=../${{ env.WINDIVERT_BASENAME }}/x64 -j4
- name: Prepare x86_64 directory
run: |
mkdir goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
cp src/goodbyedpi.exe ${{ env.WINDIVERT_BASENAME }}/x64/*.{dll,sys} goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
- name: Upload output file x86_64
uses: actions/upload-artifact@v4
with:
name: goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
path: goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}