Skip to content

Commit bdab193

Browse files
Create main.yml
1 parent 3799868 commit bdab193

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

.github/workflows/main.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: OSP CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-20.04
12+
13+
steps:
14+
- name: Checkout source
15+
uses: actions/checkout@v4
16+
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y --no-install-recommends \
21+
make gcc g++ git libboost-all-dev \
22+
doxygen graphviz python3-pip libeigen3-dev
23+
pip3 install --upgrade pip
24+
pip3 install cmake==3.21.3
25+
26+
- name: Configure (CMake)
27+
run: cmake -S . -B build
28+
29+
- name: Build
30+
run: cmake --build build -j$(nproc)
31+
32+
test:
33+
runs-on: ubuntu-20.04
34+
needs: build
35+
36+
steps:
37+
- name: Checkout source
38+
uses: actions/checkout@v4
39+
40+
- name: Install dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y --no-install-recommends \
44+
make gcc g++ git libboost-all-dev \
45+
doxygen graphviz python3-pip libeigen3-dev
46+
pip3 install --upgrade pip
47+
pip3 install cmake==3.21.3
48+
49+
- name: Configure (CMake)
50+
run: cmake -S . -B build -DBUILD_TESTS=ON
51+
52+
- name: Build tests
53+
run: cmake --build build --target build_tests -j$(nproc)
54+
55+
- name: Run tests
56+
run: cd build && ctest --output-on-failure --output-junit test_results.xml
57+
continue-on-error: true
58+
59+
- name: Upload test results
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: test-results
63+
path: build/test_results.xml
64+
65+
test_simple_greedy_small_dag:
66+
runs-on: ubuntu-20.04
67+
needs: build
68+
69+
steps:
70+
- name: Checkout source
71+
uses: actions/checkout@v4
72+
73+
- name: Install dependencies
74+
run: |
75+
sudo apt-get update
76+
sudo apt-get install -y --no-install-recommends \
77+
make gcc g++ git libboost-all-dev \
78+
libeigen3-dev python3-pip
79+
pip3 install cmake==3.21.3
80+
81+
- name: Configure (CMake)
82+
run: cmake -S . -B build
83+
84+
- name: Build executables
85+
run: cmake --build build --target OneStopParallel OneStopParallel_Partition -j$(nproc)
86+
87+
- name: Run simple DAG test
88+
run: |
89+
cd build
90+
./apps/osp \
91+
--inputDag ../data/spaa/tiny/instance_bicgstab.hdag \
92+
--inputMachine ../data/machine_params/p3.arch \
93+
--Serial --GreedyBsp --BspLocking --GrowLocal --Variance --Cilk --Etf --GreedyChildren \
94+
--MultiHC --SarkarLockingHC --GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking
95+
96+
docs:
97+
runs-on: ubuntu-20.04
98+
needs: build
99+
if: github.ref == 'refs/heads/master'
100+
101+
steps:
102+
- name: Checkout source
103+
uses: actions/checkout@v4
104+
105+
- name: Install dependencies
106+
run: |
107+
sudo apt-get update
108+
sudo apt-get install -y --no-install-recommends \
109+
doxygen graphviz libeigen3-dev cmake g++
110+
111+
- name: Build docs
112+
run: |
113+
cmake -S . -B build
114+
cmake --build build --target doc
115+
mkdir -p public
116+
cp -r doc/html/* public
117+
118+
- name: Upload docs artifact
119+
uses: actions/upload-pages-artifact@v3
120+
with:
121+
path: public
122+
123+
deploy:
124+
runs-on: ubuntu-20.04
125+
needs: docs
126+
if: github.ref == 'refs/heads/master'
127+
128+
permissions:
129+
pages: write
130+
id-token: write
131+
132+
environment:
133+
name: github-pages
134+
url: ${{ steps.deployment.outputs.page_url }}
135+
136+
steps:
137+
- name: Deploy to GitHub Pages
138+
id: deployment
139+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)