Skip to content

Commit

Permalink
chore: add sccache and make validation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Jan 19, 2024
1 parent d184077 commit 1850aa6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Pull Request

on: pull_request

env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

jobs:
check:
name: Check Python
Expand All @@ -13,6 +17,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 1850aa6

Please sign in to comment.