-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
41 lines (41 loc) · 1.22 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: 'Setup curl'
description: 'Installs a version of curl with websockets enabled'
inputs:
curl_version: # id of input
description: 'The version of curl which is used'
required: true
default: '8.11.1'
runs:
using: "composite"
steps:
- name: Cache curl
uses: actions/cache@v4
with:
path: curl_lib
key: curl-${{ runner.os }}-${{ inputs.curl_version }}
- name: Create working directory
shell: bash
run: |
if [ ! -e curl_lib ]; then
mkdir curl_lib
fi
- name: Setup curl
shell: bash
working-directory: curl_lib
run: |
sudo apt update && sudo apt install libpsl-dev
if [ ! -e Makefile ]; then
curl -o curl.tgz https://curl.se/download/curl-${{ inputs.curl_version }}.tar.gz
tar xzvf curl.tgz --strip-components=1
rm curl.tgz
./configure --with-openssl --enable-websockets
fi
if [ ! -e src/curl ]; then
make
fi
sudo make install
sudo cp -r /usr/local/lib/libcurl* /usr/lib64/
sudo cp -r /usr/local/include/curl/ /usr/include
branding:
icon: 'archive'
color: 'gray-dark'