Skip to content

Workflow file for this run

# Copyright 2023 NWChemEx-Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: .github Pull Request Workflow
on:
pull_request:
branches:
- master
jobs:
Common-Pull-Request:
uses: NWChemEx/.github/.github/workflows/common_pull_request.yaml@master
with:
config_file: '.github/.licenserc.yaml'
source_dir: ''
compilers: ''
doc_target: 'sphinx'
secrets: inherit
# PluginPlayer needs pluginplay_examples, which means PluginPlays test have to
# be built. This means that CTest will run both PluginPlayer's and
# PluginPlay's tests, which is not desired. For now, I'm running this job to
# test PluginPlayer using ctest -R to limit the tests.
# TODO: Either refactor the test to not need pluginplay_examples, refactor
# PluginPlay so that pluginplay_examples can be build without the tests,
# or refactor the common workflow to allow for regex specification.
test_library:
needs: Common-Pull-Request
runs-on: ubuntu-latest
container:
image: ghcr.io/nwchemex/nwx_buildenv:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REPO_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set ownership
run: |
# Fix for git not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
- name: Install requirements
run: |
pip install -r requirements.txt
shell: bash
- name: Install xvfb
run: |
apt-get update
apt-get install -y xvfb xclip xsel libmtdev1
shell: bash
- name: Build and Test
env:
CMAIZE_GITHUB_TOKEN: ${{secrets.CMAIZE_GITHUB_TOKEN}}
run: |
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x16 &
toolchain=/toolchains/nwx_gcc-11.cmake
echo 'set(CMAIZE_GITHUB_TOKEN '${CMAIZE_GITHUB_TOKEN}')' >> $toolchain
cmake -Bbuild -H. -GNinja \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_TOOLCHAIN_FILE="${toolchain}"
cmake --build build --parallel
cd build
OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ctest -VV -R pluginplayer
shell: bash