2021-06-07 14:05:41 +02:00
|
|
|
name: TREXIO CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-03-07 14:34:23 +01:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
# After vMajor.Minor.Patch _anything_ is allowed (without "/") !
|
|
|
|
- v[0-9]+.[0-9]+.[0-9]+*
|
2021-06-07 14:05:41 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2022-03-07 14:34:23 +01:00
|
|
|
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
jobs:
|
2022-01-07 11:03:00 +01:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
trexio_ubuntu:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: x86 Ubuntu latest
|
2022-01-07 18:47:23 +01:00
|
|
|
needs: get_commit_message
|
2021-06-07 14:05:41 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-07 11:03:00 +01:00
|
|
|
|
|
|
|
- name: install dependencies
|
2021-06-07 14:05:41 +02:00
|
|
|
run: |
|
|
|
|
sudo add-apt-repository ppa:kelleyk/emacs
|
|
|
|
sudo apt-get install libhdf5-dev emacs26
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: configure with autotools
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
2021-11-01 10:20:03 +01:00
|
|
|
./configure --enable-silent-rules
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: compile TREXIO
|
2022-07-08 11:26:17 +02:00
|
|
|
run: make -j2
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: check TREXIO
|
2022-07-08 11:26:17 +02:00
|
|
|
run: make -j2 check
|
2021-09-14 10:17:20 +02:00
|
|
|
|
|
|
|
- name: create virtual environment
|
2022-01-07 11:03:00 +01:00
|
|
|
run: |
|
2021-09-14 10:17:20 +02:00
|
|
|
python3 -m venv --clear pytrexio-venv
|
|
|
|
source pytrexio-venv/bin/activate
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-09-14 10:17:20 +02:00
|
|
|
- name: install Python API
|
|
|
|
run: make python-install
|
|
|
|
|
|
|
|
- name: check Python API
|
|
|
|
run: make python-test
|
|
|
|
|
2022-01-07 18:47:23 +01:00
|
|
|
- name: build and move Python API distribution
|
|
|
|
run: |
|
|
|
|
make python-sdist
|
|
|
|
cp python/dist/trexio-*.tar.gz .
|
2022-01-07 11:03:00 +01:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2022-07-08 11:26:17 +02:00
|
|
|
- name: maintainer clean
|
|
|
|
run: make maintainer-clean
|
|
|
|
|
|
|
|
- name: reconfigure with clang and AddressSanitizer
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
|
|
|
./configure CC=clang-11 CFLAGS="-O2 -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" --enable-silent-rules
|
|
|
|
|
|
|
|
- name: recompile TREXIO
|
|
|
|
run: make -j2
|
|
|
|
|
|
|
|
- name: recheck TREXIO for memory leaks
|
|
|
|
run: make -j2 check
|
|
|
|
|
|
|
|
- name: maintainer clean
|
|
|
|
run: make maintainer-clean
|
2021-06-07 14:05:41 +02:00
|
|
|
|
|
|
|
trexio_macos:
|
|
|
|
|
|
|
|
runs-on: macos-latest
|
|
|
|
name: x86 MacOS latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: install dependencies
|
|
|
|
run: |
|
|
|
|
brew install emacs
|
|
|
|
brew install hdf5
|
|
|
|
brew install automake
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: configure with autotools
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
2021-11-01 10:20:03 +01:00
|
|
|
./configure FC=gfortran-10 --enable-silent-rules
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: compile TREXIO
|
|
|
|
run: make -j 2
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: check TREXIO
|
|
|
|
run: make check
|
2022-01-07 11:03:00 +01:00
|
|
|
|
2021-06-07 14:05:41 +02:00
|
|
|
- name: clean
|
|
|
|
run: make clean
|