-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (131 loc) · 4.13 KB
/
Copy pathbuild.yml
File metadata and controls
155 lines (131 loc) · 4.13 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Build Tor
on:
push:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
jobs:
tor-linux:
name: tor (Linux x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config \
autoconf automake libtool m4 perl \
libevent-dev libssl-dev zlib1g-dev liblzma-dev libzstd-dev
- name: Configure
run: |
chmod +x configure
chmod -R +x scripts
./configure --disable-asciidoc --disable-man --disable-html-docs
- name: Build
run: |
make -j$(nproc) 2>&1 | tee build-linux.log
exit ${PIPESTATUS[0]}
- name: Smoke test
run: ./src/app/tor --version
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tor-linux-x86_64
path: src/app/tor
- name: Upload build log
if: always()
uses: actions/upload-artifact@v4
with:
name: build-log-linux
path: build-linux.log
tor-win64:
name: tor (Windows x86_64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-binutils
make
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-libevent
mingw-w64-x86_64-openssl
mingw-w64-x86_64-zlib
mingw-w64-x86_64-gettext
perl
autoconf
automake
libtool
m4
- name: Configure
shell: msys2 {0}
run: |
cd "$GITHUB_WORKSPACE"
chmod +x configure
chmod -R +x scripts
./configure --host=x86_64-w64-mingw32 \
--disable-asciidoc --disable-man --disable-html-docs
- name: Build
shell: msys2 {0}
run: |
cd "$GITHUB_WORKSPACE"
make -j$(nproc) 2>&1 | tee build-win.log
exit ${PIPESTATUS[0]}
- name: Smoke test
shell: msys2 {0}
run: |
cd "$GITHUB_WORKSPACE"
./src/app/tor.exe --version
- name: Stage binaries + runtime DLLs
shell: msys2 {0}
run: |
cd "$GITHUB_WORKSPACE"
mkdir -p dist
cp src/app/tor.exe dist/
cp "$MINGW_PREFIX"/bin/libevent*.dll "$MINGW_PREFIX"/bin/libssl-3-x64.dll "$MINGW_PREFIX"/bin/libcrypto-3-x64.dll "$MINGW_PREFIX"/bin/zlib1.dll dist/ 2>/dev/null || true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tor-win64
path: dist/
- name: Upload build log
if: always()
uses: actions/upload-artifact@v4
with:
name: build-log-win
path: build-win.log
transports:
name: pluggable-transports (Windows x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build pluggable transports
run: |
set -e
mkdir -p out
GOPATH_BIN="$(go env GOPATH)/bin/windows_amd64"
echo "=== obfs4 ==="
GOOS=windows GOARCH=amd64 \
go install gitlab.com/yawning/obfs4.git/obfs4proxy@latest
cp "$GOPATH_BIN/obfs4proxy.exe" out/obfs4proxy.exe
echo "=== snowflake client ==="
GOOS=windows GOARCH=amd64 \
go install gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/client@latest
cp "$GOPATH_BIN/client.exe" out/snowflake-client.exe
echo "=== webtunnel client ==="
GOOS=windows GOARCH=amd64 \
go install gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/main/client@latest
cp "$GOPATH_BIN/client.exe" out/webtunnel.exe
ls -la out/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: transports-win64
path: out/