Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Conda build workflow #2737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 64 additions & 24 deletions .github/workflows/conda_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,88 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- name: Create custom conda config file
run: |
RUNNER_CWD=$(pwd)
echo "channels:" > $RUNNER_CWD/condarc.yml
echo " - rmg" >> $RUNNER_CWD/condarc.yml
echo "show_channel_urls: true" >> $RUNNER_CWD/condarc.yml
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
miniforge-variant: Miniforge3
miniforge-version: latest
python-version: 3.7
activate-environment: rmg_env
use-mamba: true
- name: Conda info
run: |
conda info
conda list
mamba info
mamba list
- name: Install Build Tools
run: |
mamba install -y anaconda-client conda-build conda-verify
- name: Configure Auto-Upload
run: |
conda config --set anaconda_upload yes
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install -y conda-build
conda install -y anaconda-client
conda config --add channels rmg
conda config --set anaconda_upload yes
conda build --token $CONDA_TOKEN --user rmg .conda
# Set the CONDA_TOKEN environment variable
if [ -z "${{ secrets.ANACONDA_TOKEN }}" ]; then
export CONDA_TOKEN="default_value"
else
export CONDA_TOKEN="${{ secrets.ANACONDA_TOKEN }}"
fi

echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV

# Build the Conda binary
conda-build --token "$CONDA_TOKEN" --user rmg .conda

build-osx:
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- name: Create custom conda config file
run: |
RUNNER_CWD=$(pwd)
echo "channels:" > $RUNNER_CWD/condarc.yml
echo " - rmg" >> $RUNNER_CWD/condarc.yml
echo "show_channel_urls: true" >> $RUNNER_CWD/condarc.yml
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
miniforge-variant: Miniforge3
miniforge-version: latest
python-version: 3.7
activate-environment: rmg_env
use-mamba: true
- name: Conda info
run: |
conda info
conda list
mamba info
mamba list
- name: Install Build Tools
run: |
mamba install -y anaconda-client conda-build conda-verify
- name: Configure Auto-Upload
run: |
conda config --set anaconda_upload yes
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install -y conda-build
conda install -y anaconda-client
conda config --add channels rmg
conda config --set anaconda_upload yes
xcrun --show-sdk-path
conda build --token $CONDA_TOKEN --user rmg .conda
run: |
# Set the CONDA_TOKEN environment variable
if [ -z "${{ secrets.ANACONDA_TOKEN }}" ]; then
export CONDA_TOKEN="default_value"
else
export CONDA_TOKEN="${{ secrets.ANACONDA_TOKEN }}"
fi

echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV

xcrun --show-sdk-path
conda build --token $CONDA_TOKEN --user rmg .conda
Loading