[CI] Workaround for GHA issue #1662
Workflow file for this run
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
# Checks required for a PR to merge. This workflow mostly call other workflows. | |
name: PR/push | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
FastBuild: | |
name: Fast build | |
env: | |
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
disjoint: 'OFF' | |
build_tests: 'ON' | |
# pure C build (Windows) | |
- os: windows-latest | |
disjoint: 'OFF' | |
# Tests' building is off for a pure C build | |
build_tests: 'OFF' | |
- os: ubuntu-latest | |
disjoint: 'ON' | |
build_tests: 'ON' | |
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command | |
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON' | |
# pure C build (Linux) | |
- os: ubuntu-latest | |
disjoint: 'OFF' | |
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command | |
# Tests' building is off for a pure C build | |
build_tests: 'OFF' | |
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON' | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Initialize vcpkg | |
if: matrix.os == 'windows-latest' | |
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 | |
with: | |
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 | |
vcpkgDirectory: ${{github.workspace}}/build/vcpkg | |
vcpkgJsonGlob: '**/vcpkg.json' | |
- name: Install dependencies | |
if: matrix.os == 'windows-latest' | |
run: vcpkg install | |
shell: pwsh # Specifies PowerShell as the shell for running the script. | |
# TODO: 'rm' is a workaround for https://github.com/actions/runner-images/issues/9733 | |
- name: Install apt packages | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list | |
sudo apt-get update | |
sudo apt-get install -y cmake libjemalloc-dev libhwloc-dev libnuma-dev libtbb-dev | |
- name: Configure CMake | |
run: > | |
cmake | |
-B ${{github.workspace}}/build | |
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" | |
-DUMF_FORMAT_CODE_STYLE=OFF | |
-DUMF_DEVELOPER_MODE=ON | |
-DUMF_ENABLE_POOL_TRACKING=ON | |
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON | |
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}} | |
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON | |
-DUMF_BUILD_TESTS=${{matrix.build_tests}} | |
-DUMF_BUILD_EXAMPLES=ON | |
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON | |
${{matrix.extra_build_options}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config Release -j | |
- name: Run examples | |
working-directory: ${{github.workspace}}/build | |
run: ctest --output-on-failure --test-dir examples -C Release | |
- name: Run tests | |
if: matrix.build_tests == 'ON' | |
working-directory: ${{github.workspace}}/build | |
run: ctest --output-on-failure --test-dir test -C Release | |
CodeStyle: | |
name: Coding style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
# TODO: 'rm' is a workaround for https://github.com/actions/runner-images/issues/9733 | |
- name: Install apt packages | |
run: | | |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list | |
sudo apt-get update | |
sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev | |
- name: Configure CMake | |
run: > | |
cmake | |
-B ${{github.workspace}}/build | |
-DUMF_FORMAT_CODE_STYLE=ON | |
-DUMF_BUILD_TESTS=OFF | |
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF | |
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=OFF | |
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=OFF | |
- name: Check C/C++ formatting | |
run: cmake --build build --target clang-format-check | |
- name: Check CMake formatting | |
run: cmake --build build --target cmake-format-check | |
- name: Check Python formatting | |
run: cmake --build build --target black-format-check | |
DocsBuild: | |
name: Build docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
# TODO: 'rm' is a workaround for https://github.com/actions/runner-images/issues/9733 | |
- name: Install doxygen | |
run: | | |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list | |
sudo apt-get update | |
sudo apt-get install -y doxygen | |
- name: Install pip requirements | |
run: python3 -m pip install -r third_party/requirements.txt | |
- name: Build the documentation | |
working-directory: scripts | |
run: python3 generate_docs.py | |
Spellcheck: | |
uses: ./.github/workflows/spellcheck.yml | |
Build: | |
name: Basic builds | |
needs: [Spellcheck, FastBuild, CodeStyle] | |
uses: ./.github/workflows/basic.yml | |
Sanitizers: | |
needs: [Spellcheck, FastBuild, CodeStyle] | |
uses: ./.github/workflows/sanitizers.yml | |
Benchmarks: | |
needs: [Build] | |
uses: ./.github/workflows/benchmarks.yml | |
ProxyLib: | |
needs: [Build] | |
uses: ./.github/workflows/proxy_lib.yml | |
GPU: | |
needs: [Build] | |
uses: ./.github/workflows/gpu.yml | |
Qemu: | |
needs: [Build] | |
uses: ./.github/workflows/qemu.yml | |
Valgrind: | |
needs: [Build] | |
uses: ./.github/workflows/valgrind.yml |