2021-12-26 12:03:35 +00:00
|
|
|
name: Build GoodbyeDPI
|
|
|
|
|
|
|
|
on:
|
2021-12-26 12:12:13 +00:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'src/**'
|
2024-08-08 09:57:35 +00:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'src/**'
|
2023-03-29 10:38:48 +00:00
|
|
|
workflow_dispatch:
|
2021-12-26 12:03:35 +00:00
|
|
|
|
|
|
|
env:
|
2024-07-24 21:51:47 +00:00
|
|
|
WINDIVERT_URL: https://reqrypt.org/download/WinDivert-2.2.0-D.zip
|
|
|
|
WINDIVERT_NAME: WinDivert-2.2.0-D.zip
|
|
|
|
WINDIVERT_BASENAME: WinDivert-2.2.0-D
|
|
|
|
WINDIVERT_SHA256: 1d461cfdfa7ba88ebcfbb3603b71b703e9f72aba8aeff99a75ce293e6f89d2ba
|
2021-12-26 12:03:35 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-23 04:11:18 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-12-26 12:03:35 +00:00
|
|
|
|
|
|
|
- name: Declare short commit variable
|
|
|
|
id: vars
|
|
|
|
run: |
|
2024-07-23 04:14:35 +00:00
|
|
|
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
2021-12-26 12:03:35 +00:00
|
|
|
|
|
|
|
- name: Install MinGW-w64
|
|
|
|
run: >
|
2021-12-27 21:22:18 +00:00
|
|
|
sudo rm /var/lib/man-db/auto-update &&
|
2021-12-26 12:03:35 +00:00
|
|
|
sudo DEBIAN_FRONTEND=noninteractive XZ_DEFAULTS="-T0" XZ_OPT="-T0" eatmydata
|
|
|
|
apt install -y --no-install-recommends gcc-mingw-w64
|
|
|
|
|
|
|
|
- name: Download WinDivert from cache
|
|
|
|
id: windivert-cache
|
2024-07-23 04:11:18 +00:00
|
|
|
uses: actions/cache@v4
|
2021-12-26 12:03:35 +00:00
|
|
|
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 &&
|
2022-01-04 12:06:54 +00:00
|
|
|
make CPREFIX=x86_64-w64-mingw32- BIT64=1 WINDIVERTHEADERS=../${{ env.WINDIVERT_BASENAME }}/include WINDIVERTLIBS=../${{ env.WINDIVERT_BASENAME }}/x64 -j4
|
2024-07-23 04:11:18 +00:00
|
|
|
|
2021-12-26 12:03:35 +00:00
|
|
|
- name: Prepare x86_64 directory
|
|
|
|
run: |
|
|
|
|
mkdir goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
|
2022-01-04 12:06:54 +00:00
|
|
|
cp src/goodbyedpi.exe ${{ env.WINDIVERT_BASENAME }}/x64/*.{dll,sys} goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
|
2021-12-26 12:03:35 +00:00
|
|
|
|
2022-01-04 12:06:54 +00:00
|
|
|
- name: Upload output file x86_64
|
2024-07-23 04:11:18 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-12-26 12:03:35 +00:00
|
|
|
with:
|
|
|
|
name: goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
|
|
|
|
path: goodbyedpi_x86_64_${{ steps.vars.outputs.sha_short }}
|
|
|
|
|
|
|
|
- name: Compile i686
|
|
|
|
run: >
|
|
|
|
cd src && make clean &&
|
2022-01-04 12:06:54 +00:00
|
|
|
make CPREFIX=i686-w64-mingw32- WINDIVERTHEADERS=../${{ env.WINDIVERT_BASENAME }}/include WINDIVERTLIBS=../${{ env.WINDIVERT_BASENAME }}/x86 -j4
|
2021-12-26 12:03:35 +00:00
|
|
|
|
|
|
|
- name: Prepare x86 directory
|
|
|
|
run: |
|
|
|
|
mkdir goodbyedpi_x86_${{ steps.vars.outputs.sha_short }}
|
2022-01-04 12:06:54 +00:00
|
|
|
cp src/goodbyedpi.exe ${{ env.WINDIVERT_BASENAME }}/x86/*.{dll,sys} goodbyedpi_x86_${{ steps.vars.outputs.sha_short }}
|
2021-12-26 12:03:35 +00:00
|
|
|
|
|
|
|
- name: Upload output file x86
|
2024-07-23 04:11:18 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-12-26 12:03:35 +00:00
|
|
|
with:
|
|
|
|
name: goodbyedpi_x86_${{ steps.vars.outputs.sha_short }}
|
|
|
|
path: goodbyedpi_x86_${{ steps.vars.outputs.sha_short }}
|