Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows CUDA CI #322

Merged
merged 1 commit into from
May 12, 2023
Merged
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
143 changes: 104 additions & 39 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,50 +268,115 @@ jobs:
# path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }}
# if-no-files-found: error

# build-windows-x86-64:
# runs-on: windows-2019
# steps:
# - name: Checkout Repo
# uses: actions/checkout@v3
build-bladebit-windows-x86-64:
runs-on: windows-2019
steps:
- name: Checkout Repo
uses: actions/checkout@v3

# - name: Get Version Number
# shell: bash
# id: version_number
# run: .github/actions/get-version.sh windows x86-64
- name: Get Version Number
shell: bash
id: version_number
run: .github/actions/get-version.sh windows x86-64

# - name: Build
# shell: bash
# env:
# BB_ARTIFACT_NAME: ${{ env.BB_ARTIFACT_NAME }}
# BB_VERSION: ${{env.BB_VERSION}}
# run: |
- name: Build Bladebit
shell: bash
env:
BB_ARTIFACT_NAME: ${{ env.BB_ARTIFACT_NAME }}
BB_VERSION: ${{env.BB_VERSION}}
run: |

# mkdir build && cd build
# cmake ..
# bash -e -o pipefail ../embed-version.sh
# cat ../src/Version.h
# cmake --build . --target bladebit --config Release

# # Ensure bladebit version matches expected version
# bb_version="$(./Release/bladebit.exe --version | xargs)"

# if [[ "$bb_version" != "$BB_VERSION" ]]; then
# >&2 echo "Incorrect bladebit version. Got but '$bb_version' expected '$BB_VERSION'."
# exit 1
# fi
mkdir build && cd build
cmake ..
bash -eo pipefail ../embed-version.sh
cat ../src/Version.h
cmake --build . --target bladebit --config Release

# Ensure bladebit version matches expected version
bb_version="$(./Release/bladebit.exe --version | xargs)"

if [[ "$bb_version" != "$BB_VERSION" ]]; then
>&2 echo "Incorrect bladebit version. Got but '$bb_version' expected '$BB_VERSION'."
exit 1
fi

# mkdir ../bin
# cd Release
# ls -la
# 7z.exe a -tzip ../../bin/${BB_ARTIFACT_NAME} bladebit.exe
# ls -la ../../bin
mkdir ../bin
cd Release
ls -la
7z.exe a -tzip ../../bin/${BB_ARTIFACT_NAME} bladebit.exe
ls -la ../../bin

# - name: Upload Artifact Windows x86-64
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.BB_ARTIFACT_NAME }}
# path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }}
# if-no-files-found: error
- name: Upload Bladebit Artifact Windows x86-64
uses: actions/upload-artifact@v3
with:
name: ${{ env.BB_ARTIFACT_NAME }}
path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }}
if-no-files-found: error

build-bladebit-cuda-windows-x86-64:
runs-on: windows-2019
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Get Version Number
shell: bash
id: version_number
run: .github/actions/get-version.sh windows x86-64

- name: Install Prerequisites
shell: powershell
run: |
choco install -y make
choco install -y wget
choco install -y sed

- name: Setup CUDA
uses: Jimver/cuda-toolkit@v0.2.10
id: cuda-toolkit
with:
cuda: '12.1.0'

- name: Verify CUDA
shell: bash
run: |
echo "Installed cuda version is: ${{ steps.cuda-toolkit.outputs.cuda }}"
echo "Cuda install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}"
nvcc -V

- name: Build Bladebit CUDA
shell: bash
env:
BB_ARTIFACT_NAME_CUDA: ${{ env.BB_ARTIFACT_NAME_CUDA }}
BB_VERSION: ${{env.BB_VERSION}}
run: |

mkdir build_cuda && cd build_cuda
cmake ..
bash -eo pipefail ../embed-version.sh
cat ../src/Version.h
cmake --build . --target bladebit_cuda --config Release

# Ensure bladebit version matches expected version
bb_version="$(./Release/bladebit_cuda.exe --version | xargs)"

if [[ "$bb_version" != "$BB_VERSION" ]]; then
>&2 echo "Incorrect bladebit version. Got but '$bb_version' expected '$BB_VERSION'."
exit 1
fi

mkdir ../bin
cd Release
ls -la
7z.exe a -tzip ../../bin/${BB_ARTIFACT_NAME_CUDA} bladebit_cuda.exe
ls -la ../../bin

- name: Upload Bladebit CUDA Artifact Windows x86-64
uses: actions/upload-artifact@v3
with:
name: ${{ env.BB_ARTIFACT_NAME_CUDA }}
path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }}
if-no-files-found: error

# build-macos-arm64:
# runs-on: [macOS, ARM64]
Expand Down