-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: change to powershell script instead bash
- Loading branch information
Showing
5 changed files
with
81 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,19 +26,24 @@ jobs: | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }} | ||
- name: externals cache | ||
uses: actions/[email protected] | ||
if: runner.os != 'Windows' | ||
with: | ||
path: externals | ||
key: ${{ runner.os }}-externals-${{ hashFiles('scripts/prepare-*.sh') }} | ||
- name: externals cache (Windows) | ||
uses: actions/[email protected] | ||
if: runner.os == 'Windows' | ||
with: | ||
path: externals | ||
key: ${{ runner.os }}-externals-${{ hashFiles('scripts/prepare-*.ps1') }} | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Prepare (Windows) | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: bash ./scripts/prepare-windows.sh | ||
run: powershell ./scripts/prepare-windows.ps1 | ||
- name: Build (Windows) | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: bash ./scripts/build-windows.sh | ||
run: powershell ./scripts/build-windows.ps1 | ||
- name: Prepare (Linux) | ||
if: runner.os == 'Linux' | ||
run: bash ./scripts/prepare-linux.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$ErrorActionPreference='Stop' | ||
|
||
# General | ||
|
||
yarn clean ; yarn build-native -a x86_64 | ||
yarn clean ; yarn build-native -a arm64 | ||
|
||
# build with CLBlast | ||
$X64_CLBlast=Resolve-Path 'externals/win32-x64/SDK/lib/cmake/CLBlast' | ||
$ARM64_CLBlast=Resolve-Path 'externals/win32-arm64/SDK/lib/cmake/CLBlast' | ||
|
||
yarn clean ; yarn build-native -a x86_64 --CDVARIANT=opencl --CDLLAMA_CLBLAST=ON --CDCMAKE_PREFIX_PATH=$X64_CLBlast | ||
yarn clean ; yarn build-native -a arm64 --CDVARIANT=opencl --CDLLAMA_CLBLAST=ON --CDCMAKE_PREFIX_PATH=$ARM64_CLBlast |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
$ErrorActionPreference='Stop' | ||
|
||
New-Item -ItemType Directory -Force -Path "externals/win32-x64/SDK" | Out-Null | ||
New-Item -ItemType Directory -Force -Path "externals/win32-arm64" | Out-Null | ||
|
||
# x64 | ||
|
||
cd "externals/win32-x64" | ||
|
||
# OpenCL-SDK | ||
if (-not (Test-Path "OpenCL-SDK.zip")) { | ||
Invoke-WebRequest -Uri "https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v2023.12.14/OpenCL-SDK-v2023.12.14-Win-x64.zip" -OutFile "OpenCL-SDK.zip" | ||
7z x OpenCL-SDK.zip | ||
Copy-Item -Recurse -Force OpenCL-SDK-*/* SDK | ||
Remove-Item -Recurse -Force OpenCL-SDK-* | ||
} | ||
|
||
# CLBlast | ||
if (-not (Test-Path "CLBlast.zip")) { | ||
Invoke-WebRequest -Uri "https://github.com/CNugteren/CLBlast/releases/download/1.6.2/CLBlast-1.6.2-windows-x64.zip" -OutFile "CLBlast.zip" | ||
7z x CLBlast.zip | ||
7z x CLBlast*.7z | ||
Copy-Item -Recurse -Force CLBlast-*/* SDK | ||
Remove-Item -Recurse -Force CLBlast-* | ||
} | ||
|
||
cd ".." | ||
|
||
# ARM64 | ||
|
||
cd "win32-arm64" | ||
|
||
if (-not (Test-Path "OpenCL-SDK-source")) { | ||
git clone "https://github.com/KhronosGroup/OpenCL-SDK.git" "OpenCL-SDK-source" --recursive | ||
cd "OpenCL-SDK-source" | ||
git checkout v2023.12.14 | ||
cd ".." | ||
} | ||
|
||
if (-not (Test-Path "CLBlast-source")) { | ||
git clone "https://github.com/CNugteren/CLBlast.git" "CLBlast-source" --recursive | ||
cd "CLBlast-source" | ||
git checkout 1.6.2 | ||
cd ".." | ||
} | ||
|
||
if (-not (Test-Path "SDK")) { | ||
New-Item -ItemType Directory -Force -Path "SDK" | Out-Null | ||
$SDK_ROOT = (Resolve-Path "SDK").Path | ||
# build from source | ||
cd "OpenCL-SDK-source" | ||
cmake -B build -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DOPENCL_SDK_BUILD_SAMPLES=OFF -DOPENCL_SDK_TEST_SAMPLES=OFF -G "Visual Studio 17 2022" -A arm64 | ||
cmake --build build --config Release | ||
cmake --install build --prefix $SDK_ROOT | ||
cd "../CLBlast-source" | ||
cmake -B build -DBUILD_SHARED_LIBS=ON -DOVERRIDE_MSVC_FLAGS_TO_MT=OFF -DTUNERS=OFF -DOPENCL_ROOT="$SDK_ROOT" -G "Visual Studio 17 2022" -A arm64 | ||
cmake --build build --config Release | ||
cmake --install build --prefix $SDK_ROOT | ||
} |
This file was deleted.
Oops, something went wrong.