mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-04 21:04:01 +03:00
Optimize aria2c build step to skip if cached
This commit is contained in:
@@ -126,28 +126,29 @@ jobs:
|
|||||||
key: aria2c-${{ runner.os }}-1.37.0
|
key: aria2c-${{ runner.os }}-1.37.0
|
||||||
|
|
||||||
- name: Build aria2c if not cached
|
- name: Build aria2c if not cached
|
||||||
|
if: steps.aria2-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
mkdir -p "$GITHUB_WORKSPACE/dist/linux/bin"
|
mkdir -p "$GITHUB_WORKSPACE/dist/linux/bin"
|
||||||
if [ ! -f "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" ]; then
|
|
||||||
mkdir -p "$GITHUB_WORKSPACE/dist/linux/aria2c_build"
|
mkdir -p "$GITHUB_WORKSPACE/dist/linux/aria2c_build"
|
||||||
cd "$GITHUB_WORKSPACE"
|
cd "$GITHUB_WORKSPACE"
|
||||||
wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz
|
wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz
|
||||||
tar -xzf aria2-1.37.0.tar.gz
|
tar -xzf aria2-1.37.0.tar.gz
|
||||||
cd aria2-1.37.0
|
cd aria2-1.37.0
|
||||||
CFLAGS="-Os -s" LDFLAGS="-static" ./configure \
|
CFLAGS="-Os -s" LDFLAGS="-static" ./configure \
|
||||||
--enable-static --disable-shared \
|
--enable-static --disable-shared \
|
||||||
--disable-libaria2 --without-ca-bundle \
|
--disable-libaria2 --without-ca-bundle \
|
||||||
--without-libnettle --without-libgcrypt \
|
--without-libnettle --without-libgcrypt \
|
||||||
--without-libssh2 --without-libexpat \
|
--without-libssh2 --without-libexpat \
|
||||||
--without-libxml2 --without-libsqlite3 \
|
--without-libxml2 --without-libsqlite3 \
|
||||||
--with-openssl
|
--with-openssl
|
||||||
make -j"$(nproc)"
|
make -j"$(nproc)"
|
||||||
strip src/aria2c
|
strip src/aria2c
|
||||||
cp src/aria2c "$GITHUB_WORKSPACE/dist/linux/bin/aria2c"
|
cp src/aria2c "$GITHUB_WORKSPACE/dist/linux/bin/aria2c"
|
||||||
chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c"
|
chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c"
|
||||||
rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz"
|
rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz"
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Show cache status and bin contents
|
- name: Show cache status and bin contents
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user