add Ribasim Python #50
Workflow file for this run
This file contains 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: Build deltaforge | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Deltaforge-${{ matrix.OS_NAME }}-${{ matrix.ARCH }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
ARCH: x86_64 | |
TARGET_PLATFORM: win-64 | |
OS_NAME: "Windows" | |
# - os: ubuntu-latest | |
# ARCH: aarch64 | |
# TARGET_PLATFORM: linux-aarch64 | |
# DOCKER_ARCH: arm64v8 | |
# DOCKERIMAGE: condaforge/linux-anvil-aarch64 | |
# OS_NAME: "Linux" | |
# | |
# - os: ubuntu-latest | |
# ARCH: x86_64 | |
# TARGET_PLATFORM: linux-64 | |
# DOCKER_ARCH: amd64 | |
# DOCKERIMAGE: condaforge/linux-anvil-comp7 | |
# OS_NAME: "Linux" | |
# | |
# - os: ubuntu-latest | |
# ARCH: ppc64le | |
# TARGET_PLATFORM: linux-ppc64le | |
# DOCKER_ARCH: ppc64le | |
# DOCKERIMAGE: condaforge/linux-anvil-ppc64le | |
# OS_NAME: "Linux" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@35d1405e78aa3f784fe3ce9a2eb378d5eeb62169 | |
with: | |
miniconda-version: "latest" | |
if: contains(matrix.OS_NAME, 'Windows') | |
- name: Build and test deltaforge | |
env: | |
ARCH: ${{ matrix.ARCH }} | |
OS_NAME: ${{ matrix.OS_NAME }} | |
DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }} | |
DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }} | |
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }} | |
run: | | |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
export DELTAFORGE_VERSION=${GITHUB_REF##*/}; | |
fi | |
if [[ "$OS_NAME" == "Linux" ]]; then | |
export EXT=sh | |
bash build_deltaforge.sh; | |
fi | |
if [[ "$OS_NAME" == "Windows" ]]; then | |
export EXT=exe | |
echo "WINDIR:$WINDIR" | |
source /c/Miniconda3/Scripts/activate; | |
source build_deltaforge_win.sh; | |
fi | |
# Copy for latest release | |
cp build/Deltaforge-*-$OS_NAME-$ARCH.$EXT build/Deltaforge-$OS_NAME-$ARCH.$EXT | |
if [[ "$OS_NAME" == "MacOSX" ]]; then | |
cp build/Deltaforge-*-$OS_NAME-$ARCH.$EXT build/Deltaforge-Darwin-$ARCH.$EXT | |
fi | |
ls -alh build | |
shell: bash | |
- name: Upload deltaforge to Github artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
path: build/Deltaforge-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}* | |
name: Deltaforge-${{ matrix.OS_NAME }}-${{ matrix.ARCH }} | |
- name: Upload deltaforge to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/Deltaforge* | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
if: startsWith(github.ref, 'refs/tags/') |