From f151de081dcabcd4af1e52c3d2a727b005b3dbeb Mon Sep 17 00:00:00 2001 From: Haldir65 Date: Wed, 3 Apr 2024 14:15:58 +0800 Subject: [PATCH] [curlBuild] build curl with http3 support try openwrt --- .github/workflows/build_curl_http3.yml | 32 ++++++++++++++++++++++++-- scripts/build_curl_http3.sh | 4 ++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_curl_http3.yml b/.github/workflows/build_curl_http3.yml index 2efe286..d5145d3 100644 --- a/.github/workflows/build_curl_http3.yml +++ b/.github/workflows/build_curl_http3.yml @@ -64,7 +64,7 @@ jobs: if: startsWith(matrix.target.id, 'linux-') shell: bash run: | - sudo apt install ninja-build build-essential autoconf automake clang coreutils libidn2-0-dev pkg-config -y + sudo apt install ninja-build build-essential autoconf automake tree clang coreutils libidn2-0-dev pkg-config -y echo "cpu core num is " nproc @@ -107,4 +107,32 @@ jobs: name: ${{ matrix.target.id }}-${{ matrix.target.os }}-prebuilt path: dist if-no-files-found: error - retention-days: 7 \ No newline at end of file + retention-days: 7 + + + buildCurlHttp3Openwrt: + runs-on: ubuntu-latest + if: "contains(github.event.head_commit.message, '[curlBuild]')" + container: + # image: docker://haldir65/hello-docker-hub:openwrt-toolchians-19.07.1 + image: ghcr.io/haldir65/upgraded-train:openwrt-19.07.1 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install `ninja` on Ubuntu + shell: bash + run: | + sudo apt install ninja-build build-essential autoconf automake clang coreutils tree libidn2-0-dev pkg-config -y + echo "cpu core num is " + echo "cpu core num is " + echo "${STAGING_DIR}" + echo "${PATH}" + nproc + - name: build test + shell: bash + run: | + tree -L 2 + chmod +x scripts/build_curl_http3.sh + CC=${STAGING_DIR}/toolchain-mipsel_24kc_gcc-7.5.0_musl/bin/mipsel-openwrt-linux-gcc \ + CXX=${STAGING_DIR}/toolchain-mipsel_24kc_gcc-7.5.0_musl/bin/mipsel-openwrt-linux-g++ .scripts/build_curl_http3.sh \ No newline at end of file diff --git a/scripts/build_curl_http3.sh b/scripts/build_curl_http3.sh index 004e0ae..5c22923 100755 --- a/scripts/build_curl_http3.sh +++ b/scripts/build_curl_http3.sh @@ -50,6 +50,10 @@ function _prepare(){ mkdir -p ${prebuilt_zstd_root} mkdir -p ${prebuilt_psl_root} mkdir -p ${prebuilt_c_ares_root} + + _Cyan "\n CC = ${CC} \n" + _Cyan "CXX = ${CXX} \n" + }