@@ -2,15 +2,23 @@ name: EngineScript Nginx Build Test
22
33on :
44 pull_request :
5- # Run on all pull requests for comprehensive testing
5+ # Only run expensive build tests when relevant files are changed.
6+ paths :
7+ - ' scripts/**'
8+ - ' config/**'
9+ - ' patches/**'
10+ - ' .github/ci-config/**'
11+ - ' .github/workflows/enginescript-build-test.yml'
12+ - ' enginescript-variables.txt'
613 push :
7- # Run on all pushes to any branch for comprehensive testing
14+ # Only run expensive build tests when relevant files are changed.
815 paths :
916 - ' scripts/**'
1017 - ' config/**'
18+ - ' patches/**'
19+ - ' .github/ci-config/**'
20+ - ' .github/workflows/enginescript-build-test.yml'
1121 - ' enginescript-variables.txt'
12- create :
13- # Run when new branches are created
1422 workflow_dispatch :
1523
1624concurrency :
@@ -20,7 +28,6 @@ concurrency:
2028permissions :
2129 contents : read
2230 pull-requests : write
23- actions : read
2431 issues : write
2532
2633jobs :
@@ -44,15 +51,12 @@ jobs:
4451 sudo rm -rf /usr/local/graalvm
4552 sudo rm -rf /usr/local/.ghcup
4653 sudo docker system prune -af
47- sudo apt-get autoremove -y
48- sudo apt-get autoclean
4954 echo "💾 Available disk space:"
5055 df -h
5156
5257 - name : Setup Nginx Build Environment
5358 run : |
5459 echo "🏗️ Setting up Nginx build environment..."
55- sudo apt-get update -qq
5660
5761 # Create required directories including log directories
5862 sudo mkdir -p /usr/local/bin/enginescript /home/EngineScript /var/log/EngineScript /tmp/ci-logs
@@ -198,10 +202,8 @@ jobs:
198202 sudo apt-get remove 'apache2.*' -y 2>&1 | sudo tee -a /tmp/ci-logs/setup.log
199203 echo "✅ Old packages cleaned up" | sudo tee -a /tmp/ci-logs/setup.log
200204
201- # Final update
202- echo "� Final system update..." | sudo tee -a /tmp/ci-logs/setup.log
203- sudo apt update --allow-releaseinfo-change -y 2>&1 | sudo tee -a /tmp/ci-logs/setup.log
204- sudo apt upgrade -y 2>&1 | sudo tee -a /tmp/ci-logs/setup.log
205+ # Skip duplicate full upgrade pass to reduce CI runtime
206+ echo "⏭️ Skipping duplicate final apt update/upgrade pass in CI" | sudo tee -a /tmp/ci-logs/setup.log
205207
206208 # Skip timezone configuration (problematic in CI)
207209 echo "⏭️ Skipping timezone configuration (not suitable for CI environment)" | sudo tee -a /tmp/ci-logs/setup.log
@@ -457,75 +459,35 @@ jobs:
457459
458460 - name : Install GCC
459461 run : |
460- echo "🔨 Installing GCC..."
461- cd /usr/local/bin/enginescript/scripts/install
462-
463- # Set CI environment variables
464- export CI_ENVIRONMENT=true
465- export DEBIAN_FRONTEND=noninteractive
466-
467- cd /usr/local/bin/enginescript/scripts/install
468-
469- timeout 600 sudo bash ./gcc/gcc-install.sh 2>&1 | sudo tee /tmp/ci-logs/gcc.log || {
470- echo "⚠️ GCC installation had issues, continuing..."
471- tail -30 /tmp/ci-logs/gcc.log 2>/dev/null || echo "No GCC log available"
472- }
473- sudo sync
474- echo "✅ GCC installation completed"
462+ /usr/local/bin/enginescript/scripts/ci/run-install-step.sh \
463+ "GCC" \
464+ "600" \
465+ "/usr/local/bin/enginescript/scripts/install/gcc/gcc-install.sh" \
466+ "/tmp/ci-logs/gcc.log"
475467
476468 - name : Install OpenSSL
477469 run : |
478- echo "� Installing OpenSSL..."
479- cd /usr/local/bin/enginescript/scripts/install
480-
481- # Set CI environment variables
482- export CI_ENVIRONMENT=true
483- export DEBIAN_FRONTEND=noninteractive
484-
485- cd /usr/local/bin/enginescript/scripts/install
486-
487- timeout 900 sudo bash ./openssl/openssl-install.sh 2>&1 | sudo tee /tmp/ci-logs/openssl.log || {
488- echo "⚠️ OpenSSL installation had issues, continuing..."
489- tail -50 /tmp/ci-logs/openssl.log 2>/dev/null || echo "No OpenSSL log available"
490- }
491- sudo sync
492- echo "✅ OpenSSL installation completed"
470+ /usr/local/bin/enginescript/scripts/ci/run-install-step.sh \
471+ "OpenSSL" \
472+ "900" \
473+ "/usr/local/bin/enginescript/scripts/install/openssl/openssl-install.sh" \
474+ "/tmp/ci-logs/openssl.log"
493475
494476 - name : Install PCRE
495477 run : |
496- echo "� Installing PCRE..."
497- cd /usr/local/bin/enginescript/scripts/install
498-
499- # Set CI environment variables
500- export CI_ENVIRONMENT=true
501- export DEBIAN_FRONTEND=noninteractive
502-
503- cd /usr/local/bin/enginescript/scripts/install
504-
505- timeout 600 sudo bash ./pcre/pcre-install.sh 2>&1 | sudo tee /tmp/ci-logs/pcre.log || {
506- echo "⚠️ PCRE installation had issues, continuing..."
507- tail -30 /tmp/ci-logs/pcre.log 2>/dev/null || echo "No PCRE log available"
508- }
509- sudo sync
510- echo "✅ PCRE installation completed"
478+ /usr/local/bin/enginescript/scripts/ci/run-install-step.sh \
479+ "PCRE" \
480+ "600" \
481+ "/usr/local/bin/enginescript/scripts/install/pcre/pcre-install.sh" \
482+ "/tmp/ci-logs/pcre.log"
511483
512484 - name : Install Zlib
513485 run : |
514- echo "📦 Installing Zlib..."
515- cd /usr/local/bin/enginescript/scripts/install
516-
517- # Set CI environment variables
518- export CI_ENVIRONMENT=true
519- export DEBIAN_FRONTEND=noninteractive
520-
521- cd /usr/local/bin/enginescript/scripts/install
522-
523- timeout 600 sudo bash ./zlib/zlib-install.sh 2>&1 | sudo tee /tmp/ci-logs/zlib.log || {
524- echo "⚠️ Zlib installation had issues, continuing..."
525- tail -30 /tmp/ci-logs/zlib.log 2>/dev/null || echo "No Zlib log available"
526- }
527- sudo sync
528- echo "✅ Zlib installation completed"
486+ /usr/local/bin/enginescript/scripts/ci/run-install-step.sh \
487+ "Zlib" \
488+ "600" \
489+ "/usr/local/bin/enginescript/scripts/install/zlib/zlib-install.sh" \
490+ "/tmp/ci-logs/zlib.log"
529491
530492 - name : Build Nginx Component
531493 run : |
0 commit comments