-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 2 KB
/
uploadBuiltReleases.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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