Skip to content

Commit

Permalink
Update fortran-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gorges97 authored Feb 4, 2025
1 parent 74817cb commit a6e2288
Showing 1 changed file with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions .github/workflows/fortran-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,60 @@ on: [push, pull_request]
env:
BUILD_DIR: _build
jobs:
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: Run unit tests
run: >-
meson test -C ${{ env.BUILD_DIR }} --print-errorlogs --num-processes 1 --no-rebuild --suite xtb -t 120
env:
OMP_NUM_THREADS: 2,1
- name: Install package
run: |
meson install -C ${{ env.BUILD_DIR }} --no-rebuild
tar cJvf QCxMS2-bleed.tar.xz xtb-bleed
env:
DESTDIR: ${{ env.PWD }}/xtb-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
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: Run unit tests
run: >-
meson test -C ${{ env.BUILD_DIR }} --print-errorlogs --num-processes 1 --no-rebuild --suite xtb -t 120
env:
OMP_NUM_THREADS: 2,1
- name: Install package
run: |
meson install -C ${{ env.BUILD_DIR }} --no-rebuild
tar cJvf QCxMS2-bleed.tar.xz xtb-bleed
env:
DESTDIR: ${{ env.PWD }}/xtb-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

0 comments on commit a6e2288

Please sign in to comment.