Skip to content

Commit

Permalink
Merge pull request #171 from jemissik/package/fix-ci-conda-const-if-s…
Browse files Browse the repository at this point in the history
…tatement

Package/fix ci conda constructor bug
  • Loading branch information
jemissik authored Apr 28, 2024
2 parents 6c490a2 + 1b72252 commit 644a180
Showing 1 changed file with 55 additions and 14 deletions.
69 changes: 55 additions & 14 deletions .github/workflows/ci_conda_constructor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
required: true

jobs:
constructors:
Unix-like:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -22,10 +22,57 @@ jobs:
- os: macos-13
ARCH: x86_64
OS_NAME: "MacOSX"
# ARM MACOS
- os: macos-latest
ARCH: arm64
OS_NAME: "MacOSX"
# # ARM MACOS
# - os: macos-14
# ARCH: arm64
# OS_NAME: "MacOSX"
env:
PYTHONUNBUFFERED: True
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
activate-environment: constructor

- name: Install constructor
shell: bash -l {0}
run: |
conda install constructor -y
conda install -c conda-forge jinja2 -y
- name: Run conda constructor
shell: bash -l {0}
run: |
cd scripts
bash build.sh
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
path: scripts/ecodata*
name: ecodata-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: scripts/ecodata*
tag: ${{ inputs.tag }}
overwrite: true
file_glob: true

Windows:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# WINDOWS
- os: windows-latest
ARCH: x86_64
Expand All @@ -50,19 +97,13 @@ jobs:
- name: Run conda constructor
run: |
if [[ "${{ matrix.OS_NAME }}" == "Windows" ]]; then
cd scripts
.\build.ps1
else
cd scripts
bash build.sh
fi
cd scripts
.\build.ps1
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
path: scripts/ecodata*
name: ecodata-${{ matrix.OS_NAME }}
name: ecodata-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down

0 comments on commit 644a180

Please sign in to comment.