Fix release packages being overwritten by nightlies. (#1935)

Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1935

Reviewed By: mdouze

Differential Revision: D28932003

Pulled By: beauby

fbshipit-source-id: f6149697a270c07cfef789e7e7f22ba58cb9627c
pull/1953/head
Lucas Hosseini 2021-06-07 09:23:22 -07:00 committed by Facebook GitHub Bot
parent 6c2e59cd14
commit b2b129980e
3 changed files with 13 additions and 4 deletions

View File

@ -193,6 +193,8 @@ jobs:
conda config --set anaconda_upload yes conda config --set anaconda_upload yes
- run: - run:
name: Build packages name: Build packages
environment:
PACKAGE_TYPE: <<parameters.label>>
command: | command: |
cd conda cd conda
conda build faiss --user pytorch --label <<parameters.label>> conda build faiss --user pytorch --label <<parameters.label>>
@ -217,6 +219,7 @@ jobs:
command: | command: |
docker build -t faiss -f conda/Dockerfile.cuda<<parameters.cuda>> . docker build -t faiss -f conda/Dockerfile.cuda<<parameters.cuda>> .
docker run --gpus all \ docker run --gpus all \
-e PACKAGE_TYPE="<<parameters.label>>" \
-e CUDA_ARCHS="<<parameters.cuda_archs>>" \ -e CUDA_ARCHS="<<parameters.cuda_archs>>" \
-e ANACONDA_API_TOKEN=$ANACONDA_API_TOKEN \ -e ANACONDA_API_TOKEN=$ANACONDA_API_TOKEN \
faiss \ faiss \
@ -246,6 +249,8 @@ jobs:
curl -L -o - https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz | sudo tar xJf - -C /opt curl -L -o - https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz | sudo tar xJf - -C /opt
- run: - run:
name: Build packages name: Build packages
environment:
PACKAGE_TYPE: <<parameters.label>>
command: | command: |
export PATH=~/miniconda/bin:$PATH export PATH=~/miniconda/bin:$PATH
cd conda cd conda
@ -268,6 +273,8 @@ jobs:
conda config --set anaconda_upload yes conda config --set anaconda_upload yes
- run: - run:
name: Build packages name: Build packages
environment:
PACKAGE_TYPE: <<parameters.label>>
command: | command: |
cd conda cd conda
conda build faiss --user pytorch --label <<parameters.label>> conda build faiss --user pytorch --label <<parameters.label>>

View File

@ -4,6 +4,7 @@
# LICENSE file in the root directory of this source tree. # LICENSE file in the root directory of this source tree.
{% set version = environ.get('GIT_DESCRIBE_TAG').lstrip('v') %} {% set version = environ.get('GIT_DESCRIBE_TAG').lstrip('v') %}
{% set suffix = "_nightly" if environ.get('PACKAGE_TYPE') == 'nightly' else "" %}
{% set number = GIT_DESCRIBE_NUMBER %} {% set number = GIT_DESCRIBE_NUMBER %}
package: package:
@ -27,7 +28,7 @@ outputs:
- name: libfaiss - name: libfaiss
script: build-lib.sh script: build-lib.sh
build: build:
string: "h{{ PKG_HASH }}_{{ number }}_cuda{{ cudatoolkit }}" string: "h{{ PKG_HASH }}_{{ number }}_cuda{{ cudatoolkit }}{{ suffix }}"
run_exports: run_exports:
- {{ pin_compatible('libfaiss', exact=True) }} - {{ pin_compatible('libfaiss', exact=True) }}
script_env: script_env:
@ -55,7 +56,7 @@ outputs:
- name: faiss-gpu - name: faiss-gpu
script: build-pkg.sh script: build-pkg.sh
build: build:
string: "py{{ PY_VER }}_h{{ PKG_HASH }}_{{ number }}_cuda{{ cudatoolkit }}" string: "py{{ PY_VER }}_h{{ PKG_HASH }}_{{ number }}_cuda{{ cudatoolkit }}{{ suffix }}"
requirements: requirements:
build: build:
- {{ compiler('cxx') }} - {{ compiler('cxx') }}

View File

@ -4,6 +4,7 @@
# LICENSE file in the root directory of this source tree. # LICENSE file in the root directory of this source tree.
{% set version = environ.get('GIT_DESCRIBE_TAG').lstrip('v') %} {% set version = environ.get('GIT_DESCRIBE_TAG').lstrip('v') %}
{% set suffix = "_nightly" if environ.get('PACKAGE_TYPE') == 'nightly' else "" %}
{% set number = GIT_DESCRIBE_NUMBER %} {% set number = GIT_DESCRIBE_NUMBER %}
package: package:
@ -28,7 +29,7 @@ outputs:
script: build-lib.sh # [not win] script: build-lib.sh # [not win]
script: build-lib.bat # [win] script: build-lib.bat # [win]
build: build:
string: "h{{ PKG_HASH }}_{{ number }}_cpu" string: "h{{ PKG_HASH }}_{{ number }}_cpu{{ suffix }}"
run_exports: run_exports:
- {{ pin_compatible('libfaiss', exact=True) }} - {{ pin_compatible('libfaiss', exact=True) }}
requirements: requirements:
@ -53,7 +54,7 @@ outputs:
script: build-pkg.sh # [not win] script: build-pkg.sh # [not win]
script: build-pkg.bat # [win] script: build-pkg.bat # [win]
build: build:
string: "py{{ PY_VER }}_h{{ PKG_HASH }}_{{ number }}_cpu" string: "py{{ PY_VER }}_h{{ PKG_HASH }}_{{ number }}_cpu{{ suffix }}"
requirements: requirements:
build: build:
- {{ compiler('cxx') }} - {{ compiler('cxx') }}