ci: fix static-tor configure error; build dynamically (milestone 1) #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 \ | |
| libevent-dev libssl-dev zlib1g-dev liblzma-dev libzstd-dev | |
| - name: Configure | |
| run: | | |
| chmod +x configure | |
| ./configure --disable-asciidoc --disable-man --disable-html-docs | |
| - name: Build | |
| run: make -j$(nproc) | |
| - 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 | |
| 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 | |
| - name: Configure | |
| shell: msys2 {0} | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| chmod +x configure | |
| ./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) | |
| - 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/ | |
| transports: | |
| name: pluggable-transports (Windows x86_64) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: Build obfs4proxy | |
| run: | | |
| GOOS=windows GOARCH=amd64 go build -o obfs4proxy.exe github.com/Yawning/obfs4/obfs4proxy | |
| - name: Build snowflake client | |
| run: | | |
| GOOS=windows GOARCH=amd64 go build -o snowflake-client.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/client | |
| - name: Build webtunnel client | |
| run: | | |
| GOOS=windows GOARCH=amd64 go build -o webtunnel.exe gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/client | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: transports-win64 | |
| path: | | |
| obfs4proxy.exe | |
| snowflake-client.exe | |
| webtunnel.exe |