Skip to content

Commit

Permalink
cache build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Feb 18, 2024
1 parent 9c44abc commit 46a9160
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- run: make test
- uses: codecov/codecov-action@v4
- name: compile -Wall
run: make build-wheel
run: make clean build-wheel
cuda:
if: github.event_name != 'pull_request' || !contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association)
name: CUDA py${{ matrix.python }}
Expand All @@ -76,7 +76,7 @@ jobs:
- run: make test
- uses: codecov/codecov-action@v4
- name: compile -Wall
run: make CUDA_ARCHITECTURES=all build-wheel
run: make CUDA_ARCHITECTURES=all clean build-wheel
- name: Post Run setup-python
run: setup-python -p${{ matrix.python }} -Dr
if: ${{ always() }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
/cuvec/example_swig.py
/cuvec/swvec.py
/dist/
/build/
/docs/build/

# Unit test / coverage reports
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Install in "development/editable" mode including dev/test dependencies:
# clone & install dependencies (one-off)
git clone https://github.com/AMYPAD/CuVec
cd CuVec
make deps-build
make deps-build deps-run

# delete build artefacts, (re)build & install in-place with debug info
make CUVEC_DEBUG=1 build-editable
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ endif
.PHONY: build-editable clean deps-build deps-run build-wheel
build-editable:
git diff --exit-code --quiet '*/src/**' || (echo "Uncommitted changes in */src"; exit 1)
@$(MAKE) clean
pip install --no-build-isolation --check-build-dependencies --no-deps -t . -U -v . $(BUILD_CMAKE_FLAGS)
pip install --no-build-isolation --check-build-dependencies -Cbuild-dir=build --no-deps -t . -U -v . $(BUILD_CMAKE_FLAGS)
git restore '*/src/**'
test:
pytest -k "not perf" -n=3
Expand All @@ -27,6 +26,5 @@ deps-run:
pip install toml
python -c 'import toml; c=toml.load("pyproject.toml"); print("\0".join(c["project"]["dependencies"] + c["project"]["optional-dependencies"]["dev"]), end="")' | xargs -0 pip install
build-wheel:
@$(MAKE) clean
pip install build
python -m build -n -w $(BUILD_CMAKE_FLAGS)

0 comments on commit 46a9160

Please sign in to comment.