diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 2baad583..2249c44b 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -2,6 +2,10 @@ name: Pull Request on: pull_request +env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + jobs: check: name: Check Python @@ -13,6 +17,8 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Install poetry run: pipx install poetry - name: Set up Python ${{ matrix.python-version }} @@ -39,16 +45,8 @@ jobs: src: "./guppylang" args: check - - name: Build Hugr validator - uses: PyO3/maturin-action@v1 - with: - command: build - sccache: 'true' - rust-toolchain: '1.75' - working-directory: validator - - - name: Install Hugr validator - run: poetry add validator/target/wheels/* + - name: Install Guppy with validation + run: poetry install --with validation - name: Run tests run: poetry run pytest diff --git a/poetry.lock b/poetry.lock index 45a4be9d..aab547c6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -912,4 +912,4 @@ pytket = ["pytket", "tket2-py"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "7108630ba769a2e8e76da9f4aca911602ebd33f140501a2abb926d38ab20a076" +content-hash = "38603201ab598596fc0671e329e91573b78f55f1420767cfbffae55a291fe32c" diff --git a/pyproject.toml b/pyproject.toml index 9dae04e6..b3cce387 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,11 @@ pre-commit = "^3.6.0" ruff = "^0.1.11" maturin = "^1.4.0" pytket = "*" + +[tool.poetry.group.validation] +optional = true + +[tool.poetry.group.validation.dependencies] guppyval = {path = "validator"} [tool.poetry.extras]