Skip to content

Rename construct.yaml to v1.9_construct.yaml #50

Rename construct.yaml to v1.9_construct.yaml

Rename construct.yaml to v1.9_construct.yaml #50

Workflow file for this run

name: Installers
on:
push:
paths:
- 'installers/construct.yaml'
jobs:
build-installers:
strategy:
fail-fast: false
matrix:
cfg:
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: 3.8
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: 3.9
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: '3.10'
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: '3.11'
- runs-on: ubuntu-latest
platform: linux-64
formal_platform: "Linux-x86_64"
python-version: '3.12'
#########################
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.8'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.9'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.10'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.11'
- runs-on: macos-latest
platform: osx-arm64
formal_platform: "MacOSX-arm64"
python-version: '3.12'
#########################
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: 3.8
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: 3.9
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: '3.10'
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: '3.11'
- runs-on: macos-latest
platform: osx-64
formal_platform: "MacOSX-x86_64"
python-version: '3.12'
#########################
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.8'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.9'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.10'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.11'
- runs-on: windows-latest
platform: win-64
formal_platform: "Windows-x86_64"
python-version: '3.12'
env:
PLATFORM: ${{ matrix.cfg.platform }}
PYVER: ${{ matrix.cfg.python-version }}
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.cfg.runs-on }}
name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.platform }}"
steps:
- uses: actions/checkout@v3
- name: Create Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
show-channel-urls: true
- name: Environment Information
run: |
conda install -y -q -c conda-forge constructor jinja2 curl libarchive #conda-standalone
conda env list
conda list
- name: Prepare construct.yaml
run: |
cd installers/
sed -i.bak 's/{% set python = "3.8" %}/{% set python = "${{ env.PYVER }}" %}/g' construct.yaml
sed -i.bak 's/{% set platform = "xxx" %}/{% set platform = "${{ matrix.cfg.formal_platform }}" %}/g' construct.yaml
if [[ "${{ matrix.cfg.python-version }}" == 3.12 ]]; then
sed -i.bak 's/- dftd4-python/#- dftd4-python/g' construct.yaml
fi
if [[ "${{ matrix.cfg.platform }}" == win-* ]]; then
if [[ "${{ matrix.cfg.python-version }}" == 3.12 ]]; then
sed -i.bak 's/- dftd3-python/#- dftd3-python/g' construct.yaml
fi
fi
- name: Build Installer
run: |
cd installers/
if [[ "${{ matrix.cfg.platform }}" != win-* ]]; then
MICROMAMBA_VERSION=1.3.1
MICROMAMBA_BUILD=0
#mkdir "${TEMP_DIR}/micromamba"
#pushd "${TEMP_DIR}/micromamba"
curl -L -O "https://anaconda.org/conda-forge/micromamba/${MICROMAMBA_VERSION}/download/${{ matrix.cfg.platform }}/micromamba-${MICROMAMBA_VERSION}-${MICROMAMBA_BUILD}.tar.bz2"
bsdtar -xf "micromamba-${MICROMAMBA_VERSION}-${MICROMAMBA_BUILD}.tar.bz2"
if [[ "${{ matrix.cfg.platform }}" == win-* ]]; then
MICROMAMBA_FILE="${PWD}/Library/bin/micromamba.exe"
else
MICROMAMBA_FILE="${PWD}/bin/micromamba"
fi
#popd
EXTRA_CONSTRUCTOR_ARGS="${EXTRA_CONSTRUCTOR_ARGS} --conda-exe ${MICROMAMBA_FILE}" # --platform ${TARGET_PLATFORM}"
fi
#if [[ "${{ runner.os }}" == "Windows" ]]; then
# CONDAEXE_FILE="C:\Miniconda\Scripts\conda.exe"
# #CONDAEXE_FILE="${CONDA_PREFIX}/Library/bin/conda.exe"
#elif [[ "${{ runner.os }}" == "Linux" ]]; then
# CONDAEXE_FILE="/usr/share/miniconda/condabin/conda"
#elif [[ "${{ runner.os }}" == "macOS" ]]; then
# CONDAEXE_FILE="/usr/local/miniconda/condabin/conda"
# #CONDAEXE_FILE="${CONDA_PREFIX}/bin/conda"
#fi
constructor --platform ${{ matrix.cfg.platform }} ${EXTRA_CONSTRUCTOR_ARGS} ##--conda-exe ${CONDAEXE_FILE}
echo "ARTIFACT=`ls -1 Psi4conda*`" >> $GITHUB_ENV
- name: Archive Psi4Conda Installer
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: ${{ env.PLATFORM }}-${{ env.PYVER }}
path: installers/${{ env.ARTIFACT }}
retention-days: 1
- name: Install Installer
if: matrix.cfg.platform != 'osx-arm64'
uses: conda-incubator/setup-miniconda@v2
with:
installer-url: file://${{ github.workspace }}/installers/${{ env.ARTIFACT }}
auto-activate-base: true
activate-environment: ""
- name: Test Installer
if: matrix.cfg.platform != 'osx-arm64'
run: |
conda info
conda list
which conda python psi4
psi4 --version
if [[ "${{ runner.os }}" == "Windows" ]]; then
psi4 --test=smoke_not_d2ints -n2
else
psi4 --test -n2
fi