Skip to content

Commit

Permalink
Windows CUDA CI
Browse files Browse the repository at this point in the history
  • Loading branch information
haorldbchi committed May 12, 2023
1 parent 85c7654 commit c3a31eb
Showing 1 changed file with 104 additions and 39 deletions.
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

0 comments on commit c3a31eb

Please sign in to comment.