chore(ci): add python testing

This commit is contained in:
youben11
2021-08-04 15:07:33 +01:00
committed by Quentin Bourgerie
parent 0aa9f93e20
commit c58abe6565
3 changed files with 7 additions and 4 deletions

View File

@@ -28,5 +28,5 @@ jobs:
image: ghcr.io/zama-ai/mlir@sha256:5b7adfbf4e28c5a7517ed0b2bb0347455dea86f495b3ba060f6bea70c9dc10d3
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: -v ${{ github.workspace }}:/workspace
run: cd /workspace/compiler && mkdir build && cmake -B build . -DLLVM_DIR=$LLVM_PROJECT/build/lib/cmake/llvm -DMLIR_DIR=$LLVM_PROJECT/build/lib/cmake/mlir && make -C build/ zamacompiler && make test
options: -v ${{ github.workspace }}:/workspace -e PYTHONPATH=/llvm-project/build/python:/workspace/compiler/build/python
run: cd /workspace/compiler && mkdir build && cmake -B build . -DLLVM_DIR=$LLVM_PROJECT/build/lib/cmake/llvm -DMLIR_DIR=$LLVM_PROJECT/build/lib/cmake/mlir && make -C build/ all zamacompiler && make test && pip install pytest && make test_python

View File

@@ -4,4 +4,4 @@ ENV PYTHONPATH=/llvm-project/build/python:/compiler/build/python:$PYTHONPATH
COPY /compiler /compiler
WORKDIR /compiler
RUN mkdir -p build && make -B build && make -C build all
RUN mkdir -p build && make -B build && make -C build all zamacompiler

View File

@@ -5,4 +5,7 @@ zamacompiler:
make -C build/ zamacompiler
test:
${LLVM_PROJECT}/build/bin/llvm-lit -v tests/
${LLVM_PROJECT}/build/bin/llvm-lit -v tests/
test_python:
pytest -v tests/python