Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
name: Mise + uv - run task
name: Checks - Python project
on:
workflow_call:
inputs:
directory:
description: Directory containing uv project and mise task
required: true
type: string
task:
description: Task to run
description: Python project directory
required: true
type: string
workflow_dispatch:
inputs:
directory:
description: Directory containing uv project and mise task
description: Python project directory
options:
- aoc-main
- solvers/python
required: true
type: choice
task:
description: Task to run
required: true
type: string
permissions:
contents: read

jobs:
task:
name: Run mise task with uv - ${{ inputs.task }}
# Every check that also needs a uv virtual environment
checks:
name: Run checks
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 15

steps:
- name: Checkout
Expand All @@ -46,10 +39,21 @@ jobs:
with:
directory: ${{ inputs.directory }}

- name: Run task - ${{ inputs.task }}
- parallel:
- name: check:mypy

run: mise run check:mypy
shell: bash
working-directory: ${{ inputs.directory }}

- name: check:pyright

run: mise run check:pyright
shell: bash
working-directory: ${{ inputs.directory }}

- name: check:pytest

env:
MISE_TASK: ${{ inputs.task }}
run: mise run "${MISE_TASK}"
shell: bash
working-directory: ${{ inputs.directory }}
run: mise run check:pytest
shell: bash
working-directory: ${{ inputs.directory }}
78 changes: 0 additions & 78 deletions .github/workflows/ci-python-project.yaml

This file was deleted.

48 changes: 32 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-mise-root-ubuntu

# uv cache prepare for aoc-main
# uv cache prepare
uv-cache-aoc-main-macos:
needs: mise-cache-macos
uses: ./.github/workflows/mise-uv-prepare-cache.yaml
Expand All @@ -56,6 +56,16 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-uv-aoc-main-ubuntu

uv-cache-solvers-python-ubuntu:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-uv-prepare-cache.yaml
with:
directory: solvers/python
runner: ubuntu-24.04

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-uv-solvers-python-ubuntu

# Homebrew cache prepare
homebrew-cache-macos:
uses: ./.github/workflows/homebrew-prepare-cache.yaml
Expand All @@ -78,15 +88,30 @@ jobs:
needs: mise-cache-ubuntu
uses: ./.github/workflows/checks-mise.yaml

# CI workflows for projects in the repository
ci-aoc-main:
checks-aoc-main:
needs:
- mise-cache-ubuntu
- uv-cache-aoc-main-ubuntu
uses: ./.github/workflows/ci-python-project.yaml
uses: ./.github/workflows/checks-python.yaml
with:
directory: aoc-main

checks-solvers-python:
needs:
- mise-cache-ubuntu
- uv-cache-solvers-python-ubuntu
uses: ./.github/workflows/checks-python.yaml
with:
directory: solvers/python

# Run the Python solvers
solvers-python:
needs:
- mise-cache-ubuntu
- uv-cache-solvers-python-ubuntu
uses: ./.github/workflows/python-run.yaml
secrets: inherit

# CI for C++ solvers
ci-solvers-cpp:
needs:
Expand All @@ -102,16 +127,6 @@ jobs:
homebrew-downloads-hash-from-prepare-macos: ${{ needs.homebrew-cache-macos.outputs.downloads-hash }}
homebrew-downloads-hash-from-prepare-ubuntu: ${{ needs.homebrew-cache-ubuntu.outputs.downloads-hash }}

# CI for Python solvers
ci-solvers-python:
needs:
- mise-cache-ubuntu
- uv-cache-aoc-main-ubuntu
uses: ./.github/workflows/ci-python-project.yaml
secrets: inherit
with:
directory: solvers/python

# CI for Rust solvers
ci-solvers-rust:
needs:
Expand All @@ -126,11 +141,12 @@ jobs:
check:
if: always()
needs:
- checks-aoc-main
- checks-mise
- ci-aoc-main
- checks-solvers-python
- ci-solvers-cpp
- ci-solvers-python
- ci-solvers-rust
- solvers-python
runs-on: ubuntu-24.04
timeout-minutes: 5

Expand Down
Loading