forked from torch-js/torch-js
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:arition/torch-js
- Loading branch information
Showing
3 changed files
with
92 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: publish-prebuild | ||
|
||
on: | ||
push: | ||
branches: [cuda-test] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
if: "!contains(github.event.head_commit.message, 'publish-prebuild skip')" | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install CUDA on windows-latest | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
shell: powershell | ||
env: | ||
cuda: "11.0.2" | ||
cudnn: "8.0.5.39" | ||
run: | | ||
# Install CUDA via a powershell script | ||
.\.github\workflows\scripts\install_cuda_windows.ps1 | ||
if ($?) { | ||
# Set paths for subsequent steps, using $env:CUDA_PATH | ||
echo "Adding CUDA to CUDA_PATH, CUDA_PATH_X_Y and PATH" | ||
echo "CUDA_PATH=$($env:CUDA_PATH)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "$($env:CUDA_PATH_VX_Y)=$($env:CUDA_PATH)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "$($env:CUDA_PATH)/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
} | ||
- name: Install CUDA on ubuntu-latest | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
shell: bash | ||
env: | ||
cuda: "11.0" | ||
cudnn: "8.0.5.39" | ||
run: | | ||
source ./.github/workflows/scripts/install_cuda_ubuntu.sh | ||
if [[ $? -eq 0 ]]; then | ||
# Set paths for subsequent steps, using ${CUDA_PATH} | ||
echo "Adding CUDA to CUDA_PATH, PATH and LD_LIBRARY_PATH" | ||
echo "CUDA_PATH=${CUDA_PATH}" >> $GITHUB_ENV | ||
echo "${CUDA_PATH}/bin" >> $GITHUB_PATH | ||
echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV | ||
fi | ||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install packages | ||
run: yarn upgrade --dev | ||
|
||
- name: Prebuild | ||
run: yarn build-prebuild |
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