Skip to content

Commit a288e05

Browse files
author
Delta-Kronecker
committed
ci: capture build logs as artifacts + add gettext/perl for win build
1 parent 0e4e6bd commit a288e05

1 file changed

Lines changed: 33 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
./configure --disable-asciidoc --disable-man --disable-html-docs
2828
2929
- name: Build
30-
run: make -j$(nproc)
30+
run: |
31+
make -j$(nproc) 2>&1 | tee build-linux.log
32+
exit ${PIPESTATUS[0]}
3133
3234
- name: Smoke test
3335
run: ./src/app/tor --version
@@ -38,6 +40,13 @@ jobs:
3840
name: tor-linux-x86_64
3941
path: src/app/tor
4042

43+
- name: Upload build log
44+
if: always()
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: build-log-linux
48+
path: build-linux.log
49+
4150
tor-win64:
4251
name: tor (Windows x86_64)
4352
runs-on: windows-latest
@@ -56,6 +65,8 @@ jobs:
5665
mingw-w64-x86_64-libevent
5766
mingw-w64-x86_64-openssl
5867
mingw-w64-x86_64-zlib
68+
mingw-w64-x86_64-gettext
69+
perl
5970
6071
- name: Configure
6172
shell: msys2 {0}
@@ -69,7 +80,8 @@ jobs:
6980
shell: msys2 {0}
7081
run: |
7182
cd "$GITHUB_WORKSPACE"
72-
make -j$(nproc)
83+
make -j$(nproc) 2>&1 | tee build-win.log
84+
exit ${PIPESTATUS[0]}
7385
7486
- name: Smoke test
7587
shell: msys2 {0}
@@ -91,6 +103,13 @@ jobs:
91103
name: tor-win64
92104
path: dist/
93105

106+
- name: Upload build log
107+
if: always()
108+
uses: actions/upload-artifact@v4
109+
with:
110+
name: build-log-win
111+
path: build-win.log
112+
94113
transports:
95114
name: pluggable-transports (Windows x86_64)
96115
runs-on: ubuntu-latest
@@ -100,23 +119,25 @@ jobs:
100119
with:
101120
go-version: "1.24"
102121

103-
- name: Build obfs4proxy
104-
run: |
105-
GOOS=windows GOARCH=amd64 go build -o obfs4proxy.exe github.com/Yawning/obfs4/obfs4proxy
106-
107-
- name: Build snowflake client
108-
run: |
109-
GOOS=windows GOARCH=amd64 go build -o snowflake-client.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/client
110-
111-
- name: Build webtunnel client
122+
- name: Build pluggable transports
112123
run: |
113-
GOOS=windows GOARCH=amd64 go build -o webtunnel.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/client
124+
set -e
125+
{
126+
echo "=== obfs4 ==="
127+
GOOS=windows GOARCH=amd64 go build -o obfs4proxy.exe github.com/Yawning/obfs4/obfs4proxy 2>&1 || true
128+
echo "=== snowflake client ==="
129+
GOOS=windows GOARCH=amd64 go build -o snowflake-client.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/client 2>&1 || true
130+
echo "=== webtunnel client ==="
131+
GOOS=windows GOARCH=amd64 go build -o webtunnel.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/client 2>&1 || true
132+
} | tee build-transports.log
114133
115134
- name: Upload artifact
135+
if: always()
116136
uses: actions/upload-artifact@v4
117137
with:
118138
name: transports-win64
119139
path: |
120140
obfs4proxy.exe
121141
snowflake-client.exe
122142
webtunnel.exe
143+
build-transports.log

0 commit comments

Comments
 (0)