rm 11.8 env file #15
Workflow file for this run
This file contains hidden or 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
name: publish | |
on: | |
workflow_call: | |
push: | |
branches: | |
- "pull-request/[0-9]+" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
rust-publish: | |
runs-on: ubuntu-latest | |
container: | |
image: rapidsai/ci-conda:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check if release build | |
id: check_release | |
run: | | |
if rapids-is-release-build; then | |
echo "is_release=true" >> $GITHUB_OUTPUT | |
else | |
echo "is_release=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Install Rust (cargo) | |
if: steps.check_release.outputs.is_release == 'true' | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH | |
- name: Setup and publish crates | |
if: steps.check_release.outputs.is_release == 'true' | |
run: | | |
. /opt/conda/etc/profile.d/conda.sh | |
rapids-dependency-file-generator \ | |
--output conda \ | |
--file-key rust \ | |
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ | |
| tee env.yaml | |
rapids-mamba-retry env create --yes -f env.yaml -n rust | |
set +eu | |
conda activate rust | |
set -eu | |
LIBCLANG_PATH=$(dirname "$(find /opt/conda -name libclang.so | head -n 1)") | |
export LIBCLANG_PATH | |
echo "LIBCLANG_PATH=$LIBCLANG_PATH" | |
# Publish sys crate first | |
pushd ./rust/cuvs-sys | |
cargo publish --token ${CARGO_REGISTRY_TOKEN} | |
popd | |
# Wait for crates.io index update | |
sleep 30 | |
# Publish main crate | |
pushd ./rust/cuvs | |
cargo publish --token ${CARGO_REGISTRY_TOKEN} | |
popd | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.GPUTESTER_CRATES_TOKEN }} |