|
| 1 | +name: Compile and install Curl from source |
| 2 | +description: Compile and install Curl from source |
| 3 | +runs: |
| 4 | + using: composite |
| 5 | + steps: |
| 6 | + |
| 7 | + - name: Show existing env |
| 8 | + shell: bash |
| 9 | + run: | |
| 10 | + curl --version |
| 11 | +
|
| 12 | + - name: Checkout curl repo |
| 13 | + uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + repository: curl/curl |
| 16 | + path: .curl |
| 17 | + fetch-depth: 0 |
| 18 | + |
| 19 | + - name: Checkout latest release tag |
| 20 | + shell: bash |
| 21 | + run: | |
| 22 | + cd .curl |
| 23 | + LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) |
| 24 | + git checkout $LATEST_TAG |
| 25 | + cd ../ |
| 26 | +
|
| 27 | + - name: Install dependencies |
| 28 | + shell: bash |
| 29 | + run: | |
| 30 | + set -x |
| 31 | + sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list |
| 32 | + sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list |
| 33 | + sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list |
| 34 | + sudo apt update |
| 35 | + sudo apt build-dep libcurl4-openssl-dev curl -y |
| 36 | + sudo apt install libgsasl-dev -y |
| 37 | +
|
| 38 | + - name: Configure build |
| 39 | + shell: bash |
| 40 | + run: | |
| 41 | + set -x |
| 42 | + cd .curl |
| 43 | + autoreconf -fi |
| 44 | + ./configure --disable-symbol-hiding --enable-versioned-symbols \ |
| 45 | + --enable-threaded-resolver --with-lber-lib=lber \ |
| 46 | + --enable-websockets \ |
| 47 | + --with-gssapi=/usr --with-nghttp2 \ |
| 48 | + --includedir=/usr/include/$(DEB_HOST_MULTIARCH) \ |
| 49 | + --with-zsh-functions-dir=/usr/share/zsh/vendor-completions \ |
| 50 | + --with-fish-functions-dir=/usr/share/fish/vendor_completions.d \ |
| 51 | + --with-ca-path=/etc/ssl/certs \ |
| 52 | + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \ |
| 53 | + --without-libssh --with-libssh2 \ |
| 54 | + --with-openssl \ |
| 55 | + --enable-http \ |
| 56 | + --enable-ftp \ |
| 57 | + --enable-file \ |
| 58 | + --enable-ipfs \ |
| 59 | + --enable-ldap \ |
| 60 | + --enable-ldaps \ |
| 61 | + --enable-rtsp \ |
| 62 | + --enable-proxy \ |
| 63 | + --enable-dict \ |
| 64 | + --enable-telnet \ |
| 65 | + --enable-tftp \ |
| 66 | + --enable-pop3 \ |
| 67 | + --enable-imap \ |
| 68 | + --enable-smb \ |
| 69 | + --enable-smtp \ |
| 70 | + --enable-gopher \ |
| 71 | + --enable-mqtt \ |
| 72 | + --enable-manual \ |
| 73 | + --enable-docs \ |
| 74 | + --enable-ipv6 \ |
| 75 | + --enable-pthreads \ |
| 76 | + --enable-verbose \ |
| 77 | + --enable-sspi \ |
| 78 | + --enable-basic-auth \ |
| 79 | + --enable-bearer-auth \ |
| 80 | + --enable-digest-auth \ |
| 81 | + --enable-kerberos-auth \ |
| 82 | + --enable-negotiate-auth \ |
| 83 | + --enable-aws \ |
| 84 | + --enable-ntlm \ |
| 85 | + --enable-tls-srp \ |
| 86 | + --enable-unix-sockets \ |
| 87 | + --enable-cookies \ |
| 88 | + --enable-socketpair \ |
| 89 | + --enable-sspi \ |
| 90 | + --enable-http-auth |
| 91 | + |
| 92 | + cd ../ |
| 93 | + |
| 94 | + - name: Compile |
| 95 | + shell: bash |
| 96 | + run: | |
| 97 | + cd ./.curl |
| 98 | + make -j$(/usr/bin/nproc) >/dev/null |
| 99 | + cd ../ |
| 100 | +
|
| 101 | + - name: Install |
| 102 | + shell: bash |
| 103 | + run: | |
| 104 | + set -x |
| 105 | + cd ./.curl |
| 106 | + sudo make install |
| 107 | + sudo ldconfig |
| 108 | + cd ../ |
| 109 | +
|
| 110 | + - name: Show version info |
| 111 | + shell: bash |
| 112 | + run: | |
| 113 | + curl --version |
| 114 | +
|
| 115 | + - name: Cleanup |
| 116 | + shell: bash |
| 117 | + run: | |
| 118 | + rm .curl -Rf |
0 commit comments