Skip to content

Refactor recipe build flows #1

Refactor recipe build flows

Refactor recipe build flows #1

name: llvmdev_builder
on:
pull_request:
paths:
- .github/workflows/llvmdev_conda_builder.yml
workflow_dispatch:
inputs:
os:
description: "Operating system"
default: "ubuntu-24.04"
required: true
type: choice
options:
- "ubuntu-24.04"
- "macos-14"
- "windows-2019"
recipe:
description: "Recipe to build"
default: "llvmdev"
required: true
type: choice
options:
- "llvmdev"
- "llvmdev_manylinux"
concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to master will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
windows:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [ubuntu-24.04,macos-14,windows-2019]
recipe: ${{ github.event_name == 'workflow_dispatch' && [github.event.inputs.recipe] || ['llvmdev', 'llvmdev_manylinux'] }}

Check failure on line 46 in .github/workflows/llvmdev_conda_builder.yml

View workflow run for this annotation

GitHub Actions / llvmdev_builder

Invalid workflow file

The workflow is not valid. .github/workflows/llvmdev_conda_builder.yml (Line: 46, Col: 17): Unexpected symbol: '['. Located at position 45 within expression: github.event_name == 'workflow_dispatch' && [github.event.inputs.recipe] || ['llvmdev', 'llvmdev_manylinux'] .github/workflows/llvmdev_conda_builder.yml (Line: 46, Col: 17): Unexpected value '${{ github.event_name == 'workflow_dispatch' && [github.event.inputs.recipe] || ['llvmdev', 'llvmdev_manylinux'] }}'
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
activate-environment: ""
- name: Install conda-build
run: |
conda install conda-build
- name: Build conda package
env:
CONDA_CHANNEL_DIR: conda_channel_dir
run: |
mkdir $CONDA_CHANNEL_DIR
conda build ./conda-recipes/${{ matrix.recipe }} --output-folder=$CONDA_CHANNEL_DIR
ls -lah $CONDA_CHANNEL_DIR
- name: Upload conda package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.recipe }}-${{ runner.os }}
path: conda_channel_dir
compression-level: 0
retention-days: 7
if-no-files-found: error
run-post: false
- name: Get Workflow Run ID
run: |
echo "Current workflow run ID: ${{ github.run_id }}"
echo "Use this ID when triggering llvmlite workflow"