chore(deps): update actions/checkout action to v6 #145
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
| name: llvmdev | |
| on: | |
| pull_request: | |
| paths: | |
| - .github/workflows/llvmdev_build.yml | |
| - buildscripts/github/llvmdev_evaluate.py | |
| - conda-recipes/llvmdev/** | |
| - conda-recipes/llvmdev_for_wheel/** | |
| label: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| platform: | |
| description: Conda Platform | |
| default: all | |
| required: true | |
| type: choice | |
| options: | |
| - all | |
| - linux-64 | |
| - linux-aarch64 | |
| - osx-arm64 | |
| - win-64 | |
| recipe: | |
| description: Recipe to build | |
| default: all | |
| required: true | |
| type: choice | |
| options: | |
| - all | |
| - llvmdev | |
| - llvmdev_for_wheel | |
| 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 | |
| || toJson(github.event.inputs) | |
| || github.event.label.name | |
| || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| ARTIFACT_RETENTION_DAYS: 7 | |
| jobs: | |
| check: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.evaluate.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: '3.14' | |
| - name: Evaluate | |
| id: evaluate | |
| env: | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| GITHUB_LABEL_NAME: ${{ github.event.label.name }} | |
| GITHUB_WORKFLOW_INPUT: ${{ toJson(github.event.inputs) }} | |
| run: | | |
| ./buildscripts/github/llvmdev_evaluate.py | |
| build: | |
| needs: check | |
| name: ${{ matrix.recipe }}-${{ matrix.platform }} | |
| runs-on: ${{ matrix.runner }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| strategy: | |
| matrix: ${{fromJson(needs.check.outputs.matrix)}} | |
| fail-fast: false | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Miniconda | |
| uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0 | |
| with: | |
| auto-update-conda: true | |
| auto-activate-base: true | |
| activate-environment: '' | |
| run-post: false | |
| - name: Build and test conda package in manylinux - linux platforms | |
| if: (matrix.platform == 'linux-64' || matrix.platform == 'linux-aarch64') && matrix.recipe == 'llvmdev_for_wheel' | |
| env: | |
| CONDA_CHANNEL_DIR: conda_channel_dir | |
| run: | | |
| set -x | |
| # Set manylinux-specific variables | |
| MANYLINUX_IMAGE="" | |
| MINICONDA_FILE="" | |
| if [[ "${{ matrix.platform }}" == "linux-64" ]]; then | |
| MANYLINUX_IMAGE="quay.io/pypa/manylinux2014_x86_64" | |
| MINICONDA_FILE="https://repo.anaconda.com/miniconda/Miniconda3-py311_24.9.2-0-Linux-x86_64.sh" | |
| elif [[ "${{ matrix.platform }}" == "linux-aarch64" ]]; then | |
| MANYLINUX_IMAGE="quay.io/pypa/manylinux_2_28_aarch64" | |
| MINICONDA_FILE="https://repo.anaconda.com/miniconda/Miniconda3-py311_24.9.2-0-Linux-aarch64.sh" | |
| fi | |
| echo "Building in manylinux container for ${{ matrix.platform }}" | |
| mkdir -p docker_output | |
| docker run --rm \ | |
| -v "$(pwd):/root/llvmlite" \ | |
| "$MANYLINUX_IMAGE" \ | |
| bash -c "git config --global --add safe.directory /root/llvmlite && /root/llvmlite/buildscripts/manylinux/build_llvmdev.sh $MINICONDA_FILE" | |
| sudo chown -R "$(id -u):$(id -g)" docker_output | |
| # The script outputs to docker_output/<platform>/*.conda | |
| # Move the package to the upload directory. | |
| mkdir -p "${CONDA_CHANNEL_DIR}" | |
| mv docker_output/*/*.conda "${CONDA_CHANNEL_DIR}/" | |
| ls -lah "${CONDA_CHANNEL_DIR}" | |
| - name: Install conda-build | |
| if: (matrix.platform != 'linux-64' && matrix.platform != 'linux-aarch64') || matrix.recipe != 'llvmdev_for_wheel' | |
| run: | | |
| conda install -c defaults conda-build | |
| - name: Build and test conda package - non-linux platforms | |
| if: (matrix.platform != 'linux-64' && matrix.platform != 'linux-aarch64') || matrix.recipe != 'llvmdev_for_wheel' | |
| env: | |
| CONDA_CHANNEL_DIR: conda_channel_dir | |
| run: | | |
| set -x | |
| mkdir -p "${CONDA_CHANNEL_DIR}" | |
| conda build -c defaults "./conda-recipes/${{ matrix.recipe }}" "--output-folder=${CONDA_CHANNEL_DIR}" | |
| ls -lah "${CONDA_CHANNEL_DIR}" | |
| - name: Upload conda package | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: ${{ matrix.recipe }}_${{ matrix.platform }} | |
| path: conda_channel_dir | |
| compression-level: 0 | |
| retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }} | |
| if-no-files-found: error | |
| - name: Get Workflow Run ID | |
| run: | | |
| echo "Current workflow run ID: ${{ github.run_id }}" | |
| echo "Use this ID when triggering llvmlite workflow" |