-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/grimme-lab/QCxMS2 into main
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
env: | ||
BUILD_DIR: _build | ||
jobs: | ||
gcc-cmake-build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
fc: [gfortran-12] | ||
cc: [gcc-12] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Install CMake | ||
run: pip install ninja cmake | ||
- name: Configure build | ||
run: cmake -B ${{ env.BUILD_DIR }} -G Ninja | ||
env: | ||
FC: ${{ matrix.fc }} | ||
CC: ${{ matrix.cc }} | ||
- name: Build project | ||
run: cmake --build ${{ env.BUILD_DIR }} | ||
intel-meson-build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
fc: [ifort] | ||
cc: [icc] | ||
env: | ||
FC: ${{ matrix.fc }} | ||
CC: ${{ matrix.cc }} | ||
APT_PACKAGES: >- | ||
intel-oneapi-compiler-fortran-2022.1.0 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0 intel-oneapi-mkl-2022.1.0 intel-oneapi-mkl-devel-2022.1.0 asciidoctor | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: pip3 install meson ninja --user | ||
- name: Add Intel repository | ||
if: contains(matrix.os, 'ubuntu') | ||
run: | | ||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | ||
sudo apt-get update | ||
- name: Install Intel oneAPI compiler | ||
if: contains(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get install ${APT_PACKAGES} | ||
source /opt/intel/oneapi/setvars.sh | ||
printenv >> $GITHUB_ENV | ||
- name: Configure meson build | ||
run: >- | ||
meson setup ${{ env.BUILD_DIR }} --prefix=/ --libdir=lib -Dfortran_link_args="-lifcoremt -static" -Ddefault_library=static -Dlapack=mkl | ||
- name: Build project | ||
run: ninja -C ${{ env.BUILD_DIR }} | ||
- name: Install package | ||
run: | | ||
meson install -C ${{ env.BUILD_DIR }} --no-rebuild | ||
tar cJvf QCxMS2-bleed.tar.xz QCxMS2-bleed | ||
env: | ||
DESTDIR: ${{ env.PWD }}/QCxMS2-bleed | ||
- name: Upload binary | ||
if: github.event_name == 'push' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: QCxMS2-bleed.tar.xz | ||
path: QCxMS2-bleed.tar.xz |