|
| 1 | +name: Ultimate Aarch64 Build |
| 2 | +on: [workflow_dispatch] |
| 3 | + |
| 4 | +jobs: |
| 5 | + build_android: |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Checkout Repo |
| 9 | + uses: actions/checkout@v4 |
| 10 | + |
| 11 | + - name: Install Build Tools |
| 12 | + run: | |
| 13 | + sudo apt-get update |
| 14 | + sudo apt-get install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu \ |
| 15 | + build-essential cmake golang-go unzip wget pkg-config |
| 16 | +
|
1 | 17 | - name: Build dependencies & Curl |
2 | 18 | run: | |
3 | 19 | export CC=aarch64-linux-gnu-gcc |
4 | 20 | export CXX=aarch64-linux-gnu-g++ |
5 | 21 | export ARCH=aarch64 |
6 | 22 | |
7 | | - # 1. [span_1](start_span)Build BoringSSL (Keep this, it was working!)[span_1](end_span) |
| 23 | + # 1. Build BoringSSL |
8 | 24 | git clone --depth 1 https://boringssl.googlesource.com/boringssl |
9 | 25 | cd boringssl && mkdir build && cd build |
10 | 26 | cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 \ |
|
14 | 30 | make -j$(nproc) |
15 | 31 | cd ../../ |
16 | 32 |
|
17 | | - # 2. [span_2](start_span)Build nghttp2[span_2](end_span) |
| 33 | + # 2. Build nghttp2 |
18 | 34 | wget https://github.com/nghttp2/nghttp2/releases/download/v1.58.0/nghttp2-1.58.0.tar.gz |
19 | 35 | tar -xf nghttp2-1.58.0.tar.gz |
20 | 36 | cd nghttp2-1.58.0 |
21 | 37 | ./configure --host=aarch64-linux-gnu --enable-static --disable-shared --prefix=$GITHUB_WORKSPACE/deps |
22 | 38 | make -j$(nproc) install |
23 | 39 | cd .. |
24 | 40 |
|
25 | | - # 3. [span_3](start_span)FIX: Build the Patched Curl[span_3](end_span) |
26 | | - # FIRST: Get the actual patches from the impersonate repo |
| 41 | + # 3. FIX: Get Patches and Build Curl |
| 42 | + # We clone the impersonate repo just for the patches |
27 | 43 | git clone --depth 1 https://github.com/lwthiker/curl-impersonate.git |
28 | 44 | |
29 | | - # SECOND: Get Curl |
30 | 45 | wget https://github.com/curl/curl/releases/download/curl-8_1_2/curl-8.1.2.tar.gz |
31 | 46 | tar -xf curl-8.1.2.tar.gz |
32 | 47 | cd curl-8.1.2 |
33 | 48 | |
34 | | - # THIRD: Apply the patch correctly from the repo we just cloned |
| 49 | + # Apply the patch using the correct path |
35 | 50 | patch -p1 < ../curl-impersonate/chrome/patches/curl-impersonate.patch |
36 | 51 | |
37 | 52 | ./configure --host=aarch64-linux-gnu \ |
|
41 | 56 | --prefix=$GITHUB_WORKSPACE/out |
42 | 57 | make -j$(nproc) |
43 | 58 | make install |
| 59 | +
|
| 60 | + - name: Upload Final Binary |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: curl-impersonate-aarch64 |
| 64 | + path: out/bin/curl |
| 65 | + ./configure --host=aarch64-linux-gnu \ |
| 66 | + --with-openssl=$GITHUB_WORKSPACE/boringssl \ |
| 67 | + --with-nghttp2=$GITHUB_WORKSPACE/deps \ |
| 68 | + --enable-static --disable-shared \ |
| 69 | + --prefix=$GITHUB_WORKSPACE/out |
| 70 | + make -j$(nproc) |
| 71 | + make install |
44 | 72 | ./configure --host=aarch64-linux-gnu --enable-static --disable-shared --prefix=$GITHUB_WORKSPACE/deps |
45 | 73 | make -j$(nproc) install |
46 | 74 | cd .. |
|
0 commit comments