Skip to content

pin openblas <0.3.34 (avoid f8674a7 ICV-ignored deadlock); drop rest_… #189

pin openblas <0.3.34 (avoid f8674a7 ICV-ignored deadlock); drop rest_…

pin openblas <0.3.34 (avoid f8674a7 ICV-ignored deadlock); drop rest_… #189

Workflow file for this run

name: Build REST
on:
push:
branches:
- main
- copilot/support-win-64
- cross-win-64
- timeout
paths:
- recipe_rattler/**
- recipe_rest_util/**
# pull_request:
# branches:
# - main
jobs:
build-macos-arm64:
if: github.ref_name == 'main'
runs-on: macos-14
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup SSH for Gitee
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: build-env
environment-file: env_rattler.yaml
- name: Build recipe
run: |
conda info
conda activate build-env
rattler-build build --recipe recipe_rattler --output-dir output --skip-existing=all -c conda-forge -c mokit -c restgroup
- name: Upload regression logs (on build failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: regression-logs-${{ runner.os }}-${{ runner.arch }}
path: output/test/*/**/rest_regression/work_pool/**
if-no-files-found: ignore
- name: Build util
run: |
conda activate build-env
rattler-build build --recipe recipe_rest_util --output-dir output --skip-existing=all -c conda-forge -c restgroup
- name: Upload to Anaconda.org
continue-on-error: true
env:
ANACONDA_API_KEY: ${{ secrets.ANACONDA }}
run: |
rattler-build upload anaconda -o restgroup ./output/*/rest-20*.conda
- name: Upload util to Anaconda.org
continue-on-error: true
env:
ANACONDA_API_KEY: ${{ secrets.ANACONDA }}
run: |
rattler-build upload anaconda -o restgroup ./output/*/rest-util*.conda
build-linux:
if: github.ref_name == 'main'
name: build-linux-${{ matrix.name }}-sysroot217
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- name: default
scalapack: disabled
- name: scalapack
scalapack: "2.2.*"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup SSH for Gitee
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
- uses: ./actions/cache-setup-conda
- name: Extract Git source info for cache key
id: get-git-key
shell: bash
run: |
extract_git_info() {
local index=$1
local recipe_file=recipe_rattler/recipe.yaml
local git_url=$(yq eval ".source[$index].git" "$recipe_file" 2>/dev/null || echo "")
if [ -n "$git_url" ] && [ "$git_url" != "null" ]; then
# Try tag, then branch, then rev, then default
local git_tag=$(yq eval ".source[$index].tag" "$recipe_file" 2>/dev/null || echo "")
local git_branch=$(yq eval ".source[$index].branch" "$recipe_file" 2>/dev/null || echo "")
local git_rev=$(yq eval ".source[$index].rev" "$recipe_file" 2>/dev/null || echo "")
local version=""
if [ -n "$git_tag" ] && [ "$git_tag" != "null" ]; then
version="tag:$git_tag"
elif [ -n "$git_branch" ] && [ "$git_branch" != "null" ]; then
version="branch:$git_branch"
elif [ -n "$git_rev" ] && [ "$git_rev" != "null" ]; then
version="rev:$git_rev"
else
version="HEAD"
fi
echo "${git_url}:${version}"
fi
}
GIT_INFO0=$(extract_git_info 0)
GIT_INFO1=$(extract_git_info 1)
GIT_INFO2=$(extract_git_info 2)
GIT_INFO3=$(extract_git_info 3)
# Combine and hash them to create a stable, shorter key component
GIT_SOURCE_HASH_03=$(echo -n "${GIT_INFO0}-${GIT_INFO3}" | sha256sum | head -c 12)
GIT_SOURCE_HASH_12=$(echo -n "${GIT_INFO1}-${GIT_INFO2}" | sha256sum | head -c 12)
echo "GIT_SOURCE_HASH_03=${GIT_SOURCE_HASH_03}" >> $GITHUB_ENV
echo "GIT_SOURCE_HASH_12=${GIT_SOURCE_HASH_12}" >> $GITHUB_ENV
- name: Cache Rattler git sources 0,3
uses: actions/cache@v4
with:
path: |
output/src_cache/rest.git
output/src_cache/rest_regression.git
key: ${{ runner.os }}-git-src-${{ env.GIT_SOURCE_HASH_03 }}
- name: Cache Rattler git sources 1,2
uses: actions/cache@v4
with:
path: |
output/src_cache/rest_tensors.git
output/src_cache/rest_libcint.git
key: ${{ runner.os }}-git-src-${{ env.GIT_SOURCE_HASH_12 }}
- name: Build recipe
run: |
conda info
# conda env list
conda activate build-env
git config --global http.postBuffer 524288000
rattler-build build --recipe recipe_rattler --output-dir output --skip-existing=all --variant "scalapack=${{ matrix.scalapack }}" -c conda-forge -c mokit -c restgroup
# conda-build --test output/*/*tar.bz2
- name: Upload regression logs (on build failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: regression-logs-${{ runner.os }}-${{ runner.arch }}
path: output/test/*/**/rest_regression/work_pool/**
if-no-files-found: ignore
- name: Build util
run: |
conda activate build-env
rattler-build build --recipe recipe_rest_util --output-dir output --skip-existing=all -c conda-forge -c restgroup
# - name: Upload artifacts
# #if: always()
# uses: actions/upload-artifact@v4
# with:
# name: rest-conda-package-rattler
# path: output/*/*.conda
- name: Upload to Anaconda.org
continue-on-error: true
env:
ANACONDA_API_KEY: ${{ secrets.ANACONDA }}
run: |
rattler-build upload anaconda -o restgroup ./output/*/rest-20*.conda
- name: Upload to Anaconda.org
continue-on-error: true
env:
ANACONDA_API_KEY: ${{ secrets.ANACONDA }}
run: |
rattler-build upload anaconda -o restgroup ./output/*/rest-util*.conda
build-cross-windows:
#if: github.ref_name == 'cross-win-64'
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup SSH for Gitee
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
- uses: ./actions/cache-setup-conda
- name: Build recipe (win-64 cross-compile)
run: |
conda info
conda activate build-env
rattler-build build --recipe recipe_rattler --output-dir output --skip-existing=all --target-platform=win-64 -c conda-forge -c mokit -c restgroup
- name: Upload to Anaconda.org
continue-on-error: true
env:
ANACONDA_API_KEY: ${{ secrets.ANACONDA }}
run: |
rattler-build upload anaconda -o restgroup ./output/*/rest-20*.conda