diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3bb0bdea0..13d2f39e4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -79,6 +79,10 @@ jobs: environment-file: devtools/conda-envs/${{ env.ENVFILE }}.yaml create-args: >- python=${{ matrix.python-version }} + # default - will pull down 2.0 which we don't want! + # micromamba-version: latest + # pin to latest 1.x release + micromamba-version: "1.5.10-0" - name: Make oe_license.txt file from GH org secret "OE_LICENSE" env: diff --git a/.github/workflows/beta_rc.yaml b/.github/workflows/beta_rc.yaml index 48a308ef1..222abe9ac 100644 --- a/.github/workflows/beta_rc.yaml +++ b/.github/workflows/beta_rc.yaml @@ -44,6 +44,10 @@ jobs: - conda-forge create-args: >- python=${{ matrix.python-version }} + # default - will pull down 2.0 which we don't want! + # micromamba-version: latest + # pin to latest 1.x release + micromamba-version: "1.5.10-0" - name: Make oe_license.txt file from GH org secret "OE_LICENSE" env: diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml index 8c426241f..666ac5d3a 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda.yml @@ -48,6 +48,10 @@ jobs: environment-file: devtools/conda-envs/conda_oe.yaml create-args: >- python=${{ matrix.python-version }} + # default - will pull down 2.0 which we don't want! + # micromamba-version: latest + # pin to latest 1.x release + micromamba-version: "1.5.10-0" - name: Additional info about the build run: | @@ -126,4 +130,4 @@ jobs: - name: Run example notebooks run: | - python -m pytest -r fE -v -x --tb=short --nbval-lax --ignore=examples/deprecated examples \ No newline at end of file + python -m pytest -r fE -v -x --tb=short --nbval-lax --ignore=examples/deprecated examples diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 108f3dc93..bf415296b 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -65,6 +65,10 @@ jobs: environment-file: devtools/conda-envs/${{env.ENVFILE}}-examples.yaml create-args: >- python=${{ matrix.python-version }} + # default - will pull down 2.0 which we don't want! + # micromamba-version: latest + # pin to latest 1.x release + micromamba-version: "1.5.10-0" - name: Additional info about the build run: | diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 38937b0d8..bb2388655 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -20,92 +20,95 @@ jobs: PYVER: ${{ matrix.python-version }} steps: - - uses: actions/checkout@v4 - - - name: Install conda environment - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: devtools/conda-envs/installer.yaml - create-args: >- - python=${{ matrix.python-version }} - - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - - - name: Environment Information - shell: bash -l {0} - run: | - conda info - conda list - - - name: Prepare and run the constructor - shell: bash -l {0} - run: | - #cd .. - - # Find the tag of the last release (excluding RCs) - # TODO: Make this a variable that can be passed through from trigger and/or allow RC - export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -E "([0-9]+)\.([0-9]+)\.([0-9]+)$" | sort --version-sort | tail -1 | sed 's/refs\/tags\///') - - echo $LATEST_TAG - - git clone https://github.com/openforcefield/toolkit-installer-constructor - cd toolkit-installer-constructor - - python ../devtools/scripts/build_cookiecutter_json.py $LATEST_TAG $PYVER $CI_OS - cp new_cookiecutter.json cookiecutter/cookiecutter.json - - cat new_cookiecutter.json - - python run.py - - pwd - ls - ls build - - - name: Upload installer as artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.os }}_py${{ matrix.python-version }}.sh - path: toolkit-installer-constructor/build/openff-toolkit*/openff-toolkit*.sh - - - name: Install from installer - shell: bash -l {0} - run: | - #cd .. - pwd - ls - ls toolkit-installer-constructor - ls toolkit-installer-constructor/build - ls toolkit-installer-constructor/build/openff-toolkit-*/ - - mkdir scratch - cd scratch - echo $HOME/constructor_install/ | bash ../toolkit-installer-constructor/build/openff-toolkit-*/openff-toolkit-*.sh - - conda activate $HOME/constructor_install/ - conda info - conda list - - export FOUND_VER=$(python -c "import openff.toolkit; print(openff.toolkit.__version__)") - export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -v "rc" | tail -1 | sed 's/refs\/tags\///') - - echo $LATEST_TAG - echo $FOUND_VER - - if [[ $LATEST_TAG != $FOUND_VER ]]; - then echo "Version mismatch" - exit 1 - fi - - PYTEST_ARGS=" -r fE --tb=short" - PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py" - - # This should work if run directly at release time, but a safer approach would be - # to `git checkout` the corresponding tag of the release, see PR #577 - pytest $PYTEST_ARGS ../ - + - uses: actions/checkout@v4 + + - name: Install conda environment + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: devtools/conda-envs/installer.yaml + create-args: >- + python=${{ matrix.python-version }} + # default - will pull down 2.0 which we don't want! + # micromamba-version: latest + # pin to latest 1.x release + micromamba-version: "1.5.10-0" + + - name: Additional info about the build + shell: bash + run: | + uname -a + df -h + ulimit -a + + - name: Environment Information + shell: bash -l {0} + run: | + conda info + conda list + + - name: Prepare and run the constructor + shell: bash -l {0} + run: | + #cd .. + + # Find the tag of the last release (excluding RCs) + # TODO: Make this a variable that can be passed through from trigger and/or allow RC + export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -E "([0-9]+)\.([0-9]+)\.([0-9]+)$" | sort --version-sort | tail -1 | sed 's/refs\/tags\///') + + echo $LATEST_TAG + + git clone https://github.com/openforcefield/toolkit-installer-constructor + cd toolkit-installer-constructor + + python ../devtools/scripts/build_cookiecutter_json.py $LATEST_TAG $PYVER $CI_OS + cp new_cookiecutter.json cookiecutter/cookiecutter.json + + cat new_cookiecutter.json + + python run.py + + pwd + ls + ls build + + - name: Upload installer as artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}_py${{ matrix.python-version }}.sh + path: toolkit-installer-constructor/build/openff-toolkit*/openff-toolkit*.sh + + - name: Install from installer + shell: bash -l {0} + run: | + #cd .. + pwd + ls + ls toolkit-installer-constructor + ls toolkit-installer-constructor/build + ls toolkit-installer-constructor/build/openff-toolkit-*/ + + mkdir scratch + cd scratch + echo $HOME/constructor_install/ | bash ../toolkit-installer-constructor/build/openff-toolkit-*/openff-toolkit-*.sh + + conda activate $HOME/constructor_install/ + conda info + conda list + + export FOUND_VER=$(python -c "import openff.toolkit; print(openff.toolkit.__version__)") + export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-toolkit.git | cut -f2 | grep -v "rc" | tail -1 | sed 's/refs\/tags\///') + + echo $LATEST_TAG + echo $FOUND_VER + + if [[ $LATEST_TAG != $FOUND_VER ]]; + then echo "Version mismatch" + exit 1 + fi + + PYTEST_ARGS=" -r fE --tb=short" + PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py" + + # This should work if run directly at release time, but a safer approach would be + # to `git checkout` the corresponding tag of the release, see PR #577 + pytest $PYTEST_ARGS ../