Merge pull request #46 from danclaudino/honeywell_renaming #101
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
name: "Linux CI" | |
on: | |
push: | |
branches: [ master, xacc-devel ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
# once every weekend | |
- cron: '0 3 * * 6' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Linux CI" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Declares the repository safe and not under dubious ownership. | |
- name: Add repository to git safe directories | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Create Build Environment | |
run: cmake -E make_directory build | |
- name: Install dependencies | |
run: sudo apt-get -y update && sudo apt-get install -y --no-install-recommends ninja-build libssl-dev libcurl4-openssl-dev python3 libpython3-dev python3-pip libblas-dev liblapack-dev | |
- name: Configure | |
working-directory: build/ | |
run: cmake -GNinja $GITHUB_WORKSPACE -DXACC_BUILD_TESTS=TRUE -DXACC_BUILD_EXAMPLES=TRUE | |
- name: Build | |
working-directory: build/ | |
run: cmake --build . --target install | |
- name: Test | |
working-directory: build/ | |
run: ctest --output-on-failure | |
check-compilers: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- "gcc:7" | |
- "gcc:8" | |
- "gcc:9" | |
- "gcc:10" | |
- "gcc:11" | |
- "gcc:12" | |
build_type: [Debug, Release] | |
runs-on: ubuntu-latest | |
container: | |
image: ${{matrix.image}} | |
steps: | |
- uses: actions/checkout@v3 | |
# Declares the repository safe and not under dubious ownership. | |
- name: Add repository to git safe directories | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Install dependencies | |
run: apt -y update && apt install -y --no-install-recommends ninja-build libssl-dev libcurl4-openssl-dev python3 libpython3-dev python3-pip cmake libblas-dev liblapack-dev | |
- name: Install cmake | |
run: wget -nv -O "cmake.sh" "https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-linux-x86_64.sh" && bash "cmake.sh" --skip-license --prefix=/usr/local --exclude-subdir | |
- name: Create Build Environment | |
run: cmake -E make_directory build | |
- name: Configure | |
working-directory: build/ | |
run: cmake -GNinja $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DXACC_BUILD_TESTS=TRUE -DXACC_BUILD_EXAMPLES=TRUE | |
- name: Build | |
working-directory: build/ | |
run: cmake --build . --target install | |
check-distros: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
# RHEL | |
- "almalinux:9" | |
build_type: [Release] | |
runs-on: ubuntu-latest | |
container: | |
image: ${{matrix.image}} | |
steps: | |
- name: Install dependencies | |
run: | | |
dnf -y update && dnf install -y yum-utils && dnf config-manager --set-enabled crb && dnf install -y epel-release | |
yum groupinstall -y 'Development Tools' | |
yum install -y libcurl-devel.x86_64 openssl-devel.x86_64 cmake.x86_64 python3-devel.x86_64 lapack-devel.x86_64 libunwind-devel.x86_64 ninja-build.x86_64 | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
# Declares the repository safe and not under dubious ownership. | |
- name: Add repository to git safe directories | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Create Build Environment | |
run: cmake -E make_directory build | |
- name: Configure | |
working-directory: build/ | |
run: cmake -GNinja $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DXACC_BUILD_TESTS=TRUE -DXACC_BUILD_EXAMPLES=TRUE | |
- name: Build | |
working-directory: build/ | |
run: cmake --build . --target install | |
- name: Test | |
working-directory: build/ | |
run: ctest --output-on-failure |