Skip to content

Add initializer for 'score' Reporter, so it doesn't throw when the set of jobs reported is empty #97

Add initializer for 'score' Reporter, so it doesn't throw when the set of jobs reported is empty

Add initializer for 'score' Reporter, so it doesn't throw when the set of jobs reported is empty #97

# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
# This workflow is used for DCPerf CI.
name: DCPerf Health_check CI
on:
# PR Trigger
#
pull_request:
# Push Trigger (enable to catch errors coming out of multiple merges)
#
push:
branches:
- main
# Manual Trigger
#
workflow_dispatch:
concurrency:
# Cancel previous runs in the PR if a new commit is pushed
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Build on CPU hosts (generic GitHub runners)
build_artifact:
runs-on: ${{ matrix.host-machine.instance }}
container:
image: ${{ matrix.host-machine.container }}
options: --user root --privileged --pid=host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
defaults:
run:
shell: bash
env:
PRELUDE: .github/scripts/setup_env.bash
BUILD_ENV: build_env
continue-on-error: false
strategy:
fail-fast: false
matrix:
host-machine: [
{ arch: x86, instance: "ubuntu-latest", container: "ubuntu:22.04", type: "ubuntu" },
{ arch: aarch64, instance: "ubuntu-24.04-arm", container: "ubuntu:22.04", type: "ubuntu" },
]
python-version: [ "3.12" ]
steps:
- name: Setup Build Container (ubuntu-based)
if: ${{ matrix.host-machine.type == 'ubuntu' }}
run: apt update -y; apt install -y build-essential git pciutils socat sudo wget dmidecode
- name: Setup Build Container (centos-based)
if: ${{ matrix.host-machine.type == 'centos' }}
run: |
dnf update -y
dnf install -y git pciutils which dmidecode sudo shadow-utils passwd
- name: Checkout the Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Fix PAM configuration for sudo
if: ${{ matrix.host-machine.type == 'centos' }}
run: |
echo "auth sufficient pam_rootok.so" > /etc/pam.d/sudo
- name: Enable Sudo without password
if: ${{ matrix.host-machine.type == 'centos' }}
run: |
echo "root ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers
- name: Unlock root user account
if: ${{ matrix.host-machine.type == 'centos' }}
run: |
passwd -u root
- name: Free Disk Space on Host
run: . $PRELUDE; free_disk_space_on_host
- name: Display System Info
run: . $PRELUDE; print_system_info
- name: Install Build Tools
run: . $PRELUDE; install_build_tools
- name: Setup Miniconda
run: . $PRELUDE; setup_miniconda $HOME/miniconda
- name: Create Conda Environment
run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }}
- name: Install Python Tools
run: . $PRELUDE; install_python_tools $BUILD_ENV
- name: Install Health_check
run: . $PRELUDE; install_health_check $BUILD_ENV