Veripython release #16
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
name: Build and Upload Release Artifacts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
submission: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Pandoc, Texlive and Flex | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc texlive-xetex texlive-lang-chinese libfl-dev | |
- name: Set DOC_PATH and SUBMIT_FOLDER | |
run: | | |
mkdir -p final_submission | |
echo "SUBMIT_FOLDER=final_submission" >> $GITHUB_ENV | |
- name: Generate Report PDF | |
run: | | |
pandoc README.md --template=doc/template.latex -o REPORT.pdf --pdf-engine=xelatex | |
cp REPORT.pdf ${SUBMIT_FOLDER} | |
- name: Copy Source Code | |
run: | | |
mkdir -p ${SUBMIT_FOLDER}/src | |
cp $(pwd)/*.cpp ${SUBMIT_FOLDER}/src | |
cp $(pwd)/*.h ${SUBMIT_FOLDER}/src | |
cp $(pwd)/verilog.l ${SUBMIT_FOLDER}/src | |
cp $(pwd)/CMakeLists.txt ${SUBMIT_FOLDER}/src | |
- name: Build and Copy Executable | |
run: | | |
mkdir -p build | |
mkdir -p ${SUBMIT_FOLDER}/exe | |
cd build | |
wget https://github.com/llvm/circt/releases/download/firtool-1.93.1/circt-full-static-linux-x64.tar.gz | |
tar -xf circt-full-static-linux-x64.tar.gz | |
cmake .. -DCMAKE_BUILD_TYPE=release -DFIRTOOL_LIB_PATH=$(pwd)/firtool-1.93.1/lib | |
make -j | |
cd .. | |
cp build/veripython ${SUBMIT_FOLDER}/exe | |
cp tests/verilog_srcs/mux_test.v ${SUBMIT_FOLDER}/exe | |
cp tests/verilog_srcs/reg_simple_test1.v ${SUBMIT_FOLDER}/exe | |
cp tests/verilog_srcs/birthday.v ${SUBMIT_FOLDER}/exe | |
cp tests/birthday_tb.py ${SUBMIT_FOLDER}/exe | |
cp doc/run_readme.txt ${SUBMIT_FOLDER}/exe/readme.txt | |
- name: Generate Final Submission | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Alice_Bob_Charlie_David_编译小组作业 | |
path: final_submission |