Remove trailing whitespace #1
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 - 2023, Intel Corporation | |
# SPDX-License-Identifier: BSD-3-Clause | |
# | |
name: C/C++ CI | |
on: | |
push: | |
branches: | |
- dev | |
- release-v2.0-candidate | |
- release-v2.0 | |
pull_request: | |
branches: | |
- dev | |
- release-v2.0-candidate | |
- release-v2.0 | |
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@v3 | |
- uses: codespell-project/[email protected] | |
build_and_test: | |
name: "build: ${{ matrix.config.name }} ${{ matrix.debug-flag }} service:${{ matrix.service-asan-flag }} base:${{ 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@v2 | |
- 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 | |
- name: install base and service dir python dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel pep517 | |
python3 -m pip install -r service/requirements.txt | |
python3 -m pip install -r scripts/requirements.txt | |
- name: check include guards | |
shell: bash | |
run: .github/include_guards.sh | |
- name: configure service dir | |
working-directory: service | |
run: ./autogen.sh && ./configure --${{ matrix.debug-flag }} --${{ matrix.service-asan-flag }} || (cat config.log && false) | |
- name: make service dir | |
working-directory: service | |
run: make -j2 | |
- name: configure base dir | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: ./autogen.sh && ./configure --enable-beta --disable-openmp --with-geopmd-lib=./service/.libs --with-geopmd-include=./service/src --${{ matrix.debug-flag }} --${{ matrix.base-asan-flag }} || (cat config.log && false) | |
- name: make base dir | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make -j2 | |
- name: make checkprogs service | |
working-directory: service | |
run: make checkprogs -j2 | |
- name: make checkprogs base dir | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make checkprogs -j2 | |
- name: make check service | |
working-directory: service | |
env: | |
LD_LIBRARY_PATH: .libs:${LD_LIBRARY_PATH} | |
run: make check | |
- name: make check basedir | |
if: matrix.service-asan-flag != 'enable-asan' | |
run: make check | |
env: | |
LD_LIBRARY_PATH: .libs:./service/.libs:${LD_LIBRARY_PATH} | |
PYTHONPATH: scripts:${PYTHONPATH} | |
- name: test-dist | |
if: matrix.service-asan-flag != 'enable-asan' && matrix.base-asan-flag != 'enable-asan' | |
run: ./copying_headers/test-dist | |
- name: show failure logs | |
if: ${{ failure() }} | |
run: | | |
cat scripts/py3k_lint.log || true | |
cat scripts/test/pytest_links/*.log || true | |
cat service/geopmdpy_test/pytest_links/*.log || true | |
cat test/gtest_links/*.log || true | |
cat service/test/gtest_links/*.log || true | |
cat service/integration/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@v3 | |
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 | |
- name: install base and service dir python dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel pep517 | |
python3 -m pip install -r service/requirements.txt | |
- name: configure service dir | |
working-directory: service | |
run: ./autogen.sh && ./configure || (cat config.log && false) | |
- name: make service dist | |
working-directory: service | |
run: make -j2 dist | |
- name: make service libs | |
working-directory: service | |
run: make -j2 | |
- name: configure runtime dir | |
run: ./autogen.sh && ./configure --disable-openmp --disable-mpi || (cat config.log && false) | |
- name: make runtime dist | |
run: make -j2 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-v2.0" ]] || [[ "${{ github.ref_name }}" == "release-v3.0" ]]; then | |
echo "SERVICE_PACKAGE=home:${{ github.repository_owner }}:${{ github.ref_name }}/geopm-service" >> ${GITHUB_ENV} | |
echo "RUNTIME_PACKAGE=home:${{ github.repository_owner }}:${{ github.ref_name }}/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} | |
fi | |
- name: publish service | |
working-directory: service | |
run: | | |
osc co ${SERVICE_PACKAGE} | |
cp geopm-service.spec ${SERVICE_PACKAGE} | |
cp geopm-service*.tar.gz ${SERVICE_PACKAGE}/geopm-service.tar.gz | |
osc add ${SERVICE_PACKAGE}/geopm-service.spec ${SERVICE_PACKAGE}/geopm-service.tar.gz | |
osc ci -m "geopm service ${{ github.sha }}" ${SERVICE_PACKAGE} | |
- name: publish runtime | |
run: | | |
osc co ${RUNTIME_PACKAGE} | |
cp geopm-runtime.spec ${RUNTIME_PACKAGE} | |
cp geopm-runtime*.tar.gz ${RUNTIME_PACKAGE}/geopm-runtime.tar.gz | |
osc add ${RUNTIME_PACKAGE}/geopm-runtime.spec ${RUNTIME_PACKAGE}/geopm-runtime.tar.gz | |
osc ci -m "geopm runtime ${{ github.sha }}" ${RUNTIME_PACKAGE} |