Merge pull request #13 from qiskit-community/omp-note #59
This file contains hidden or 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
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
tests: | |
name: latest version tests (C++${{ matrix.cxx_standard }}, ${{ matrix.os }}, ${{ matrix.compiler }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Linux x86_64 | |
- os: ubuntu-22.04 | |
compiler: g++ | |
cxx_standard: 17 | |
- os: ubuntu-22.04 | |
compiler: clang++ | |
- os: ubuntu-latest | |
compiler: g++ | |
- os: ubuntu-latest | |
compiler: g++ | |
cxx_standard: 20 | |
- os: ubuntu-latest | |
compiler: g++ | |
cxx_standard: 23 | |
- os: ubuntu-latest | |
compiler: clang++ | |
- os: ubuntu-latest | |
compiler: clang++ | |
cxx_standard: 20 | |
- os: ubuntu-latest | |
compiler: clang++ | |
cxx_standard: 23 | |
# Linux ARM | |
- os: ubuntu-22.04-arm | |
compiler: g++ | |
- os: ubuntu-22.04-arm | |
compiler: clang++ | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
submodules: true | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y g++ clang cmake ninja-build \ | |
libopenblas-dev liblapack-dev libeigen3-dev \ | |
libopenmpi-dev openmpi-bin libomp-dev | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install eigen open-mpi libomp | |
- name: Clone submodules | |
run: git submodule update --init --recursive | |
- name: Build qiskit | |
run: | | |
cd deps/qiskit | |
make c | |
- name: Build qrmi | |
run: | | |
cd deps/qrmi | |
cargo build --release | |
- name: Configure CMake (Linux) | |
if: runner.os == 'Linux' | |
run: >- | |
cmake -S . -B build | |
-G Ninja | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | |
${{ matrix.compiler && format('-DCMAKE_CXX_COMPILER={0}', matrix.compiler) }} | |
${{ matrix.cxx_standard && format('-DCMAKE_CXX_STANDARD={0}', matrix.cxx_standard) }} | |
-DCMAKE_CXX_FLAGS="-DUSE_RANDOM_SHOTS=1" | |
- name: CMake Build | |
run: >- | |
cmake --build build -j4 | |
--config Release | |
- name: Run tests | |
run: | | |
cd build | |
./c-api-demo \ | |
--fcidump ../data/fcidump_Fe4S4_MO.txt \ | |
--tolerance 1.0e-3 \ | |
--max_time 600 \ | |
--recovery 1 \ | |
--number_of_samples 300 \ | |
--num_shots 1000 |