From 2b5505dfb130faf5219071d25eb921f600fabf8e Mon Sep 17 00:00:00 2001 From: Thien Nguyen Date: Fri, 23 Jun 2023 05:23:04 +0000 Subject: [PATCH] Add CI workflow for RHEL-like distro Signed-off-by: Thien Nguyen --- .github/workflows/ci-linux.yml | 43 +++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 42f7508eb..18b4a66de 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -78,4 +78,45 @@ jobs: - name: Build working-directory: build/ - run: cmake --build . --target install \ No newline at end of file + 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: + - 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: | + 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 + + - 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 \ No newline at end of file