-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support build tabby on windows (#948)
* feat: update config to support build on windows * resolve comment * update release.yml * resolve comment
- Loading branch information
Showing
7 changed files
with
63 additions
and
13 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,7 +26,7 @@ jobs: | |
container: ${{ matrix.container }} | ||
strategy: | ||
matrix: | ||
binary: [aarch64-apple-darwin, x86_64-manylinux2014, x86_64-manylinux2014-cuda117] | ||
binary: [aarch64-apple-darwin, x86_64-manylinux2014, x86_64-manylinux2014-cuda117, x86_64-pc-windows-msvc] | ||
include: | ||
- os: macos-latest | ||
target: aarch64-apple-darwin | ||
|
@@ -40,6 +40,11 @@ jobs: | |
binary: x86_64-manylinux2014-cuda117 | ||
container: sameli/manylinux2014_x86_64_cuda_11.7 | ||
build_args: --features cuda | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
binary: x86_64-pc-windows-msvc | ||
ext: .exe | ||
build_args: --features cuda | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: true | ||
|
@@ -77,20 +82,34 @@ jobs: | |
~/.cargo/registry | ||
~/.cargo/git | ||
- run: bash ./ci/prepare_build_environment.sh | ||
- name: Prepare build environment for macOS & Linux | ||
run: bash ./ci/prepare_build_environment.sh | ||
if: runner.os != 'Windows' | ||
|
||
- name: Prepare build environment for Windows | ||
run: ./ci/prepare_build_environment.ps1 | ||
if: runner.os == 'Windows' | ||
|
||
- name: Install CUDA toolkit for Windows | ||
uses: Jimver/[email protected] | ||
with: | ||
cuda: '11.7.1' | ||
method: 'network' | ||
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]' | ||
if: runner.os == 'Windows' | ||
|
||
- name: Bulid release binary | ||
run: cargo build ${{ matrix.build_args }} --release --target ${{ matrix.target }} --package tabby | ||
|
||
- name: Rename release binary | ||
run: mv target/${{ matrix.target }}/release/tabby tabby_${{ matrix.binary }} | ||
run: mv target/${{ matrix.target }}/release/tabby${{ matrix.ext }} tabby_${{ matrix.binary }}${{ matrix.ext }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
retention-days: 3 | ||
name: tabby_${{ matrix.binary }} | ||
path: tabby_${{ matrix.binary }} | ||
name: tabby_${{ matrix.binary }}${{ matrix.ext }} | ||
path: tabby_${{ matrix.binary }}${{ matrix.ext }} | ||
|
||
pre-release: | ||
if: github.event_name == 'push' | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 @@ | ||
choco install --yes protoc |
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
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
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
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