Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/actions/build-and-test-windows/action.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Param(
[Parameter(Mandatory=$true)]
[ValidateSet('c++14', 'c++17', 'c++20')]
[string[]]
$dialect
)

function TestReturnCode {
if (-not $?) {
throw 'Step Failed'
}
}

$ErrorActionPreference = "Stop"
Push-location "$PSScriptRoot/../../.."

# This function is imported from a pre-loaded module
Get-VSDevPrompt

cmake -S ./ -B ../build -DCMAKE_CXX_COMPILER=cl -DCMAKE_CUDA_COMPILER=nvcc -G Ninja
TestReturnCode

$ENV:LIBCUDACXX_SITE_CONFIG="$(Get-Location)/../build/test/lit.site.cfg"

lit -v --no-progress-bar -Dcompute_archs=90 -Dexecutor="NoopExecutor()" -Dstd="$dialect" .upstream-tests/test
TestReturnCode
28 changes: 28 additions & 0 deletions .github/actions/build-and-test-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Build libcudacxx on Windows"
description: "Builds wcow images with MSVC and CUDA"

inputs:
windows_url:
type: string
required: true
description: Windows image to use for build
dialect:
type: string
required: true
description: Dialect to build and test.

runs:
using: composite
steps:

- name: "Fetch ${{ inputs.windows_url }}"
id: build
shell: powershell
run: docker pull ${{ inputs.windows_url }}

- name: "Configure and test"
id: test
shell: powershell
run: |
docker run --mount type=bind,src=$(pwd),dst=C:\libcudacxx ${{ inputs.windows_url }} `
"C:\libcudacxx\.github\actions\build-and-test-windows\action.ps1 -Dialect ${{ inputs.dialect }}"
43 changes: 43 additions & 0 deletions .github/workflows/test_on_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build-and-test:
name: "Build and test libcudacxx"
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
version: [2017, 2019, 2022]
stdver: ['c++14', 'c++17', 'c++20']
exclude:
- version: 2017
stdver: 'c++20'
- version: 2019
stdver: 'c++20'
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: "Build config: VS${{ matrix.version }} + ${{ matrix.stdver }}"
uses: ./.github/actions/build-and-test-windows
with:
windows_url: ghcr.io/${{ github.repository_owner }}/cuda-windows-images:windows-server-cuda-msvc-${{ matrix.version }}
dialect: "${{ matrix.stdver }}"
45 changes: 7 additions & 38 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
samples/trie
samples/trie.exe
.cache
.clangd/
.vscode/*
samples/pg996.txt
samples/1342-0.txt
samples/2600-0.txt
samples/2701-0.txt
samples/35-0.txt
samples/84-0.txt
samples/8800.txt
samples/pg1727.txt
samples/pg55.txt
samples/pg6130.txt
samples/log.txt
samples/trie.exp
samples/trie.lib
samples/trie.txt
samples/out.txt
samples/temp.txt
samples/trie.cu.txt
samples/trie_mt.exe
samples/trie.obj
samples/trie_mt.obj
samples/trie_st.exe
samples/trie_st.obj
samples/trial
samples/trie_st
samples/trie_mt
samples/rtc
samples/benchmark
*.pyc
build-*/
build/
.p4config
compare_git_to_perforce.bash
*.log
.clangd/
.cache
Output/
compile_commands.json
*.obj
*~
*lit_test_times.txt
llvm-project/
build/
Output/
compare_git_to_perforce.bash
compile_commands.json