Skip to content

Add lit tests #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/dockerfiles/env/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:latest

RUN set -ex; \
export DEBIAN_FRONTEND=noninteractive; \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list;\
curl -sSL https://cli.github.com/packages/githubcli-archive-keyring.gpg > /usr/share/keyrings/githubcli-archive-keyring.gpg; \
apt-get update -y; \
apt-get install -y --no-install-recommends --fix-missing \
bash-completion \
python3-pip \
cmake gcc g++ ninja-build git clang-format \
gh \
; \
rm -rf /var/lib/apt/lists/*

RUN pip install lit

SHELL ["/bin/bash", "-xec"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ RUN set -ex; \
curl -sSL https://cli.github.com/packages/githubcli-archive-keyring.gpg > /usr/share/keyrings/githubcli-archive-keyring.gpg; \
apt-get update -y; \
apt-get install -y --no-install-recommends --fix-missing \
python3-pip \
cmake gcc g++ ninja-build git clang-format \
gh \
; \
rm -rf /var/lib/apt/lists/*

RUN pip install lit

USER runner
WORKDIR $HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
REGISTRY=localhost:5000
TAG=graph-compiler-runner:latest

kubectl -n docker-registry port-forward svc/docker-registry 5000:5000 &

cd $(dirname "$0")
docker build . --tag $REGISTRY/$TAG
docker push $REGISTRY/$TAG
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
cmake -G Ninja llvm -B build -DCMAKE_INSTALL_PREFIX=llvm-install \
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=true -DLLVM_ENABLE_PROJECTS="mlir" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_INSTALL_UTILS=true -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --target install
cp llvm/bin/llvm-lit llvm-install/bin
cd llvm-install
tar -zcf ../llvm.tgz .

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ jobs:
- name: Build
run: |
scripts/compile.sh

- name: Test
run: |
cmake --build build --target gc-check
2 changes: 1 addition & 1 deletion scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ test -f "$llvm_dir/llvm-$llvm_hash"/llvm.tgz || get_llvm
cmake -S . -G Ninja -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DMLIR_DIR=$llvm_dir/lib/cmake/mlir \
-DLLVM_EXTERNAL_LIT=$llvm_dir/bin/llvm-lit
-DLLVM_EXTERNAL_LIT=$(which lit)
cmake --build build --parallel $(nproc)