Skip to content

Commit d2c2fb2

Browse files
Update A.yml
1 parent 6bb47ce commit d2c2fb2

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

.github/workflows/A.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
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+
117
- name: Build dependencies & Curl
218
run: |
319
export CC=aarch64-linux-gnu-gcc
420
export CXX=aarch64-linux-gnu-g++
521
export ARCH=aarch64
622
7-
# 1. [span_1](start_span)Build BoringSSL (Keep this, it was working!)[span_1](end_span)
23+
# 1. Build BoringSSL
824
git clone --depth 1 https://boringssl.googlesource.com/boringssl
925
cd boringssl && mkdir build && cd build
1026
cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 \
@@ -14,24 +30,23 @@
1430
make -j$(nproc)
1531
cd ../../
1632
17-
# 2. [span_2](start_span)Build nghttp2[span_2](end_span)
33+
# 2. Build nghttp2
1834
wget https://github.com/nghttp2/nghttp2/releases/download/v1.58.0/nghttp2-1.58.0.tar.gz
1935
tar -xf nghttp2-1.58.0.tar.gz
2036
cd nghttp2-1.58.0
2137
./configure --host=aarch64-linux-gnu --enable-static --disable-shared --prefix=$GITHUB_WORKSPACE/deps
2238
make -j$(nproc) install
2339
cd ..
2440
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
2743
git clone --depth 1 https://github.com/lwthiker/curl-impersonate.git
2844
29-
# SECOND: Get Curl
3045
wget https://github.com/curl/curl/releases/download/curl-8_1_2/curl-8.1.2.tar.gz
3146
tar -xf curl-8.1.2.tar.gz
3247
cd curl-8.1.2
3348
34-
# THIRD: Apply the patch correctly from the repo we just cloned
49+
# Apply the patch using the correct path
3550
patch -p1 < ../curl-impersonate/chrome/patches/curl-impersonate.patch
3651
3752
./configure --host=aarch64-linux-gnu \
@@ -41,6 +56,19 @@
4156
--prefix=$GITHUB_WORKSPACE/out
4257
make -j$(nproc)
4358
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
4472
./configure --host=aarch64-linux-gnu --enable-static --disable-shared --prefix=$GITHUB_WORKSPACE/deps
4573
make -j$(nproc) install
4674
cd ..

0 commit comments

Comments
 (0)