initial: initial commit #43
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: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # - os: ubuntu-latest | |
| # platform: linux | |
| # arch: amd64 | |
| # - os: macos-latest | |
| # platform: macos | |
| # arch: arm64 | |
| # - os: macos-15-intel | |
| # platform: macos | |
| # arch: amd64 | |
| - os: ubuntu-latest | |
| platform: windows | |
| arch: amd64 | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| TOR_VERSION: 0.4.8.21 | |
| OPENSSL_VERSION: openssl-3.6.0 | |
| LIBEVENT_VERSION: release-2.1.12-stable | |
| ZLIB_VERSION: v1.2.13 | |
| ZSTD_VERSION: v1.4.9 | |
| PLATFORM: ${{ matrix.platform }} | |
| ARCH: ${{ matrix.arch }} | |
| CFLAGS: "-O3 -pipe" | |
| CXXFLAGS: "-O3 -pipe" | |
| NUM_PROCS: 4 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Linux deps | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential automake libtool pkg-config \ | |
| zlib1g-dev libssl-dev libevent-dev \ | |
| git perl python3 cmake | |
| # macOS deps | |
| - name: Install macOS dependencies | |
| if: matrix.platform == 'macos' | |
| run: | | |
| brew update | |
| brew install automake libtool pkg-config \ | |
| openssl@3 libevent cmake git zstd | |
| # Windows deps (MSYS2) | |
| - name: Install Linux dependencies for windows crosscompilation | |
| if: matrix.platform == 'windows' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| automake autoconf libtool pkg-config \ | |
| git perl python3 cmake \ | |
| gcc-mingw-w64-x86-64 \ | |
| binutils-mingw-w64-x86-64 | |
| # Build Tor (Windows) | |
| - name: Build Tor (Windows) | |
| if: matrix.platform == 'windows' | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| chmod +x scripts/build-tor.sh | |
| ./scripts/build-tor.sh | |
| # Build Tor (Linux/macOS) | |
| - name: Build Tor (Linux/macOS) | |
| if: matrix.platform != 'windows' | |
| shell: bash | |
| run: | | |
| chmod +x scripts/build-tor.sh | |
| ./scripts/build-tor.sh | |
| # Upload artifacts | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tor-${{ matrix.platform }}-${{ matrix.arch }} | |
| path: artifacts/* | |