-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (86 loc) · 3.09 KB
/
Publish-Python3-Bindings.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Publish
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
windows-testing:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
dir C:\hostedtoolcache\windows\Python\3.12.6
choco install nuget.commandline --yes
nuget install Bison -Version 3.7.4 -OutputDirectory C:\Tools\bison
nuget install PCRE2 -Version 10.39 -OutputDirectory C:\Tools\pcre2
git clone https://github.com/swig/swig/
cd swig
mkdir C:\install\swig
$env:PATH="C:\Tools\CMake\CMake-win64.3.15.5\bin;C:\Tools\bison\Bison.3.7.4\bin;" + $env:PATH
$PCRE_ROOT="C:\Tools\pcre2\PCRE2.10.39.0"
$PCRE_PLATFORM="x64"
$WORKING_DIR=(Get-Location).ToString() -replace "\\","/"
cmake -G "Visual Studio 17 2022" -A "x64" `
-DCMAKE_INSTALL_PREFIX="C:\install\swig" `
-DCMAKE_C_FLAGS="/DPCRE2_STATIC" `
-DCMAKE_CXX_FLAGS="/DPCRE2_STATIC" `
-DPCRE2_INCLUDE_DIR="$PCRE_ROOT/include" `
-DPCRE2_LIBRARY="$PCRE_ROOT/lib/pcre2-8-static.lib" `
-S . -B build
cmake --build build --config Release
cmake --install build --config Release
$env:Path += "C:\install\swig"
cd ..
choco install --yes doxygen.install
choco install --yes doxygen.portable
choco install --yes visualstudio2022community --package-parameters "--add Microsoft.VisualStudio.Workload.NativeDesktop"
- name: Install catch2
run: |
git clone https://github.com/catchorg/Catch2
cd Catch2 ; mkdir build ; cd build
cmake -G "Visual Studio 17 2022" ..
cmake --build . --target install
cd ..
- name: Build
run: |
make all PYENV=C:\hostedtoolcache\windows\Python\3.12.6\x64
- name: Run Binding Tests
run: |
make all PYENV=C:\hostedtoolcache\windows\Python\3.12.6\x64
python -c "from pwnlib.tubes.process import Process; p = Process('C:\hostedtoolcache\windows\Python\3.12.6\x64\python.exe'); p.recv(123)"
- name: Clean
run: make clean
- name: run C catch2 doctests
run: |
cd testing
mkdir build && cd build
cmake ..
cmake --build .
.\Debug\tests.exe
cd ..
- name: Generate doxygen documentation
run: |
mkdir docs
cd docs
doxygen ..\Doxyfile -w html -g .\Doxyfile
cd ..
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
keep_files: true
allow_empty_commit: true
ubuntu-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: echo "hello world"