diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..b54dccd --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,46 @@ +name: CI Build and Test + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake libtool make gcc g++ libopenmpi-dev libucx-dev libgtest-dev + + - name: Run autoreconf + run: autoreconf -i + + - name: Configure the project + run: ./configure + + - name: Build the project + run: make + + - name: Install the project + run: sudo make install + + - name: Run finchfsd + run: | + mpirun --allow-run-as-root -x LD_LIBRARY_PATH=/usr/local/lib --np 1 finchfsd & + sleep 5 + + - name: Build finchfs_test + run: g++ tests/finchfs_test.cc `pkg-config --libs finchfs` -lgtest -o finchfs_test + + - name: Run finchfs_test + run: LD_LIBRARY_PATH=/usr/local/lib ./finchfs_test +