Add a GEOPM_VERBOSITY environment variable #135
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
# | |
# Copyright (c) 2015 - 2024 Intel Corporation | |
# SPDX-License-Identifier: BSD-3-Clause | |
# | |
name: C/C++ CI | |
on: | |
push: | |
branches: | |
- dev | |
- release-v3.0 | |
- release-v3.1 | |
pull_request: | |
branches: | |
- dev | |
- release-v3.0 | |
- release-v3.1 | |
permissions: read-all | |
concurrency: | |
group: ci-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
precheck: | |
name: "Pre-build checks" | |
# Run linters and other low-cost checks that do not depend on being in a | |
# particular configuration of the build matrix. | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: codespell-project/actions-codespell@94259cd8be02ad2903ba34a22d9c13de21a74461 # v2.0 | |
build_and_test: | |
name: "test: ${{ matrix.config.name }} ${{ matrix.debug-flag }} libgeopmd:${{ matrix.service-asan-flag }} libgeopm:${{ matrix.base-asan-flag }}" | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
config: | |
- { | |
name: clang-15, | |
cc: "clang-15", cxx: "clang++-15" | |
} | |
- { | |
name: gcc-12, | |
cc: "gcc-12", cxx: "g++-12" | |
} | |
debug-flag: ["enable-debug", "disable-debug"] | |
service-asan-flag: ["disable-asan"] | |
base-asan-flag: ["disable-asan"] | |
include: | |
- config: {name: clang-15, cc: "clang-15", cxx: "clang++-15"} | |
debug-flag: "enable-debug" | |
service-asan-flag: "enable-asan" | |
base-asan-flag: "disable-asan" | |
- config: {name: clang-15, cc: "clang-15", cxx: "clang++-15"} | |
debug-flag: "enable-debug" | |
service-asan-flag: "disable-asan" | |
base-asan-flag: "enable-asan" | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
FC: gfortran-9 | |
F77: gfortran-9 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: install system dependencies | |
run: sudo apt-get update && sudo apt-get install libelf-dev mpich libmpich-dev libomp-15-dev libsystemd-dev liburing-dev python3-gi python3-yaml libcap-dev zlib1g-dev doxygen graphviz | |
- name: install geopmpy and geopmdpy along with their development dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel pep517 | |
python3 -m pip install -r geopmdpy/requirements.txt | |
python3 -m pip install -r geopmpy/requirements.txt | |
python3 -m pip install -r docs/requirements.txt | |
python3 -m pip install -r requirements.txt | |
python3 -m pip install ./geopmdpy | |
python3 -m pip install ./geopmpy | |
- name: check include guards | |
shell: bash | |
run: .github/include_guards.sh | |
- name: configure libgeopmd dir | |
working-directory: libgeopmd | |
run: ./autogen.sh && ./configure --${{ matrix.debug-flag }} --${{ matrix.service-asan-flag }} || (cat config.log && false) | |
- name: make libgeopmd dir | |
working-directory: libgeopmd | |
run: make -j2 | |
- name: make libgeopmd dist | |
working-directory: libgeopmd | |
run: make -j2 dist | |
- name: make checkprogs libgeopmd | |
working-directory: libgeopmd | |
run: make checkprogs -j2 | |
- name: make check libgeopmd | |
working-directory: libgeopmd | |
env: | |
LD_LIBRARY_PATH: .libs:${LD_LIBRARY_PATH} | |
run: make check | |
- name: configure libgeopm dir | |
working-directory: libgeopm | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: ./autogen.sh && ./configure --enable-beta --disable-openmp --with-geopmd-lib=../libgeopmd/.libs --with-geopmd-include=../libgeopmd/src --${{ matrix.debug-flag }} --${{ matrix.base-asan-flag }} || (cat config.log && false) | |
- name: make libgeopm dir | |
working-directory: libgeopm | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make -j2 | |
- name: make libgeopm dist | |
working-directory: libgeopm | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make -j2 dist | |
- name: make checkprogs libgeopm | |
working-directory: libgeopm | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make checkprogs -j2 | |
- name: make check libgeopm | |
working-directory: libgeopm | |
env: | |
LD_LIBRARY_PATH: .libs:../libgeopmd/.libs:${LD_LIBRARY_PATH} | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make check | |
- name: test geopmdpy | |
if: matrix.service-asan-flag != 'enable-asan' | |
working-directory: geopmdpy | |
env: | |
LD_LIBRARY_PATH: ../libgeopmd/.libs:${LD_LIBRARY_PATH} | |
run: python3 test | |
- name: make geopmdpy dist | |
if: matrix.service-asan-flag != 'enable-asan' | |
working-directory: geopmdpy | |
run: ./make_sdist.sh | |
- name: test geopmpy | |
if: matrix.service-asan-flag != 'enable-asan' && matrix.base-asan-flag != 'enable-asan' | |
working-directory: geopmpy | |
env: | |
LD_LIBRARY_PATH: ../libgeopm/.libs:${LD_LIBRARY_PATH} | |
run: python3 test | |
- name: make geopmpy dist | |
if: matrix.service-asan-flag != 'enable-asan' | |
working-directory: geopmpy | |
run: ./make_sdist.sh | |
- name: make docs dist | |
if: matrix.service-asan-flag != 'enable-asan' | |
working-directory: docs | |
run: make dist | |
- name: show failure logs | |
if: ${{ failure() }} | |
run: | | |
cat ./*/test/test-suite.log || true | |
cat integration/service/open_pbs/*.log || true | |
publish_obs: | |
if: github.event_name == 'push' | |
needs: build_and_test | |
name: "publish_obs" | |
runs-on: ubuntu-22.04 | |
env: | |
CC: "gcc-12" | |
CXX: "g++-12" | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: install system dependencies | |
run: sudo apt-get update && sudo apt-get install libelf-dev mpich libmpich-dev libomp-15-dev libsystemd-dev liburing-dev python3-gi python3-yaml osc python3-m2crypto libcap-dev zlib1g-dev python3-build python3-setuptools-scm doxygen graphviz | |
- name: install geopmpy and geopmdpy python dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel pep517 | |
python3 -m pip install -r docs/requirements.txt | |
python3 -m pip install ./geopmdpy | |
python3 -m pip install ./geopmpy | |
- name: configure libgeopmd dir | |
working-directory: libgeopmd | |
run: ./autogen.sh && ./configure || (cat config.log && false) | |
- name: make libgeopmd dist | |
working-directory: libgeopmd | |
run: make -j2 dist | |
- name: make libgeopmd libs | |
working-directory: libgeopmd | |
run: make -j2 | |
- name: configure libgeopm dir | |
working-directory: libgeopm | |
run: ./autogen.sh && ./configure --disable-openmp --disable-mpi || (cat config.log && false) | |
- name: make libgeopm dist | |
working-directory: libgeopm | |
run: make -j2 dist | |
- name: make geopmdpy dist | |
working-directory: geopmdpy | |
run: ./make_sdist.sh | |
- name: make geopmpy dist | |
working-directory: geopmpy | |
run: ./make_sdist.sh | |
- name: make docs dist | |
working-directory: docs | |
run: make dist | |
- name: set OSC credentials | |
run: | | |
echo -e "[general]\n\n[https://api.opensuse.org]\ncredentials_mgr_class=osc.credentials.ObfuscatedConfigFileCredentialsManager" > ~/.oscrc | |
echo "user = ${{ github.repository_owner }}" >> ~/.oscrc | |
echo "pass = ${{ secrets.OSC_CREDENTIALS }}" >> ~/.oscrc | |
if [[ "${{ github.ref_name }}" == "release-v3.1" ]]; then | |
echo "SERVICE_PACKAGE=home:${{ github.repository_owner }}:release/geopm-service" >> ${GITHUB_ENV} | |
echo "RUNTIME_PACKAGE=home:${{ github.repository_owner }}:release/geopm-runtime" >> ${GITHUB_ENV} | |
echo "GEOPMDPY_PACKAGE=home:${{ github.repository_owner }}:release/python3-geopmdpy" >> ${GITHUB_ENV} | |
echo "GEOPMPY_PACKAGE=home:${{ github.repository_owner }}:release/python3-geopmpy" >> ${GITHUB_ENV} | |
echo "DOCS_PACKAGE=home:${{ github.repository_owner }}:release/geopm-doc" >> ${GITHUB_ENV} | |
elif [[ "${{ github.ref_name }}" == "release-v3.0" ]]; then | |
echo "SERVICE_PACKAGE=home:${{ github.repository_owner }}:release-v3.0/geopm-service" >> ${GITHUB_ENV} | |
echo "RUNTIME_PACKAGE=home:${{ github.repository_owner }}:release-v3.0/geopm-runtime" >> ${GITHUB_ENV} | |
else | |
echo "SERVICE_PACKAGE=home:${{ github.repository_owner }}/geopm-service" >> ${GITHUB_ENV} | |
echo "RUNTIME_PACKAGE=home:${{ github.repository_owner }}/geopm-runtime" >> ${GITHUB_ENV} | |
echo "GEOPMDPY_PACKAGE=home:${{ github.repository_owner }}/python3-geopmdpy" >> ${GITHUB_ENV} | |
echo "GEOPMPY_PACKAGE=home:${{ github.repository_owner }}/python3-geopmpy" >> ${GITHUB_ENV} | |
echo "DOCS_PACKAGE=home:${{ github.repository_owner }}/geopm-doc" >> ${GITHUB_ENV} | |
fi | |
- name: publish libgeopmd | |
working-directory: libgeopmd | |
run: | | |
osc co ${SERVICE_PACKAGE} | |
rm -f ${SERVICE_PACKAGE}/geopm-service*.tar.gz | |
cp geopm-service.spec ${SERVICE_PACKAGE} | |
cp geopm-service*.tar.gz ${SERVICE_PACKAGE} | |
cd ${SERVICE_PACKAGE} | |
osc addremove | |
cd - | |
osc ci -m "geopm service ${{ github.sha }}" ${SERVICE_PACKAGE} | |
- name: publish runtime | |
working-directory: libgeopm | |
run: | | |
osc co ${RUNTIME_PACKAGE} | |
rm -f ${RUNTIME_PACKAGE}/geopm-runtime*.tar.gz | |
cp geopm-runtime.spec ${RUNTIME_PACKAGE} | |
cp geopm-runtime*.tar.gz ${RUNTIME_PACKAGE} | |
cd ${RUNTIME_PACKAGE} | |
osc addremove | |
cd - | |
osc ci -m "geopm runtime ${{ github.sha }}" ${RUNTIME_PACKAGE} | |
- name: publish geopmdpy | |
if: ${{ github.ref_name }} != 'release-v3.0' | |
working-directory: geopmdpy | |
run: | | |
osc co ${GEOPMDPY_PACKAGE} | |
rm -f ${GEOPMDPY_PACKAGE}/geopmdpy*.tar.gz | |
cp geopmdpy.spec ${GEOPMDPY_PACKAGE} | |
cp dist/geopmdpy*.tar.gz ${GEOPMDPY_PACKAGE} | |
cd ${GEOPMDPY_PACKAGE} | |
osc addremove | |
cd - | |
osc ci -m "geopmdpy ${{ github.sha }}" ${GEOPMDPY_PACKAGE} | |
- name: publish geopmpy | |
if: ${{ github.ref_name }} != 'release-v3.0' | |
working-directory: geopmpy | |
run: | | |
osc co ${GEOPMPY_PACKAGE} | |
rm -f ${GEOPMPY_PACKAGE}/geopmpy*.tar.gz | |
cp geopmpy.spec ${GEOPMPY_PACKAGE} | |
cp dist/geopmpy*.tar.gz ${GEOPMPY_PACKAGE} | |
cd ${GEOPMPY_PACKAGE} | |
osc addremove | |
cd - | |
osc ci -m "geopmpy ${{ github.sha }}" ${GEOPMPY_PACKAGE} | |
- name: publish docs | |
if: ${{ github.ref_name }} != 'release-v3.0' | |
working-directory: docs | |
run: | | |
osc co ${DOCS_PACKAGE} | |
rm -f ${DOCS_PACKAGE}/geopm-doc*.tar.gz | |
cp geopm-doc.spec ${DOCS_PACKAGE} | |
cp geopm-doc*.tar.gz ${DOCS_PACKAGE} | |
cd ${DOCS_PACKAGE} | |
osc addremove | |
cd - | |
osc ci -m "geopm-doc ${{ github.sha }}" ${DOCS_PACKAGE} | |
test_packages: | |
name: "Make Deb Packages" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set shared environment variables | |
run: | |
echo "TEST_DEBS_DIR=/usr/local/mydebs" >> "$GITHUB_ENV" | |
- name: Update package-building dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install devscripts equivs dpkg-dev | |
python3 -m pip install -r requirements.txt | |
# Create a local repo where we can locate our built deb files so that | |
# they can be found in dependency checks from later steps. | |
# Mark the repo as trusted so we can install these unsigned packages in the later steps. | |
sudo mkdir -p "$TEST_DEBS_DIR" | |
echo "deb [trusted=yes] file:$TEST_DEBS_DIR ./" | sudo tee --append /etc/apt/sources.list | |
- name: Package libgeopmd | |
working-directory: libgeopmd | |
env: | |
MAKEFLAGS: "-j" | |
run: | | |
# Install build dependencies listed in our debian control file | |
sudo mk-build-deps --install | |
# Build our deb packages | |
./autogen.sh && ./configure || (cat config.log && false) | |
make deb | |
# Clean up so later steps don't unknowingly miss declaring a dependency installed by this step | |
sudo apt-get purge --auto-remove geopm-service-build-deps | |
# Add our new packages to the local repo | |
sudo mv ./*.deb $TEST_DEBS_DIR | |
sudo sh -c "cd $TEST_DEBS_DIR && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz" | |
sudo apt-get update | |
- name: Package geopmdpy | |
working-directory: geopmdpy | |
run: | | |
sudo mk-build-deps --install | |
python3 -m pip install -r requirements.txt | |
./make_deb.sh | |
sudo apt-get purge --auto-remove python3-geopmdpy-build-deps | |
sudo mv ./*.deb $TEST_DEBS_DIR | |
sudo sh -c "cd $TEST_DEBS_DIR && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz" | |
sudo apt-get update | |
- name: Package libgeopm | |
working-directory: libgeopm | |
env: | |
MAKEFLAGS: "-j" | |
run: | | |
sudo mk-build-deps --install | |
./autogen.sh && ./configure --disable-mpi --disable-openmp --disable-fortran || (cat config.log && false) | |
make deb | |
# Clean up so later steps don't unknowingly miss a dependency | |
sudo apt-get purge --auto-remove geopm-service-build-deps | |
sudo mv ./*.deb $TEST_DEBS_DIR | |
sudo sh -c "cd $TEST_DEBS_DIR && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz" | |
sudo apt-get update | |
- name: Package geopmpy | |
working-directory: geopmpy | |
run: | | |
sudo mk-build-deps --install | |
python3 -m pip install -r requirements.txt | |
./make_deb.sh | |
sudo apt-get purge --auto-remove python3-geopmpy-build-deps | |
sudo mv ./*.deb $TEST_DEBS_DIR | |
sudo sh -c "cd $TEST_DEBS_DIR && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz" | |
sudo apt-get update | |
- name: Package docs | |
working-directory: docs | |
run: | | |
sudo mk-build-deps --install | |
python3 -m pip install -r requirements.txt | |
./make_deb.sh | |
sudo apt-get purge --auto-remove python3-geopmpy-build-deps | |
sudo mv ./*.deb $TEST_DEBS_DIR | |
sudo sh -c "cd $TEST_DEBS_DIR && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz" | |
sudo apt-get update |