Refactor and add CI #3
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build_lib: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Eigen | |
run: sudo apt-get install libeigen3-dev | |
- name: Build library | |
run: make libcevicp.a OPT=RELEASE | |
- name: Upload library | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libcevicp.a | |
path: libcevicp.a | |
test: | |
runs-on: ubuntu-22.04 | |
needs: build_lib | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download library | |
uses: actions/download-artifact@v4 | |
with: | |
name: libcevicp.a | |
- name: Install Eigen | |
run: sudo apt-get install libeigen3-dev | |
- name: Install simple-test | |
run: | | |
git clone https://github.com/cornellev/simple-test | |
cd simple-test | |
make install | |
- name: Run tests | |
run: make test OPT=RELEASE | |
bench: | |
runs-on: ubuntu-22.04 | |
needs: build_lib | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download library | |
uses: actions/download-artifact@v4 | |
with: | |
name: libcevicp.a | |
- name: Install Eigen | |
run: sudo apt-get install libeigen3-dev | |
- name: Install SDL2 | |
run: sudo apt-get install libsdl2-dev | |
- name: Install sdl-wrapper | |
run: | | |
git clone https://github.com/cornellev/sdl-wrapper.git | |
cd sdl-wrapper | |
make install | |
- name: Run benchmarks | |
run: make bench OPT=RELEASE |