this repo has no description

Use uv to manage CI (#235)

authored by bernsteinbear.com and committed by

GitHub c3ae1b34 1b42c18a

+36 -28
+28 -28
.github/workflows/ci.yml
··· 17 17 runs-on: ubuntu-latest 18 18 steps: 19 19 - uses: actions/checkout@v4 20 - - name: Get deadsnakes repo 21 - run: sudo add-apt-repository --yes ppa:deadsnakes/ppa 22 - - name: Update local package lists 23 - run: sudo apt update 20 + - name: Install uv 21 + uses: astral-sh/setup-uv@v5 24 22 - name: Install Python 25 - run: sudo apt install --yes python3.10 26 - - run: python3.10 -m pip install --user pipx 27 - - run: python3.10 -m pipx install poetry 28 - - run: poetry install --with=dev 29 - - run: poetry run ruff check scrapscript.py 30 - - run: poetry run ruff format --check scrapscript.py 31 - - run: poetry run mypy --strict scrapscript.py 23 + run: uv python install 3.10 24 + - run: uv sync 25 + - run: uv run ruff check scrapscript.py 26 + - run: uv run ruff format --check scrapscript.py 27 + - run: uv run mypy --strict scrapscript.py 32 28 run_interpreter_unit_tests: 33 29 strategy: 34 30 matrix: 35 - PYTHON: [python3.8, python3.9, python3.10, python3.11, python3.12, python3.13] 31 + PYTHON: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] 36 32 runs-on: ubuntu-latest 37 33 steps: 38 34 - uses: actions/checkout@v4 39 - - name: Get deadsnakes repo 40 - run: sudo add-apt-repository --yes ppa:deadsnakes/ppa 41 - - name: Update local package lists 42 - run: sudo apt update 35 + - name: Install uv 36 + uses: astral-sh/setup-uv@v5 43 37 - name: Install Python 44 - run: sudo apt install --yes ${{matrix.PYTHON}} 38 + run: uv python install ${{matrix.PYTHON}} 39 + - name: Pin Python 40 + run: uv python pin ${{matrix.PYTHON}} 45 41 - name: Run interpreter tests 46 - run: ${{matrix.PYTHON}} scrapscript_tests.py 42 + run: uv run python scrapscript_tests.py 47 43 run_compiler_unit_tests: 48 44 strategy: 49 45 matrix: 50 - PYTHON: [python3.8, python3.9, python3.10, python3.11, python3.12, python3.13, python3.14] 46 + PYTHON: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] 51 47 CC: [gcc, clang, tcc] 52 48 USE_STATIC_HEAP: ["-DSTATIC_HEAP", ""] 53 49 runs-on: ubuntu-latest 54 50 steps: 55 51 - uses: actions/checkout@v4 56 - - name: Get deadsnakes repo 57 - run: sudo add-apt-repository --yes ppa:deadsnakes/ppa 52 + - name: Install uv 53 + uses: astral-sh/setup-uv@v5 58 54 - name: Update local package lists 59 55 run: sudo apt update 60 - - name: Install deps 61 - run: sudo apt install --yes ${{matrix.PYTHON}} ${{matrix.CC}} valgrind 56 + - name: Install Python 57 + run: uv python install ${{matrix.PYTHON}} 58 + - name: Pin Python 59 + run: uv python pin ${{matrix.PYTHON}} 60 + - name: Install other deps 61 + run: sudo apt install --yes ${{matrix.CC}} valgrind 62 62 - name: Run compiler tests 63 - run: CC=${{matrix.CC}} CFLAGS="${{matrix.USE_STATIC_HEAP}}" ${{matrix.PYTHON}} compiler_tests.py 63 + run: CC=${{matrix.CC}} CFLAGS="${{matrix.USE_STATIC_HEAP}}" uv run python compiler_tests.py 64 64 - name: Run compiler tests -DNDEBUG 65 - run: CC=${{matrix.CC}} CFLAGS="${{matrix.USE_STATIC_HEAP}} -DNDEBUG" ${{matrix.PYTHON}} compiler_tests.py 65 + run: CC=${{matrix.CC}} CFLAGS="${{matrix.USE_STATIC_HEAP}} -DNDEBUG" uv run python compiler_tests.py 66 66 - name: Run compiler tests with ASAN 67 - run: CC=${{matrix.CC}} CFLAGS="-fsanitize=address ${{matrix.USE_STATIC_HEAP}}" ${{matrix.PYTHON}} compiler_tests.py 67 + run: CC=${{matrix.CC}} CFLAGS="-fsanitize=address ${{matrix.USE_STATIC_HEAP}}" uv run python compiler_tests.py 68 68 - name: Run compiler tests with UBSAN 69 - run: CC=${{matrix.CC}} CFLAGS="-fsanitize=undefined ${{matrix.USE_STATIC_HEAP}}" ${{matrix.PYTHON}} compiler_tests.py 69 + run: CC=${{matrix.CC}} CFLAGS="-fsanitize=undefined ${{matrix.USE_STATIC_HEAP}}" uv run python compiler_tests.py 70 70 - name: Run compiler tests with Valgrind 71 - run: CC=${{matrix.CC}} CFLAGS="${{matrix.USE_STATIC_HEAP}}" USE_VALGRIND=1 ${{matrix.PYTHON}} compiler_tests.py 71 + run: CC=${{matrix.CC}} CFLAGS="${{matrix.USE_STATIC_HEAP}}" USE_VALGRIND=1 uv run python compiler_tests.py 72 72 run_unit_tests: 73 73 needs: [run_interpreter_unit_tests, run_compiler_unit_tests] 74 74 # Fake, unnecessary
+8
pyproject.toml
··· 28 28 pylint = "^3.2.0" 29 29 ruff = "^0.5.0" 30 30 31 + [project] 32 + name = "scrapscript" 33 + version = "0.1.1" 34 + requires-python = ">=3.8" 35 + 36 + [tool.uv] 37 + dev-dependencies = ["mypy~=1.10.0", "pylint~=3.2.0", "ruff~=0.5.0"] 38 + 31 39 [tool.poetry.scripts] 32 40 scrap = "scrapscript:main" 33 41