mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-11-03 20:54:07 +01:00
115 lines
2.6 KiB
YAML
115 lines
2.6 KiB
YAML
name: TREXIO CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
# After vMajor.Minor.Patch _anything_ is allowed (without "/") !
|
|
- v[0-9]+.[0-9]+.[0-9]+*
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
|
|
jobs:
|
|
|
|
get_commit_message:
|
|
name: Get commit message
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
message: ${{ steps.commit_message.outputs.message }}
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v2
|
|
# Gets the correct commit message for pull request
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Get commit message
|
|
id: commit_message
|
|
run: |
|
|
set -xe
|
|
COMMIT_MSG=$(git log --no-merges -1 --oneline)
|
|
echo "::set-output name=message::$COMMIT_MSG"
|
|
|
|
|
|
trexio_ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
|
name: x86 Ubuntu latest
|
|
needs: get_commit_message
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo add-apt-repository ppa:kelleyk/emacs
|
|
sudo apt-get install libhdf5-dev emacs26
|
|
|
|
- name: configure with autotools
|
|
run: |
|
|
./autogen.sh
|
|
./configure --enable-silent-rules
|
|
|
|
- name: compile TREXIO
|
|
run: make -j 2
|
|
|
|
- name: check TREXIO
|
|
run: make check
|
|
|
|
- name: create virtual environment
|
|
run: |
|
|
python3 -m venv --clear pytrexio-venv
|
|
source pytrexio-venv/bin/activate
|
|
|
|
- name: install Python API
|
|
run: make python-install
|
|
|
|
- name: check Python API
|
|
run: make python-test
|
|
|
|
- name: build and move Python API distribution
|
|
run: |
|
|
make python-sdist
|
|
cp python/dist/trexio-*.tar.gz .
|
|
|
|
- name: publish Python API distribution as an artifact
|
|
if: >-
|
|
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
|
|
github.event_name == 'release'
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pytrexio-source
|
|
path: ./trexio-*.tar.gz
|
|
|
|
- name: clean
|
|
run: make clean
|
|
|
|
trexio_macos:
|
|
|
|
runs-on: macos-latest
|
|
name: x86 MacOS latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
brew install emacs
|
|
brew install hdf5
|
|
brew install automake
|
|
|
|
- name: configure with autotools
|
|
run: |
|
|
./autogen.sh
|
|
./configure FC=gfortran-10 --enable-silent-rules
|
|
|
|
- name: compile TREXIO
|
|
run: make -j 2
|
|
|
|
- name: check TREXIO
|
|
run: make check
|
|
|
|
- name: clean
|
|
run: make clean
|