Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfelder committed Jan 22, 2024
1 parent e41d84f commit 971555c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
32 changes: 2 additions & 30 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,53 +13,26 @@ env:
CARGO_TERM_COLOR: always
ARCH_TYPE: native

jobs:
check-changed-files:
name: Check Changed Files
runs-on: ubuntu-22.04
outputs:
golang: ${{ steps.changed_files.outputs.golang }}
rust: ${{ steps.changed_files.outputs.rust }}
cpp_cuda: ${{ steps.changed_files.outputs.cpp_cuda }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get all changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v39
# https://github.com/tj-actions/changed-files#input_files_yaml_from_source_file
with:
files_yaml_from_source_file: .github/changed-files.yml
- name: Run Changed Files script
id: changed_files
# https://github.com/tj-actions/changed-files#outputs-
run: |
echo "golang=${{ steps.changed-files-yaml.outputs.golang_any_modified }}" >> "$GITHUB_OUTPUT"
echo "rust=${{ steps.changed-files-yaml.outputs.rust_any_modified }}" >> "$GITHUB_OUTPUT"
echo "cpp_cuda=${{ steps.changed-files-yaml.outputs.cpp_any_modified }}" >> "$GITHUB_OUTPUT"
jobs:
build-rust-linux:
name: Build Rust on Linux
runs-on: [self-hosted, Linux, X64, icicle]
needs: [check-changed-files, build-rust-windows]
needs: [build-rust-windows]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build Rust
working-directory: ./wrappers/rust
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true'
# Building from the root workspace will build all members of the workspace by default
run: cargo build --release --verbose

build-rust-windows:
name: Build Rust on Windows
runs-on: windows-2022
needs: check-changed-files
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Download and Install Cuda
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true'
uses: Jimver/cuda-toolkit@v0.2.11
with:
cuda: '12.0.0'
Expand All @@ -68,7 +41,6 @@ jobs:
sub-packages: '["cudart", "nvcc", "thrust", "visual_studio_integration"]'
- name: Build Rust Targets
working-directory: ./wrappers/rust
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true'
env:
CUDA_PATH: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}
# Building from the root workspace will build all members of the workspace by default
Expand Down
2 changes: 1 addition & 1 deletion wrappers/rust/icicle-cuda-runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::path::PathBuf;
fn cuda_include_path() -> &'static str {
#[cfg(target_os = "windows")]
{
concat!(env!("CUDA_PATH"), "/include")
concat!(env!("CUDA_PATH"), "\\include")
}

#[cfg(target_os = "linux")]
Expand Down

0 comments on commit 971555c

Please sign in to comment.