mirror of
https://github.com/Kron4ek/Conty
synced 2024-12-26 09:58:38 +01:00
Configure Github Actions
Github Actions will build Conty weekly and utils monthly.
This commit is contained in:
parent
e7f0a8736e
commit
5fc1df2043
4 changed files with 107 additions and 8 deletions
24
.github/workflows/conty.yml
vendored
Normal file
24
.github/workflows/conty.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
name: Conty CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 5'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build Conty
|
||||||
|
run: |
|
||||||
|
chmod +x create-arch-bootstrap.sh create-conty.sh
|
||||||
|
sed -i 's/sed/#sed/g' create-arch-bootstrap.sh
|
||||||
|
sudo ./create-arch-bootstrap.sh && ./create-conty.sh
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Conty
|
||||||
|
path: conty.sh
|
57
.github/workflows/utils.yml
vendored
Normal file
57
.github/workflows/utils.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
name: Utils CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 1 * *'
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'create-utils.sh'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Compile utils
|
||||||
|
run: |
|
||||||
|
chmod +x create-utils.sh
|
||||||
|
pacman -Syu --noconfirm --needed base-devel gawk grep lz4 zstd \
|
||||||
|
curl gcc make autoconf libtool pkgconf libcap fuse2 lzo \
|
||||||
|
xz zlib findutils openssl jemalloc xxhash boost lz4 xz \
|
||||||
|
zstd libarchive libunwind google-glog gtest fmt gflags \
|
||||||
|
double-conversion cmake ruby-ronn libevent libdwarf git \
|
||||||
|
clang libsodium liburing libaio
|
||||||
|
build_dwarfs=false ./create-utils.sh
|
||||||
|
tar xf utils.tar.gz
|
||||||
|
mv utils utils-bak
|
||||||
|
pacman -Rdd --noconfirm fuse2
|
||||||
|
pacman -S --noconfirm fuse3
|
||||||
|
build_dwarfs=false ./create-utils.sh
|
||||||
|
tar xf utils.tar.gz
|
||||||
|
rm utils.tar.gz
|
||||||
|
mv utils-bak/* utils
|
||||||
|
tar -zcf utils.tar.gz utils
|
||||||
|
rm -rf utils utils-bak
|
||||||
|
|
||||||
|
build_dwarfs=true ./create-utils.sh
|
||||||
|
tar xf utils_dwarfs.tar.gz
|
||||||
|
rm utils_dwarfs.tar.gz
|
||||||
|
mv utils utils-bak
|
||||||
|
pacman -Rdd --noconfirm fuse3
|
||||||
|
pacman -S --noconfirm fuse2
|
||||||
|
build_dwarfs=true ./create-utils.sh
|
||||||
|
tar xf utils_dwarfs.tar.gz
|
||||||
|
rm utils_dwarfs.tar.gz
|
||||||
|
mv utils-bak/* utils
|
||||||
|
tar -zcf utils_dwarfs.tar.gz utils
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Utils
|
||||||
|
path: |
|
||||||
|
utils.tar.gz
|
||||||
|
utils_dwarfs.tar.gz
|
|
@ -155,12 +155,12 @@ if [ ! -s chaotic-keyring.pkg.tar.zst ] || [ ! -s chaotic-mirrorlist.pkg.tar.zst
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bootstrap_urls=("mirror.cyberbits.eu" \
|
bootstrap_urls=("mirror.f4st.host" \
|
||||||
"arch.hu.fo" \
|
"arch.hu.fo" \
|
||||||
"mirror.f4st.host" \
|
"mirror.cyberbits.eu" \
|
||||||
"mirror.osbeck.com" \
|
"mirror.osbeck.com" \
|
||||||
"mirror.lcarilla.de" \
|
"mirror.lcarilla.de" \
|
||||||
"mirror.moson.org")
|
"mirror.moson.org")
|
||||||
|
|
||||||
echo "Downloading Arch Linux bootstrap"
|
echo "Downloading Arch Linux bootstrap"
|
||||||
|
|
||||||
|
@ -186,6 +186,7 @@ if [ -z "${bootstrap_is_good}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -rf "${bootstrap}"
|
||||||
tar xf archlinux-bootstrap-x86_64.tar.gz
|
tar xf archlinux-bootstrap-x86_64.tar.gz
|
||||||
rm archlinux-bootstrap-x86_64.tar.gz sha256sums.txt sha256.txt
|
rm archlinux-bootstrap-x86_64.tar.gz sha256sums.txt sha256.txt
|
||||||
|
|
||||||
|
@ -255,13 +256,19 @@ if [ -n "\${bad_pkglist}" ]; then
|
||||||
echo \${bad_pkglist} > /opt/bad_pkglist.txt
|
echo \${bad_pkglist} > /opt/bad_pkglist.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pacman --noconfirm --needed -S \${good_pkglist} || pacman --noconfirm --needed -S \${good_pkglist}
|
pacman --noconfirm --needed -S \${good_pkglist} || pacman --noconfirm --needed -S \${good_pkglist} || echo > /opt/pacman_failed.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x "${bootstrap}"/opt/install_packages.sh
|
chmod +x "${bootstrap}"/opt/install_packages.sh
|
||||||
run_in_chroot bash /opt/install_packages.sh
|
run_in_chroot bash /opt/install_packages.sh
|
||||||
rm "${bootstrap}"/opt/install_packages.sh
|
rm "${bootstrap}"/opt/install_packages.sh
|
||||||
|
|
||||||
|
if [ -f "${bootstrap}"/opt/pacman_failed.txt ]; then
|
||||||
|
unmount_chroot
|
||||||
|
echo "Pacman failed to install some packages"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
run_in_chroot locale-gen
|
run_in_chroot locale-gen
|
||||||
|
|
||||||
# Generate a list of installed packages
|
# Generate a list of installed packages
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
script_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
script_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
# Set to true to compile dwarfs instead of squashfuse
|
# Set to true to compile dwarfs instead of squashfuse
|
||||||
build_dwarfs="false"
|
build_dwarfs="${build_dwarfs:-false}"
|
||||||
|
|
||||||
squashfuse_version="0.1.105"
|
squashfuse_version="0.1.105"
|
||||||
bwrap_version="0.8.0"
|
bwrap_version="0.8.0"
|
||||||
|
@ -96,6 +96,11 @@ if ! ldd utils/squashfuse | grep -q libfuse.so.2; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${build_dwarfs}" = "true" ]; then
|
if [ "${build_dwarfs}" = "true" ]; then
|
||||||
|
if command -v clang++ 1>/dev/null; then
|
||||||
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
|
fi
|
||||||
|
|
||||||
git clone https://github.com/mhx/dwarfs.git --recursive
|
git clone https://github.com/mhx/dwarfs.git --recursive
|
||||||
|
|
||||||
# Revert commit aeeddae, because otherwise dwarfs might use
|
# Revert commit aeeddae, because otherwise dwarfs might use
|
||||||
|
@ -107,6 +112,12 @@ if [ "${build_dwarfs}" = "true" ]; then
|
||||||
cd dwarfs || exit 1
|
cd dwarfs || exit 1
|
||||||
git revert --no-commit aeeddaecab5d4648780b0e11dc03fca19e23409a
|
git revert --no-commit aeeddaecab5d4648780b0e11dc03fca19e23409a
|
||||||
|
|
||||||
|
# Fix compilation with GCC 13
|
||||||
|
cd folly
|
||||||
|
curl -#Lo gcc13.patch https://github.com/facebook/folly/commit/39d0cbd592a4d57c34bbf3c751ecd9a4055fbc45.patch
|
||||||
|
patch -Np1 < ./gcc13.patch || exit 1
|
||||||
|
cd ..
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build || exit 1
|
cd build || exit 1
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release \
|
cmake .. -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
|
Loading…
Reference in a new issue