forked from facebookresearch/faiss
-
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.
Merge pull request #20 from robandpdx-org/convert-circleci-to-github-…
…actions do it
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Build conda | ||
description: Build conda | ||
inputs: | ||
label: | ||
description: "Label" | ||
|
@@ -23,52 +24,70 @@ inputs: | |
runs: | ||
using: composite | ||
steps: | ||
- name: Choose shell | ||
shell: bash | ||
id: choose_shell | ||
run: | | ||
# if runner.os != 'Windows' use bash | ||
if [ "${{ runner.os }}" != "Windows" ]; then | ||
echo "shell=bash" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "shell=pwsh" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Setup miniconda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: '3.11' | ||
miniconda-version: latest | ||
- name: Install conda build tools | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
run: | | ||
# conda config --set solver libmamba | ||
# conda config --set verbosity 3 | ||
conda update -y -q conda | ||
conda install -y -q conda-build | ||
- name: Enable anaconda uploads | ||
if: inputs.label != '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
run: | | ||
conda install -y -q anaconda-client | ||
conda config --set anaconda_upload yes | ||
- name: Conda build (CPU) | ||
if: inputs.label == '' && inputs.cuda == '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
working-directory: conda | ||
run: | | ||
conda build faiss --python 3.11 -c pytorch | ||
- name: Conda build (CPU) w/ anaconda upload | ||
if: inputs.label != '' && inputs.cuda == '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
working-directory: conda | ||
run: | | ||
conda build faiss --user pytorch --label ${{ inputs.label }} -c pytorch | ||
- name: Conda build (GPU) | ||
if: inputs.label == '' && inputs.cuda != '' && inputs.raft == '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
working-directory: conda | ||
run: | | ||
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \ | ||
-c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia | ||
- name: Conda build (GPU) w/ anaconda upload | ||
if: inputs.label != '' && inputs.cuda != '' && inputs.raft == '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
working-directory: conda | ||
run: | | ||
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \ | ||
--user pytorch --label ${{ inputs.label }} -c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia | ||
- name: Conda build (GPU w/ RAFT) | ||
if: inputs.label == '' && inputs.cuda != '' && inputs.raft != '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
working-directory: conda | ||
run: | | ||
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \ | ||
-c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia -c rapidsai -c conda-forge | ||
- name: Conda build (GPU w/ RAFT) w/ anaconda upload | ||
if: inputs.label != '' && inputs.cuda != '' && inputs.raft != '' | ||
shell: ${{ steps.choose_shell.outputs.shell }} | ||
working-directory: conda | ||
run: | | ||
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \ | ||
|