This repository was archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuted improvements to automated build scripts
- Loading branch information
Showing
8 changed files
with
77 additions
and
25 deletions.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,4 +17,5 @@ | |
| !swiftest/*.h | ||
| !swiftest/tests/*.py | ||
| !src/*/*.f90 | ||
| !buildscripts/*.sh | ||
| !buildscripts/*.sh | ||
| !buildscripts/*.yml | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| !*.sh | ||
| !*.sh | ||
| !*.yml |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/bin/bash | ||
| # This script will create a miniforge3 conda environment in order to execute the build | ||
| # Zlib, hdf5, netcdf-c, netcdf-fortran | ||
| # | ||
| # Copyright 2023 - David Minton | ||
| # This file is part of Swiftest. | ||
| # Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License | ||
| # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
| # Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
| # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
| # You should have received a copy of the GNU General Public License along with Swiftest. | ||
| # If not, see: https://www.gnu.org/licenses. | ||
|
|
||
| SCRIPT_DIR=$(realpath $(dirname $0)) | ||
|
|
||
| # Determine if mamba/conda is already installed on the system. If not, install Mambaforge | ||
| if command -v mamba; then | ||
| CONDABIN="mamba" | ||
| elif command -v conda; then | ||
| CONDABIN="conda" | ||
| else | ||
| BUILD_DIR=$(realpath ${SCRIPT_DIR}/../build) | ||
| mkdir -p ${BUILD_DIR} | ||
| read -r OS ARCH < <(${SCRIPT_DIR}/get_platform.sh) | ||
| unset PYTHONPATH | ||
| cd $BUILD_DIR | ||
| wget https://github.com/conda-forge/miniforge/releases/download/23.1.0-4/Mambaforge-23.1.0-4-${OS}-${ARCH}.sh | ||
|
|
||
| MYSHELL=$(basename $SHELL) | ||
| INSTALL_DIR=${HOME}/mambaforge | ||
| ${SHELL} Mambaforge-23.1.0-4-${OS}-${ARCH}.sh -b -p ${INSTALL_DIR} | ||
| rm Mambaforge-23.1.0-4-${OS}-${ARCH}.sh | ||
|
|
||
| CONDABIN="${INSTALL_DIR}/condabin/mamba" | ||
| ${CONDABIN} init $MYSHELL | ||
| ${CONDABIN} update --name base mamba -y | ||
| fi | ||
| cd $SCRIPT_DIR | ||
| ${CONDABIN} env create --file swiftest-build-env.yml --name swiftest-build-env |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: swiftest-build-env | ||
|
|
||
| channels: | ||
| - conda-forge | ||
| - defaults | ||
|
|
||
| dependencies: | ||
| - python>=3.8 | ||
| - compilers>=1.6 | ||
| - setuptools>=42 | ||
| - scikit-build>=0.17 | ||
| - cmake>=3.5.0 | ||
| - cython>=3.0.0 | ||
| - make | ||
| - ninja |