Skip to content

Create CI yml file

Create CI yml file #3

Workflow file for this run

name: OSP CI
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
make gcc g++ git libboost-all-dev \
doxygen graphviz python3-pip libeigen3-dev
pip3 install --upgrade pip
pip3 install cmake==3.21.3
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j$(nproc)
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
make gcc g++ git libboost-all-dev \
doxygen graphviz python3-pip libeigen3-dev
pip3 install --upgrade pip
pip3 install cmake==3.21.3
- name: Configure (with tests)
run: cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build tests
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target build_tests -j$(nproc)
- name: Run tests
working-directory: ${{ github.workspace }}/build
run: ctest --output-on-failure --output-junit test_results.xml
continue-on-error: true
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: build/test_results.xml
test_simple_greedy_small_dag:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
make gcc g++ git libboost-all-dev libeigen3-dev python3-pip
pip3 install cmake==3.21.3
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build executables
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target OneStopParallel OneStopParallel_Partition -j$(nproc)
- name: Run simple DAG test
working-directory: ${{ github.workspace }}/build
run: |
./apps/osp \
--inputDag ../data/spaa/tiny/instance_bicgstab.hdag \
--inputMachine ../data/machine_params/p3.arch \
--Serial --GreedyBsp --BspLocking --GrowLocal --Variance --Cilk \
--Etf --GreedyChildren --MultiHC --SarkarLockingHC \
--GreedyChildrenKL --GrowLocalKL --GreedyBspHC --FunnelLocking
docs:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
doxygen graphviz libeigen3-dev cmake g++
- name: Build docs
run: |
cmake -S . -B build
cmake --build build --target doc
mkdir -p public
cp -r doc/html/* public
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: public