From 17ea196ed13908dc2f07cb31b823e32edba43e50 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Thu, 17 Feb 2022 09:46:58 +0000 Subject: [PATCH 1/3] [ci] Build and cache openmpi 4.1.2 #16 --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ad81240 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v2 + + # We don't want to build openmpi each time this workflow is + # run. Setup caching of OpenMPI after it is built and installed. + # See "Caching dependencies to speed up workflows" on the GH + # actions docs. + - name: Cache OpenMPI + id: cache-openmpi + uses: actions/cache@v2 + with: + path: openmpi-4.1.2/installed + key: openmpi-4.1.2 + + - name: Build openmpi + if: steps.cache-openmpi.outputs.cache-hit != 'true' + run: | + wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.gz + tar -xf openmpi-4.1.2.tar.gz + cd openmpi-4.1.2/ && mkdir installed + ./configure --prefix=$(pwd)/installed + make all install + + # Just a way to interact with a github runner through ssh, using + # tmate. Useful for debugging in case sthg goes wrong. See + # https://github.com/marketplace/actions/debugging-with-tmate + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 From 50530afd4c60bd382c8511fd17925b13665cf94e Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Thu, 17 Feb 2022 10:07:56 +0000 Subject: [PATCH 2/3] [ci] Add a step to build x3div #16 --- .github/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad81240..d9a8dc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,7 @@ jobs: ./configure --prefix=$(pwd)/installed make all install - # Just a way to interact with a github runner through ssh, using - # tmate. Useful for debugging in case sthg goes wrong. See - # https://github.com/marketplace/actions/debugging-with-tmate - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 + - name: Build x3div + run: | + export PATH=$(pwd)/openmpi-4.1.2/installed/bin/:$PATH + make CMP=gcc From b63895b80d4f03a5de4839bf3c3bc180313625c5 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Thu, 17 Feb 2022 11:11:38 +0000 Subject: [PATCH 3/3] [ci] Add a step to run default x3div benchmark #16 --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9a8dc3..5795492 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,3 +34,9 @@ jobs: run: | export PATH=$(pwd)/openmpi-4.1.2/installed/bin/:$PATH make CMP=gcc + + - name: Run default benchmark + run: | + export PATH=$(pwd)/openmpi-4.1.2/installed/bin/:$PATH + export LD_LIBRARY_PATH=$(pwd)/openmpi-4.1.2/installed/lib:$LD_LIBRARY_PATH + mpirun -n 1 xcompact3d