From 263d993571dee9f5bd08bc762a43f3b7aec4851c Mon Sep 17 00:00:00 2001 From: Kazutomo Yoshii Date: Fri, 3 Nov 2023 16:02:43 -0500 Subject: [PATCH 1/2] github action for build and test --- .github/workflows/test.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..c35a4869 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,58 @@ +name: Build and Test + +on: + push: + branches: + - master + +jobs: + codes: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + - name: Install Prerequisites + run: | + sudo apt-get update -y + sudo apt-get install cmake -y + - name: Cache ROSS + id: cache-ross + uses: actions/cache@v3 + env: + cache-name: cache-ross + with: + path: | + ~/ross + key: v8.0.0 + - if: ${{ steps.cache-ross.outputs.cache-hit != 'true' }} + name: Build ROSS + run: | + cd ~ + git clone http://github.com/ross-org/ROSS.git + cd ROSS + mkdir build + cd build + mkdir -p ~/install/ross + ARCH=x86_64 CC=mpicc CXX=mpicxx cmake -DCMAKE_INSTALL_PREFIX=~/install/ross ../ + make -j8 + make install + - name: Build CODES + run: | + cd ~ + git clone https://github.com/codes-org/codes.git + cd codes + sh prepare.sh + mkdir build + cd build + mkdir -p ~/install/codes + ../configure --prefix=$HOME/install/codes CC=mpicc CXX=mpicxx PKG_CONFIG_PATH=~/install/ross/lib/pkgconfig + make -j8 + - name: Check CODES + run: | + cd ~/codes/build + make tests + make check | tee checklog.txt + test `sed -n '/^# FAIL:/ s/.*[^0-9]\([0-9]\+\)$/\1/p' checklog.txt` == "0" From 4bf4c3d1eece3835791b4682f804756c4fba87d0 Mon Sep 17 00:00:00 2001 From: Kazutomo Yoshii Date: Mon, 27 Nov 2023 15:52:44 -0600 Subject: [PATCH 2/2] on: pull_request --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c35a4869..cb415da6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,9 @@ on: push: branches: - master + pull_request: + branches: + - master jobs: codes: