77name : DCPerf Django CI
88
99on :
10- # PR Trigger
10+ # PR Trigger — only run when files affecting this benchmark change
1111 #
1212 pull_request :
13+ paths :
14+ - ' packages/common/os-distro.sh'
15+ - ' packages/django_workload/**'
1316
1417 # Push Trigger (enable to catch errors coming out of multiple merges)
1518 #
1619 push :
1720 branches :
1821 - main
22+ paths :
23+ - ' packages/common/os-distro.sh'
24+ - ' packages/django_workload/**'
1925
2026 # Manual Trigger
2127 #
3137 build_artifact :
3238 runs-on : ${{ matrix.host-machine.instance }}
3339 container :
34- image : ubuntu:22.04
40+ image : ${{ matrix.host-machine.container }}
3541 options : --user root --privileged --pid=host
3642 volumes :
3743 - /var/run/docker.sock:/var/run/docker.sock
@@ -41,18 +47,40 @@ jobs:
4147 env :
4248 PRELUDE : .github/scripts/setup_env.bash
4349 BUILD_ENV : build_env
44- continue-on-error : true
50+ continue-on-error : false
4551 strategy :
4652 fail-fast : false
4753 matrix :
4854 host-machine : [
49- { arch: x86, instance: "ubuntu-latest" },
55+ { arch: x86, instance: "ubuntu-latest", container: "quay.io/centos/centos:stream9", type: "centos" },
56+ { arch: aarch64, instance: "ubuntu-24.04-arm", container: "quay.io/centos/centos:stream9", type: "centos" },
57+ { arch: x86, instance: "ubuntu-latest", container: "quay.io/centos/centos:stream10", type: "centos" },
58+ { arch: aarch64, instance: "ubuntu-24.04-arm", container: "quay.io/centos/centos:stream10", type: "centos" },
5059 ]
5160 python-version : [ "3.12" ]
52-
5361 steps :
54- - name : Setup Build Container
55- run : apt update -y; apt install -y build-essential git pciutils socat sudo wget
62+ - name : Setup Build Container (ubuntu-based)
63+ if : ${{ matrix.host-machine.type == 'ubuntu' }}
64+ run : apt update -y; apt install -y build-essential git pciutils socat sudo wget python3-dev
65+
66+ - name : Setup Build Container (centos-based)
67+ if : ${{ matrix.host-machine.type == 'centos' }}
68+ run : dnf update -y; dnf install -y git pciutils which python3-devel sudo shadow-utils passwd ; dnf group install -y "Development Tools" --exclude="texlive*"
69+
70+ - name : Fix PAM configuration for sudo
71+ if : ${{ matrix.host-machine.type == 'centos' }}
72+ run : |
73+ echo "auth sufficient pam_rootok.so" > /etc/pam.d/sudo
74+
75+ - name : Enable Sudo without password
76+ if : ${{ matrix.host-machine.type == 'centos' }}
77+ run : |
78+ echo "root ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers
79+
80+ - name : Unlock root user account
81+ if : ${{ matrix.host-machine.type == 'centos' }}
82+ run : |
83+ passwd -u root
5684
5785 - name : Checkout the Repository
5886 uses : actions/checkout@v4
@@ -65,14 +93,17 @@ jobs:
6593 - name : Display System Info
6694 run : . $PRELUDE; print_system_info
6795
96+ - name : Install Build Tools
97+ run : . $PRELUDE; install_build_tools
98+
6899 - name : Setup Miniconda
69100 run : . $PRELUDE; setup_miniconda $HOME/miniconda
70101
71102 - name : Create Conda Environment
72103 run : . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }}
73104
74105 - name : Install Python Tools
75- run : . $PRELUDE; install_build_tools $BUILD_ENV
106+ run : . $PRELUDE; install_python_tools $BUILD_ENV
76107
77108 - name : Install Django
78109 run : . $PRELUDE; install_django $BUILD_ENV
0 commit comments