-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
64 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM centos:7 | ||
FROM ubuntu:22.04 | ||
|
||
ADD ./file /file | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#/bin/bash | ||
set -ex | ||
cd ${GITHUB_WORKSPACE} | ||
docker pull centos:7 | ||
docker build -t nginx-build . | ||
docker run --name nginx-build nginx-build sh -x /file/run.sh | ||
docker cp nginx-build:/root/rpmbuild/RPMS/x86_64/ ./ | ||
docker run --name nginx-build nginx-build bash -x /file/run.sh | ||
docker cp nginx-build:/root/build/release/ ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
#/bin/bash | ||
apt install -y cmake | ||
if [ -e ngx_brotli/ ];then | ||
cd ./ngx_brotli | ||
git pull &&git submodule update --init --depth=1 | ||
cd .. | ||
else | ||
git clone --depth=1 https://github.com/eustas/ngx_brotli.git --recurse-submodules | ||
#cd ngx_brotli && git submodule update --init --depth=1 && cd ../ | ||
git clone --depth=1 https://github.com/Seshiria/ngx_brotli.git --recurse-submodules | ||
cd ./ngx_brotli && git submodule update --init | ||
cd deps/brotli/ | ||
mkdir out && cd out | ||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. | ||
cmake --build . --config Release --target brotlienc | ||
fi | ||
ADDCONFIG "--add-module=./ngx_brotli" | ||
ADDCONFIG "--add-module=\$(CURDIR)\/debian\/modules\/ngx_brotli" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
#!/bin/bash | ||
#系统检查 | ||
set -ex | ||
(cat /etc/*-release |grep centos |grep 7) || (echo "仅支持centos 7 !请检测系统版本。"&& exit 1 ) | ||
#启用nginx官方的repo | ||
cat << 'EOF' > /etc/yum.repos.d/nginx.repo | ||
[nginx] | ||
name=nginx repo | ||
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ | ||
gpgcheck=0 | ||
enabled=1 | ||
EOF | ||
#新版本git | ||
#curl https://setup.ius.io/ | bash||(echo "无法获取新版本git" && exit 1) | ||
#nginx编译依赖 | ||
yum install -y \ | ||
git2u \ | ||
gcc \ | ||
openssl-devel \ | ||
pcre-devel \ | ||
(cat /etc/*-release |grep ubuntu) || (echo "仅支持ubuntu !请检测系统版本。"&& exit 1 ) | ||
apt update | ||
#nginx 依赖 | ||
#https://nginx.org/en/linux_packages.html#Ubuntu | ||
apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y | ||
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ | ||
| tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null | ||
(gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |grep -q "573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62") || (echo "nginx库签名密钥验证失败" && exit 1) | ||
#配置为stable | ||
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ | ||
http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ | ||
| tee /etc/apt/sources.list.d/nginx.list | ||
echo "deb-src [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ | ||
http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ | ||
| tee /etc/apt/sources.list.d/nginx-src.list | ||
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | ||
| tee /etc/apt/preferences.d/99nginx | ||
#编译依赖 | ||
apt install -y \ | ||
make \ | ||
rpm-build \ | ||
git | ||
#清理 | ||
yum clean all | ||
git \ | ||
debhelper \ | ||
quilt \ | ||
libssl-dev \ | ||
libpcre2-dev \ | ||
zlib1g-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters