-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from jackparsonss/jparsons/ci
CI/CD
- Loading branch information
Showing
9 changed files
with
174 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
defaults: | ||
run: | ||
working-directory: ./scripts | ||
|
||
container: | ||
image: aizuko/gazprea:v0.5 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: make executable | ||
run: chmod +x entrypoint.sh | ||
|
||
- name: build and test | ||
run: ./entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ build/ | |
|
||
fuse.ll | ||
fuse.ll.stdout | ||
lli-temp.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install build-essential -y | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install pkg-config -y | ||
|
||
RUN apt-get update | ||
RUN apt-get install uuid-dev -y | ||
|
||
RUN apt-get update | ||
RUN apt-get install openjdk-17-jre -y | ||
|
||
RUN apt-get update | ||
RUN apt-get install git -y | ||
|
||
RUN apt-get update | ||
RUN apt-get install cmake -y | ||
|
||
RUN apt-get update | ||
RUN apt-get install ninja-build -y | ||
|
||
RUN apt-get update | ||
RUN apt-get install curl -y | ||
|
||
RUN mkdir /antlr | ||
RUN cd /antlr && git clone https://github.com/antlr/antlr4.git | ||
RUN cd /antlr/antlr4 && git checkout 4.13.1 | ||
|
||
RUN mkdir /antlr/antlr4/build | ||
RUN mkdir /antlr/install | ||
RUN cd /antlr/antlr4/build && cmake /antlr/antlr4/runtime/Cpp/ \ | ||
-DCMAKE_BUILD_TYPE=RELEASE \ | ||
-DCMAKE_INSTALL_PREFIX="/antlr/install" && make install -j 8 | ||
|
||
|
||
RUN mkdir /antlr/install/bin | ||
RUN curl https://www.antlr.org/download/antlr-4.13.1-complete.jar \ | ||
-o /antlr/install/bin/antlr.jar | ||
|
||
RUN cd / && git clone https://github.com/llvm/llvm-project.git | ||
RUN cd /llvm-project && git checkout llvmorg-16.0.6 | ||
RUN mkdir /llvm-project/build | ||
RUN cd /llvm-project/build && cmake -G Ninja ../llvm \ | ||
-DLLVM_ENABLE_PROJECTS=mlir \ | ||
-DLLVM_BUILD_EXAMPLES=ON \ | ||
-DLLVM_TARGETS_TO_BUILD="Native" \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DLLVM_ENABLE_ASSERTIONS=ON | ||
|
||
RUN cd /llvm-project/build && ninja check-all -j 8 || true | ||
|
||
RUN cd / && git clone https://github.com/cmput415/Tester.git | ||
RUN mkdir /Tester/build | ||
RUN cd /Tester/build && cmake .. && make -j 8 | ||
|
||
RUN echo 'export ANTLR_INS="/antlr/install"' >> ~/.bashrc | ||
RUN echo 'export ANTLR_JAR="/antlr/install/bin/antlr.jar"' >> ~/.bashrc | ||
RUN echo 'export CLASSPATH="$ANTLR_JAR:$CLASSPATH"' >> ~/.bashrc | ||
RUN echo 'alias antlr4="java -Xmx500M org.antlr.v4.Tool"' >> ~/.bashrc | ||
RUN echo 'alias grun="java org.antlr.v4.gui.TestRig"' >> ~/.bashrc | ||
|
||
RUN echo 'export MLIR_INS="/llvm-project/build/"' >> ~/.bashrc | ||
RUN echo 'export MLIR_DIR="/llvm-project/build/lib/cmake/mlir/"' >> ~/.bashrc | ||
RUN echo 'export PATH="/llvm-project/build/bin:$PATH"' >> ~/.bashrc | ||
|
||
RUN echo 'export PATH="/Tester/bin/:$PATH"' >> ~/.bashrc | ||
|
||
RUN rm -rf /llvm-project/bolt | ||
RUN rm -rf /llvm-project/clang | ||
RUN rm -rf /llvm-project/clang-tools-extra | ||
RUN rm -rf /llvm-project/compiler-rt | ||
RUN rm /llvm-project/CONTRIBUTING.md | ||
RUN rm -rf /llvm-project/cross-project-tests | ||
RUN rm -rf /llvm-project/flang | ||
RUN rm -rf /llvm-project/libc | ||
RUN rm -rf /llvm-project/libclc | ||
RUN rm -rf /llvm-project/libcxx | ||
RUN rm -rf /llvm-project/libcxxabi | ||
RUN rm -rf /llvm-project/libunwind | ||
RUN rm /llvm-project/LICENSE.TXT | ||
RUN rm /llvm-project/SECURITY.md | ||
RUN rm -rf /llvm-project/lld | ||
RUN rm -rf /llvm-project/lldb | ||
RUN rm -rf /llvm-project/openmp | ||
RUN rm -rf /llvm-project/polly | ||
RUN rm -rf /llvm-project/pstl | ||
RUN rm -rf /llvm-project/third-party | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENTRYPOINT ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /bin/bash | ||
|
||
source ~/.bashrc | ||
|
||
cd ../ | ||
|
||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j 5 | ||
|
||
cd ../tests | ||
tester ./ci_config.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"inDir": "/__w/fusion/fusion/tests/input", | ||
"outDir": "/__w/fusion/fusion/tests/output", | ||
"testedExecutablePaths": { | ||
"fusion": "/__w/fusion/fusion/bin/fuse" | ||
}, | ||
"runtimes": { | ||
"fusion": "/__w/fusion/fusion/bin/libfusert.so" | ||
}, | ||
"toolchains": { | ||
"fusion": [ | ||
{ | ||
"stepName": "fuse", | ||
"executablePath": "$EXE", | ||
"arguments": [ | ||
"$INPUT", | ||
"--emit-llvm", | ||
"$OUTPUT" | ||
], | ||
"output": "fuse.ll", | ||
"allowError": true | ||
}, | ||
{ | ||
"stepName": "lli", | ||
"executablePath": "/root/llvm-project/build/bin/lli", | ||
"arguments": [ | ||
"$INPUT" | ||
], | ||
"output": "-", | ||
"usesRuntime": true, | ||
"usesInStr": false, | ||
"allowError": true | ||
} | ||
] | ||
} | ||
} |