Initial commit
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
name: Tarball
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
distbuild:
|
||||
runs-on: ubuntu-latest
|
||||
name: Create distribution tarball
|
||||
env:
|
||||
INSTALL_DIR: /tmp/foo1
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Python dependency installs
|
||||
run: python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DPYTHON_DEPS=${INSTALL_DIR}/python-libs ..
|
||||
- name: Release tarball
|
||||
run: |
|
||||
cd build
|
||||
make package_source
|
||||
- name: Archive tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tarball-testing
|
||||
path: build/omniperf-*.tar.gz
|
||||
retention-days: 3
|
||||
disttest:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [distbuild]
|
||||
name: Tarball tests
|
||||
env:
|
||||
INSTALL_DIR: /tmp/foo2
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
- name: Access tarball
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: tarball-testing
|
||||
- name: Expand
|
||||
run: tar xfz omniperf-*.tar.gz; rm omniperf-*.tar.gz
|
||||
- name: Python dependency installs
|
||||
run: |
|
||||
cd omniperf-*
|
||||
python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
|
||||
- name: Configure
|
||||
run: |
|
||||
cd omniperf-*
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/omniperf \
|
||||
-DPYTHON_DEPS=${INSTALL_DIR}/python-libs \
|
||||
-DMOD_INSTALL_PATH=${INSTALL_DIR}/modulefiles ..
|
||||
- name: Install
|
||||
run: |
|
||||
cd omniperf-*
|
||||
cd build
|
||||
make install
|
||||
- name: Verify expected paths
|
||||
run: |
|
||||
test -d $INSTALL_DIR/omniperf
|
||||
test -d $INSTALL_DIR/omniperf/bin
|
||||
test -x $INSTALL_DIR/omniperf/bin/omniperf
|
||||
test -d $INSTALL_DIR/modulefiles/omniperf
|
||||
- name: Query version (setting PYTHONPATH by hand)
|
||||
run: |
|
||||
export PYTHONPATH=${INSTALL_DIR}/python-libs:$PYTHONPATH
|
||||
$INSTALL_DIR/omniperf/bin/omniperf --version
|
||||
- name: Install Lmod
|
||||
run: sudo apt-get install -y lmod
|
||||
- name: Access omniperf using modulefile
|
||||
run: |
|
||||
. /etc/profile.d/lmod.sh
|
||||
module use $INSTALL_DIR/modulefiles
|
||||
module load omniperf
|
||||
module list
|
||||
omniperf --version
|
||||
|
||||
Reference in New Issue
Block a user