Skip to content

review feedback, fix race conditions #1438

review feedback, fix race conditions

review feedback, fix race conditions #1438

Workflow file for this run

name: CI (CPU)
on:
push:
branches:
- main
- "member-function-customization"
- "pull-request/[0-9]+"
concurrency:
group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build-cpu:
runs-on: ubuntu-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- { name: "CPU (clang 13, Debug, ubuntu 20.04)", build: "Debug", tag: llvm13-cuda12.4-ubuntu20.04, cxxflags: "-stdlib=libc++" }
- { name: "CPU (clang 13, Release, ubuntu 20.04)", build: "Release", tag: llvm13-cuda12.4-ubuntu20.04, cxxflags: "-stdlib=libc++" }
- { name: "CPU (gcc 11, Debug, ubuntu 22.04)", build: "Debug", tag: gcc11-cuda12.4-ubuntu22.04, cxxflags: "", }
- { name: "CPU (gcc 11, Release, ubuntu 22.04)", build: "Release", tag: gcc11-cuda12.4-ubuntu22.04, cxxflags: "", }
- { name: "CPU (gcc 11, Release, ubuntu 22.04, TSAN)", build: "Release", tag: gcc11-cuda12.4-ubuntu22.04, cxxflags: "-fsanitize=thread" }
- { name: "CPU (gcc 11, Release, ubuntu 22.04, ASAN)", build: "Release", tag: gcc11-cuda12.4-ubuntu22.04, cxxflags: "-fsanitize=address" }
container:
options: -u root
image: rapidsai/devcontainers:24.04-cpp-${{matrix.tag}}
env:
SCCACHE_REGION: "us-east-2"
SCCACHE_BUCKET: "rapids-sccache-devs"
SCCACHE_S3_KEY_PREFIX: "nvidia-stdexec-dev"
permissions:
id-token: write # This is required for configure-aws-credentials
contents: read # This is required for actions/checkout
defaults:
run:
shell: su coder {0}
working-directory: /home/coder
steps:
- name: Checkout stdexec
uses: actions/checkout@v4
with:
path: stdexec
persist-credentials: false
- if: github.repository_owner == 'NVIDIA'
name: Get AWS credentials for sccache bucket
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-duration-seconds: 28800 # 8 hours
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-NVIDIA
- name: Build and test CPU schedulers
run: |
set -ex;
# Copy source folder into ~/stdexec
cp -r "${GITHUB_WORKSPACE}"/stdexec ~/;
chown -R coder:coder ~/stdexec;
cd ~/stdexec;
# Configure
cmake -S . -B build -GNinja \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" \
-DSTDEXEC_ENABLE_TBB:BOOL=${{ !contains(matrix.cxxflags, '-fsanitize') }} \
;
# Compile
cmake --build build -v;
# Print sccache stats
sccache -s;
# Tests
ctest --test-dir build --verbose --output-on-failure --timeout 60;
ci-cpu:
runs-on: ubuntu-latest
name: CI (CPU)
needs:
- build-cpu
steps:
- run: echo "CI (CPU) success"
build-cpu-windows:
runs-on: windows-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- { compiler: "cl", build: "Debug", name: "CPU (Windows) (msvc, Debug)" }
- { compiler: "cl", build: "Release", name: "CPU (Windows) (msvc, Release)" }
#- { compiler: "clang++", build: "Debug", name: "CPU (Windows) (clang, Debug)" }
#- { compiler: "clang++", build: "Release", name: "CPU (Windows) (clang, Release)" }
#- { compiler: "clang-cl", build: "Debug", name: "CPU (Windows) (clang-cl, Debug)" }
#- { compiler: "clang-cl", build: "Release", name: "CPU (Windows) (clang-cl, Release)" }
steps:
- name: Checkout stdexec (Windows)
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and test CPU schedulers (Windows)
shell: pwsh
run: .github/workflows/test-windows.ps1 -Compiler '${{ matrix.compiler }}' -Config '${{ matrix.build }}'
ci-cpu-windows:
runs-on: windows-latest
name: CI (CPU) (Windows)
needs:
- build-cpu-windows
steps:
- run: echo "CI (CPU) (Windows) success"
build-cpu-macos:
runs-on: macos-14-large
name: macos-${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- { compiler: "clang++", build: "Debug", name: "CPU (MacOS) (clang, Debug)" }
- { compiler: "clang++", build: "Release", name: "CPU (MacOS) (clang, Release)" }
steps:
- name: Checkout stdexec (MacOS)
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install dependencies
run: |
brew update
brew install ninja
shell: bash
- name: Build and test CPU schedulers (MacOS)
shell: bash
run: |
mkdir build
cmake -S. -Bbuild -GNinja \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
-DCMAKE_CXX_STANDARD=20
cmake --build build/ -v
cd build
ctest --output-on-failure
ci-cpu-macos:
runs-on: macos-latest-large
name: CI (CPU) (MacOS)
needs:
- build-cpu-macos
steps:
- run: echo "CI (CPU) (MacOS) success"