mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
feat: [OCISDEV-779] reduce ci duration, libcurl (#12193)
* feat: [OCISDEV-779] reduce ci duration, libcurl * feat: [OCISDEV-779] reduce ci duration, libcurl * feat: [OCISDEV-779] reduce ci duration, libcurl * feat: [OCISDEV-779] reduce ci duration, libcurl
This commit is contained in:
54
.github/workflows/acceptance-tests.yml
vendored
54
.github/workflows/acceptance-tests.yml
vendored
@@ -149,20 +149,41 @@ jobs:
|
||||
- name: Enable pnpm
|
||||
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
|
||||
|
||||
- name: Install libcurl 8.12.0 from source
|
||||
- name: Cache libcurl 8.12.0
|
||||
id: cache-libcurl
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: /opt/libcurl
|
||||
key: libcurl-8.12.0-${{ runner.os }}
|
||||
|
||||
- name: Install libcurl 8.12.0 build dependencies
|
||||
# Always run: libvips-dev is needed at runtime (govips thumbnails) and for
|
||||
# pkg-config --exists vips to succeed so oCIS is built with ENABLE_VIPS=true.
|
||||
# Skipping this on cache hit would cause oCIS to fall back to the imaging library.
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
# NEEDRESTART_MODE=a: auto-restart services silently; without this, needrestart can fail with exit code 6
|
||||
sudo NEEDRESTART_MODE=a apt-get install -y libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
|
||||
|
||||
- name: Compile libcurl 8.12.0 from source
|
||||
if: steps.cache-libcurl.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd /tmp
|
||||
curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
|
||||
tar xzf curl-8.12.0.tar.gz
|
||||
cd curl-8.12.0
|
||||
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/usr/local --enable-versioned-symbols --silent
|
||||
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/opt/libcurl --enable-versioned-symbols --silent
|
||||
make -j$(nproc) --silent
|
||||
sudo make install --silent
|
||||
|
||||
- name: Restore libcurl ldconfig
|
||||
# Always run: on cache hit the .so files are restored to /opt/libcurl/lib but
|
||||
# /etc/ld.so.cache on the fresh runner doesn't know about them yet.
|
||||
# Without ldconfig, PHP's curl extension can't find libcurl even though it's present.
|
||||
run: |
|
||||
echo "/opt/libcurl/lib" | sudo tee /etc/ld.so.conf.d/libcurl-8.conf
|
||||
sudo ldconfig
|
||||
curl --version | head -1
|
||||
/opt/libcurl/bin/curl --version | head -1
|
||||
php -r '
|
||||
$v = curl_version()["version"];
|
||||
echo "PHP curl: $v\n";
|
||||
@@ -252,20 +273,41 @@ jobs:
|
||||
- name: Enable pnpm
|
||||
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
|
||||
|
||||
- name: Install libcurl 8.12.0 from source
|
||||
- name: Cache libcurl 8.12.0
|
||||
id: cache-libcurl
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: /opt/libcurl
|
||||
key: libcurl-8.12.0-${{ runner.os }}
|
||||
|
||||
- name: Install libcurl 8.12.0 build dependencies
|
||||
# Always run: libvips-dev is needed at runtime (govips thumbnails) and for
|
||||
# pkg-config --exists vips to succeed so oCIS is built with ENABLE_VIPS=true.
|
||||
# Skipping this on cache hit would cause oCIS to fall back to the imaging library.
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
# NEEDRESTART_MODE=a: auto-restart services silently; without this, needrestart can fail with exit code 6
|
||||
sudo NEEDRESTART_MODE=a apt-get install -y libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
|
||||
|
||||
- name: Compile libcurl 8.12.0 from source
|
||||
if: steps.cache-libcurl.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd /tmp
|
||||
curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
|
||||
tar xzf curl-8.12.0.tar.gz
|
||||
cd curl-8.12.0
|
||||
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/usr/local --enable-versioned-symbols --silent
|
||||
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/opt/libcurl --enable-versioned-symbols --silent
|
||||
make -j$(nproc) --silent
|
||||
sudo make install --silent
|
||||
|
||||
- name: Restore libcurl ldconfig
|
||||
# Always run: on cache hit the .so files are restored to /opt/libcurl/lib but
|
||||
# /etc/ld.so.cache on the fresh runner doesn't know about them yet.
|
||||
# Without ldconfig, PHP's curl extension can't find libcurl even though it's present.
|
||||
run: |
|
||||
echo "/opt/libcurl/lib" | sudo tee /etc/ld.so.conf.d/libcurl-8.conf
|
||||
sudo ldconfig
|
||||
curl --version | head -1
|
||||
/opt/libcurl/bin/curl --version | head -1
|
||||
php -r '
|
||||
$v = curl_version()["version"];
|
||||
echo "PHP curl: $v\n";
|
||||
|
||||
Reference in New Issue
Block a user