From cc165583b894b8c3cb7f1bf0c59ed076933e6841 Mon Sep 17 00:00:00 2001 From: Jianxin Xiong Date: Tue, 14 Nov 2023 15:04:26 -0800 Subject: [PATCH] [v1.15.x] github/actions: Synchronize with main Actions are failing on the branch due to out-of-date settings. Signed-off-by: Jianxin Xiong --- .github/workflows/coverity.yml | 12 +++--- .github/workflows/gh-man.sh | 21 ++++++----- .github/workflows/gh-man.yaml | 3 +- .github/workflows/nroff-elves.sh | 25 ++++++++----- .github/workflows/nroff-elves.yaml | 5 ++- .github/workflows/pr-ci.yml | 60 ++++++++++++++++-------------- .github/workflows/stale.yml | 2 +- 7 files changed, 72 insertions(+), 56 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index c891ef39f18..f758432941a 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -9,7 +9,6 @@ env: abi-dumper build-essential debhelper - dh-systemd fakeroot gcc git @@ -21,7 +20,7 @@ env: ninja-build pandoc pkg-config - python + python-is-python3 rpm sparse valgrind @@ -37,17 +36,18 @@ env: --enable-udp --enable-usnic --enable-verbs=rdma-core/build + --enable-sm2 RDMA_CORE_PATH: 'rdma-core/build' RDMA_CORE_VERSION: v34.1 jobs: coverity: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Install dependencies (Linux) run: | sudo apt-get update sudo apt-get install -y ${{ env.APT_PACKAGES }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Download Coverity tools run: | wget https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=ofiwg%2Flibfabric" -O coverity_tool.tgz @@ -78,13 +78,13 @@ jobs: tar czvf libfabric.tgz cov-int curl \ --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ - --form email=oss@rajachan.com \ + --form email=ofiwg@lists.openfabrics.org \ --form file=@libfabric.tgz \ --form version="main" \ --form description="`$PWD/install/bin/fi_info -l`" \ https://scan.coverity.com/builds?project=ofiwg%2Flibfabric - name: Upload build logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: coverity-build-log.txt path: cov-int/build-log.txt diff --git a/.github/workflows/gh-man.sh b/.github/workflows/gh-man.sh index 8767f9c80bd..07b97cc1559 100755 --- a/.github/workflows/gh-man.sh +++ b/.github/workflows/gh-man.sh @@ -54,7 +54,7 @@ fi # Yes, we committed something. Push the branch and make a PR. # Extract the PR number. git push --set-upstream origin $branch_name -url=`hub pull-request -b gh-pages -m 'Update GH man pages'` +url=`gh pr create --base gh-pages --title 'Update GH man pages' --body ''` pr_num=`echo $url | cut -d/ -f7` # Wait for the required "DCO" CI to complete @@ -67,9 +67,9 @@ echo "Waiting up to $max_seconds seconds for DCO CI to complete..." while test $i -lt $i_max; do date set +e - status=`hub ci-status --format "%t %S%n" | egrep '^DCO' | awk '{ print $2 }'` + status=`gh pr checks | egrep '^DCO' | awk '{ print $2 }'` set -e - if test "$status" = "success"; then + if test "$status" = "pass"; then echo "DCO CI is complete!" break fi @@ -79,12 +79,15 @@ done status=0 if test $i -lt $i_max; then - # Sadly, there is no "hub" command to merge a PR. So do it by - # hand. - curl \ - -XPUT \ - -H "Authorization: token $GITHUB_TOKEN" \ - https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$pr_num/merge + # rebase the commit onto the base branch + gh pr merge $pr_num -r + + # command to do it by hand when "hub" was used which didn't have command + # to merge a PR. keep it here for reference. + #curl \ + # -XPUT \ + # -H "Authorization: token $GITHUB_TOKEN" \ + # https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$pr_num/merge else echo "Sad panda; DCO CI didn't complete -- did not merge $url" status=1 diff --git a/.github/workflows/gh-man.yaml b/.github/workflows/gh-man.yaml index cb2784fda86..b84a2bee9d6 100644 --- a/.github/workflows/gh-man.yaml +++ b/.github/workflows/gh-man.yaml @@ -6,6 +6,7 @@ on: - main paths: - 'man/*.md' + - 'fabtests/man/*.md' workflow_dispatch: jobs: @@ -21,7 +22,7 @@ jobs: echo "$GITHUB_DATA" - name: Check out the git repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Update the man pages in branch gh-pages run: .github/workflows/gh-man.sh diff --git a/.github/workflows/nroff-elves.sh b/.github/workflows/nroff-elves.sh index 98314b7e7f1..f3ecbb4a5b4 100755 --- a/.github/workflows/nroff-elves.sh +++ b/.github/workflows/nroff-elves.sh @@ -44,6 +44,10 @@ for file in `ls man/*.md`; do perl config/md2nroff.pl --source=$file done +for file in `ls fabtests/man/*.md`; do + perl config/md2nroff.pl --source=$file +done + git config --global user.name "OFIWG Bot" git config --global user.email "ofiwg@lists.openfabrics.org" @@ -63,7 +67,7 @@ fi # Yes, we committed something. Push the branch and make a PR. # Extract the PR number. git push --set-upstream origin $branch_name -url=`hub pull-request -b $BASE_REF -m 'Update nroff-generated man pages'` +url=`gh pr create --base $BASE_REF --title 'Update nroff-generated man pages' --body ''` pr_num=`echo $url | cut -d/ -f7` # Wait for the required "DCO" CI to complete @@ -76,9 +80,9 @@ echo "Waiting up to $max_seconds seconds for DCO CI to complete..." while test $i -lt $i_max; do date set +e - status=`hub ci-status --format "%t %S%n" | egrep '^DCO' | awk '{ print $2 }'` + status=`gh pr checks | egrep '^DCO' | awk '{ print $2 }'` set -e - if test "$status" = "success"; then + if test "$status" = "pass"; then echo "DCO CI is complete!" break fi @@ -88,12 +92,15 @@ done status=0 if test $i -lt $i_max; then - # Sadly, there is no "hub" command to merge a PR. So do it by - # hand. - curl \ - -XPUT \ - -H "Authorization: token $GITHUB_TOKEN" \ - https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$pr_num/merge + # rebase the commit onto the base branch + gh pr merge $pr_num -r + + # command to do it by hand when "hub" was used which didn't have command + # to merge a PR. keep it here for reference. + #curl \ + # -XPUT \ + # -H "Authorization: token $GITHUB_TOKEN" \ + # https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$pr_num/merge else echo "Sad panda; DCO CI didn't complete -- did not merge $url" status=1 diff --git a/.github/workflows/nroff-elves.yaml b/.github/workflows/nroff-elves.yaml index f45c2adad42..344150b2661 100644 --- a/.github/workflows/nroff-elves.yaml +++ b/.github/workflows/nroff-elves.yaml @@ -4,6 +4,7 @@ on: push: paths: - 'man/*.md' + - 'fabtests/man/*.md' workflow_dispatch: jobs: @@ -19,10 +20,10 @@ jobs: echo "$GITHUB_DATA" - name: Check out the git repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get the required packages - run: sudo apt install -y pandoc hub + run: sudo apt install -y pandoc - name: Build the nroff man pages run: .github/workflows/nroff-elves.sh diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 85bdc0c39a4..8172809c41b 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -6,10 +6,10 @@ env: abi-dumper build-essential debhelper - dh-systemd fakeroot gcc git + liblttng-ust-dev libnl-3-200 libnl-3-dev libnl-route-3-200 libnl-route-3-dev libnuma-dev libudev-dev @@ -18,23 +18,25 @@ env: ninja-build pandoc pkg-config - python + python-is-python3 rpm sparse valgrind wget + APT_REPOS: >- + ppa:lttng/ppa OFI_PROVIDER_FLAGS: >- - --enable-efa=rdma-core/build + --enable-efa=$PWD/rdma-core/build --enable-mrail - --enable-psm3=rdma-core/build + --enable-psm3=$PWD/rdma-core/build --enable-rxd --enable-rxm --enable-shm --enable-tcp --enable-udp --enable-usnic - --enable-verbs=rdma-core/build - RDMA_CORE_PATH: 'rdma-core/build' + --enable-verbs=$PWD/rdma-core/build + RDMA_CORE_PATH: '$PWD/rdma-core/build' RDMA_CORE_VERSION: v34.1 jobs: linux: @@ -42,8 +44,8 @@ jobs: strategy: matrix: os: - - ubuntu-18.04 - ubuntu-20.04 + - ubuntu-22.04 cc: - gcc - clang @@ -51,9 +53,10 @@ jobs: steps: - name: Install dependencies (Linux) run: | + sudo apt-add-repository ${{ env.APT_REPOS }} sudo apt-get update sudo apt-get install -y ${{ env.APT_PACKAGES }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build Check run: | set -x @@ -61,20 +64,22 @@ jobs: pushd rdma-core; bash build.sh; popd export LD_LIBRARY_PATH="${{ env.RDMA_CORE_PATH }}/lib:$LD_LIBRARY_PATH" ./autogen.sh - ./configure --prefix=$PWD/install ${{ env.OFI_PROVIDER_FLAGS }} CC=${{ matrix.cc }} + ./configure --prefix=$PWD/install ${{ env.OFI_PROVIDER_FLAGS }} CC=${{ matrix.cc }} --with-lttng make -j 2; make install + DISTCHECK_CONFIGURE_FLAGS="${{ env.OFI_PROVIDER_FLAGS }}" make -j 2 distcheck $PWD/install/bin/fi_info -l - name: Upload build logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: config.log + name: ${{ matrix.os }}-${{ matrix.cc }}-config.log path: config.log hmem: runs-on: ubuntu-20.04 steps: - name: Install dependencies (Linux) run: | + sudo apt-add-repository ${{ env.APT_REPOS }} sudo apt-get update sudo apt-get install -y ${{ env.APT_PACKAGES }} - name: Install CUDA @@ -88,17 +93,11 @@ jobs: run: | echo "Installing Ze SDK" sudo apt-get install -y gpg-agent wget - - # Temporary workaround to avoid 1.6.2 (current version in the distro) which is failing to build - wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.7.4/level-zero_1.7.4+u18.04_amd64.deb - wget -q https://github.com/oneapi-src/level-zero/releases/download/v1.7.4/level-zero-devel_1.7.4+u18.04_amd64.deb - sudo apt install ./level-zero_1.7.4+u18.04_amd64.deb ./level-zero-devel_1.7.4+u18.04_amd64.deb - - #wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo apt-key add - - #sudo apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' - #sudo apt-get update - #sudo apt-get install -y level-zero level-zero-dev - - uses: actions/checkout@v2 + wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo apt-key add - + sudo apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' + sudo apt-get update + sudo apt-get install -y level-zero level-zero-dev + - uses: actions/checkout@v4 - name: HMEM Checks run: | set -x @@ -110,33 +109,38 @@ jobs: ./autogen.sh ./configure --prefix=$PWD/install ${{ env.OFI_PROVIDER_FLAGS }} \ --with-cuda=/usr/local/cuda --with-ze \ + --with-lttng \ CC=${{ matrix.cc }} make -j 2; make install $PWD/install/bin/fi_info -l $PWD/install/bin/fi_info -c FI_HMEM - name: Upload build logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: config.log + name: hmem-config.log path: config.log macos: - runs-on: macos-10.15 + runs-on: macos-12 steps: - name: Install dependencies (Mac OS) run: | brew install automake brew install libtool - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build Check run: | ./autogen.sh ./configure --prefix=$PWD/install make -j 2; make install $PWD/install/bin/fi_info -l + cd fabtests + ./autogen.sh + ./configure --with-libfabric=$PWD/../install + make -j2 - name: Upload build logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: config.log + name: macos-12-config.log path: config.log diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index cdfbdc94560..e3a631e87ec 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -18,7 +18,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v3 + - uses: actions/stale@v8 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 360