Skip to content
CI/CD Inventory

galaxyproject/wheelforge (opens in new tab)

2 workflows

Triggers

push pull_request

Jobs

Jobs for Build and upload wheels
Job Runs on Steps Actions used
setup ubuntu-latest 4
actions/checkout@v6 actions/upload-artifact@v7
build ${{ matrix.os }} 7
actions/checkout@v6 actions/setup-python@v6 actions/download-artifact@v8 docker/setup-qemu-action@v4 actions/upload-artifact@v7
Deploy Wheels ubuntu-latest 4
actions/download-artifact@v8 actions/setup-python@v6
Raw YAML
name: Build and upload wheels
on: [push, pull_request]
env:
  CIBW_BUILD: 'cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*'
  CIBW_SKIP: '*-musllinux_*'
concurrency:
  # Group runs by PR, but keep runs on the default branch separate
  # because we do not want to cancel wheel uploads
  group: pr-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
  cancel-in-progress: true
jobs:
  setup:
    runs-on: ubuntu-latest
    outputs:
      recipes_found: ${{ steps.recipes_changes.outputs.recipes_found }}
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          persist-credentials: false
      # The range of commits to check for changes is:
      # - `origin/main...` for all events happening on a feature branch
      # - for events on the main branch we compare against the sha before the event
      #   (note that this does not work for feature branch events since we want all
      #   commits on the feature branch and not just the commits of the last event)
      # - for pull requests we compare against the 1st ancestor, given the current
      #   HEAD is the merge between the PR branch and the base branch
      - name: Set commit range
        id: commit_range_step
        run: |
          if [ "${{ github.event_name }}" = 'push' -a "${{github.ref}}" != 'refs/heads/main' ]; then
              # push to a feature branch
              git fetch origin main
              commit_range='origin/main...'
          elif [ "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/main' ]; then
              # push to the main branch, e.g. merge
              commit_range="${{ github.event.before }}.."
          else
              # pull request
              commit_range='HEAD~..'
          fi
          echo "commit_range=$commit_range" >> $GITHUB_OUTPUT
      - name: Detect changes to recipes/
        id: recipes_changes
        run: |
          touch duplicated_recipe_folders.txt
          while read op path; do
              case "$op" in
                  A|M)
                      echo "${path}" | cut -d '/' -f1,2 >> duplicated_recipe_folders.txt
                      ;;
              esac
          done < <(git diff --color=never --name-status '${{ steps.commit_range_step.outputs.commit_range }}' -- recipes/)
          sort -u duplicated_recipe_folders.txt > recipe_list.txt
          cat recipe_list.txt
          if [ -s recipe_list.txt ]; then
              recipes_found=true
          else
              recipes_found=false
          fi
          echo "recipes_found=$recipes_found" >> $GITHUB_OUTPUT
      - uses: actions/upload-artifact@v7
        with:
          name: recipe_list
          path: recipe_list.txt

  build:
    needs: setup
    if: ${{ needs.setup.outputs.recipes_found == 'true' }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
      - uses: actions/setup-python@v6
        with:
          python-version: '3.14'
          cache: pip
      - uses: actions/download-artifact@v8
        with:
          name: recipe_list
          path: ../workflow_artifacts/
      - name: Install required Python packages
        run: python3 -m pip install build cibuildwheel PyYAML requests
      - name: Set up QEMU to build non-native architectures
        if: runner.os == 'Linux'
        uses: docker/setup-qemu-action@v4
      - name: Build wheels
        run: |
          while read -r folder; do
              python3 wheel_builder.py "$folder";
          done < ../workflow_artifacts/recipe_list.txt
      - uses: actions/upload-artifact@v7
        with:
          name: wheelhouse-${{ matrix.os }}
          path: wheelhouse/

  deploy:
    name: Deploy Wheels
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v8
        with:
          merge-multiple: true
          pattern: wheelhouse-*
          path: wheelhouse/
      - uses: actions/setup-python@v6
        with:
          python-version: '3.14'
          # No cache since we are not checking out the repo
      - name: Setup deploy environment
        run: python3 -m pip install s3pypi
      - name: Deploy wheels
        if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'galaxyproject' }}
        run: s3pypi upload ./wheelhouse/* --bucket "$S3_BUCKET" --region "$S3_REGION" --put-root-index --index.html --s3-put-args 'ACL=public-read' --force
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          S3_BUCKET: galaxy-wheels
          S3_REGION: us-east-2

Last fetched:

Triggers

push pull_request

Jobs

Jobs for Python linting
Job Runs on Steps Actions used
Test ubuntu-latest 6
actions/checkout@v6 actions/setup-python@v6 psf/black@stable isort/isort-action@v1
Raw YAML
name: Python linting
on:
  push:
    paths:
      - '**.py'
      - '.github/workflows/lint.yaml'
      - tox.ini
  pull_request:
    paths:
      - '**.py'
      - '.github/workflows/lint.yaml'
      - tox.ini
concurrency:
  group: lint-${{ github.ref }}
  cancel-in-progress: true
jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.10', '3.14']
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
      - uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
          allow-prereleases: true
      - name: Install tox
        run: pip install tox
      - name: Run tox
        run: tox
      - uses: psf/black@stable
      - uses: isort/isort-action@v1

Last fetched: