chore,ci(packages): Build large packages on the CI without Docker, instead of simply clearing up space

This commit is contained in:
Finagolfin 2023-10-03 12:12:50 +05:30 committed by finagolfin
parent 4661b4145c
commit d1af589d00
1 changed files with 7 additions and 12 deletions

View File

@ -152,17 +152,6 @@ jobs:
fi
done
- name: Free additional disk space (if necessary)
run: |
if grep -q '^clvk$\|^dart$\|^rust$\|^rustc-nightly$\|^tinygo$\|^wasmer$\|^zig$' ./built_termux-main_packages.txt || \
grep -q '^firefox$' ./built_termux-x11_packages.txt; then
echo "Free additional disk space on host"
sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \
mono-runtime-common monodoc-manual ruby
sudo apt autoremove -yq
sudo rm -rf /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift
fi
- name: Lint packages
run: |
declare -a package_recipes
@ -189,7 +178,13 @@ jobs:
done
if [ ! -z "$packages" ]; then
./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} $packages
if grep -q ' clvk\|dart\|libllvm\|rust\|rustc-nightly\|swift\|tinygo\|wasmer\|zig\|firefox ' <<< "$packages"; then
./scripts/setup-ubuntu.sh
sudo apt install ninja-build
NDK=$ANDROID_NDK_ROOT ANDROID_HOME=$ANDROID_SDK_ROOT ./build-package.sh -I -a ${{ matrix.target_arch }} $packages
else
./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} $packages
fi
fi
- name: Generate build artifacts