From 1649333c04677c2173620ad59936eb0c33f10285 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 18 Jul 2023 22:55:29 -0400 Subject: [PATCH] common: introduce simple PR testing approach Signed-off-by: Jan Michalski --- .github/workflows/centos.yml | 45 ----------------------------------- .github/workflows/main.yml | 6 ----- .github/workflows/nightly.yml | 2 ++ .github/workflows/ubuntu.yml | 39 +++++++++++++++--------------- 4 files changed, 22 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/centos.yml diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml deleted file mode 100644 index c6720cfe139..00000000000 --- a/.github/workflows/centos.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Validate on CentoOS. -# CentOS 7 is maintain in PMDK project as it is required for DAOS. -name: CentOS - -on: - workflow_dispatch: - workflow_call: - -jobs: - linux: - name: CentOS - runs-on: ubuntu-latest - env: - GITHUB_REPO: pmem/pmdk - DOCKER_REPO: ghcr.io/pmem/pmdk - HOST_WORKDIR: /home/runner/work/pmdk/pmdk - WORKDIR: utils/docker - PMDK_CC: gcc - PMDK_CXX: g++ - MAKE_PKG: 0 - VALGRIND: 1 - SRC_CHECKERS: 0 - OS: centos - strategy: - matrix: - CONFIG: [ - "OS_VER=7 FAULT_INJECTION=1 TEST_BUILD=debug", - "OS_VER=7 TEST_BUILD=nondebug", - "OS_VER=7 TEST_BUILD=debug NDCTL_ENABLE=n", - "OS_VER=7 TEST_BUILD=nondebug NDCTL_ENABLE=n", - "OS_VER=stream TEST_BUILD=debug", - "OS_VER=stream FAULT_INJECTION=1 TEST_BUILD=debug", - "OS_VER=stream TEST_BUILD=nondebug", - ] - steps: - - name: Clone the git repo - uses: actions/checkout@v3 - with: - fetch-depth: 50 - - - name: Pull or rebuild the image - run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh - - - name: Run the build - run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build-CI.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01ecb83f76f..f7ff0310a8d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,9 +45,3 @@ jobs: needs: [src_checkers, basic_build] uses: ./.github/workflows/ubuntu.yml name: Ubuntu - - - call-centos: - needs: [src_checkers, basic_build] - uses: ./.github/workflows/centos.yml - name: CentOS diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fa499eed45d..9852afe2bb8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -43,6 +43,8 @@ jobs: "OS=rockylinux OS_VER=9 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0", "OS=fedora OS_VER=37 PMDK_CC=clang PMDK_CXX=clang++ TEST_BUILD=debug", "OS=fedora OS_VER=37 PMDK_CC=clang PMDK_CXX=clang++ TEST_BUILD=nondebug", + "OS=centos OS_VER=7 FAULT_INJECTION=1 TEST_BUILD=debug", + "OS=centos OS_VER=7 FAULT_INJECTION=1 TEST_BUILD=nondebug", ] steps: - name: Clone the git repo diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 62bb6bb74b0..c1fb676fc74 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -14,27 +14,25 @@ jobs: name: Linux runs-on: ubuntu-latest env: - # use org's Private Access Token to log in to GitHub Container Registry - DOC_UPDATE_GITHUB_TOKEN: ${{ secrets.DOC_UPDATE_GITHUB_TOKEN }} - HOST_WORKDIR: /home/runner/work/pmdk/pmdk - WORKDIR: utils/docker - PMDK_CC: gcc - PMDK_CXX: g++ - MAKE_PKG: 0 - VALGRIND: 1 - SRC_CHECKERS: 0 + HOST_WORKDIR: /home/runner/work/pmdk/pmdk + WORKDIR: utils/docker + PMDK_CC: gcc + PMDK_CXX: g++ + MAKE_PKG: 0 + SRC_CHECKERS: 0 + OS: ubuntu + OS_VER: 22.04 + FAULT_INJECTION: 1 strategy: # Introduced to stop sporadically failing Codecov uploader (COVERAGE=1) # from stopping all other builds. fail-fast: false matrix: - CONFIG: [ - "N=1 OS=ubuntu OS_VER=22.04 FAULT_INJECTION=1 TEST_BUILD=debug", - "N=2 OS=ubuntu OS_VER=22.04 FAULT_INJECTION=1 TEST_BUILD=nondebug UBSAN=1", - "N=3 OS=ubuntu OS_VER=22.04 PMDK_CC=clang PMDK_CXX=clang++ TEST_BUILD=debug", - "N=4 OS=ubuntu OS_VER=22.04 PMDK_CC=clang PMDK_CXX=clang++ TEST_BUILD=nondebug AUTO_DOC_UPDATE=1", - "N=5 OS=ubuntu OS_VER=22.04 COVERAGE=1 FAULT_INJECTION=1 TEST_BUILD=debug", - ] + include: + - TEST_BUILD: debug + COVERAGE: 1 + - TEST_BUILD: nondebug + COVERAGE: 0 steps: - name: Clone the git repo uses: actions/checkout@v3 @@ -44,8 +42,11 @@ jobs: - name: Get system information run: ./$WORKDIR/get-system-info.sh - - name: Pull or rebuild the image - run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh + - name: Pull the image + run: cd $WORKDIR && ./pull-or-rebuild-image.sh - name: Run the build - run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build-CI.sh + env: + TEST_BUILD: ${{ matrix.TEST_BUILD }} + COVERAGE: ${{ matrix.COVERAGE }} + run: cd $WORKDIR && ./build-CI.sh