From 254f6806cb29b1c2300807567c11ee1257572fac Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sat, 11 Nov 2023 14:04:51 +0400 Subject: [PATCH] Cleanup CI --- .github/workflows/assign_project.yml | 5 +++-- ..._columns.yml => assign_project_columns.yml} | 6 ++++-- .github/workflows/build.yml | 18 +++--------------- .github/workflows/detect_conflicts.yml | 18 ++++++++++-------- .../{remove_labels.yml => pr_closed.yml} | 8 ++++---- .../workflows/{lint_pr.yml => pr_opened.yml} | 8 +++----- .github/workflows/pr_ready.yml | 15 +++++++++++++++ .github/workflows/pr_wip.yml | 16 ++++++++++++++++ .github/workflows/release.yml | 1 - .github/workflows/triggers.yml | 3 +-- .../development/continuous_integration.rst | 3 +-- scripts/ci_checks/linux-x86_64/centos.sh | 10 ---------- 12 files changed, 60 insertions(+), 51 deletions(-) rename .github/workflows/{set_dashboard_columns.yml => assign_project_columns.yml} (79%) rename .github/workflows/{remove_labels.yml => pr_closed.yml} (60%) rename .github/workflows/{lint_pr.yml => pr_opened.yml} (92%) create mode 100644 .github/workflows/pr_ready.yml create mode 100644 .github/workflows/pr_wip.yml delete mode 100755 scripts/ci_checks/linux-x86_64/centos.sh diff --git a/.github/workflows/assign_project.yml b/.github/workflows/assign_project.yml index dbcde68e8..3067eadb2 100644 --- a/.github/workflows/assign_project.yml +++ b/.github/workflows/assign_project.yml @@ -1,4 +1,4 @@ -name: "assign project" +name: "assign_project" on: issues: @@ -6,10 +6,11 @@ on: - opened jobs: - assign-project: + main: runs-on: ubuntu-latest steps: - uses: alex-page/github-project-automation-plus@v0.8.1 + continue-on-error: true with: repo-token: "${{ secrets.REPO_MANAGEMENT }}" project: "kanban board" diff --git a/.github/workflows/set_dashboard_columns.yml b/.github/workflows/assign_project_columns.yml similarity index 79% rename from .github/workflows/set_dashboard_columns.yml rename to .github/workflows/assign_project_columns.yml index 510f4276d..6112d2f01 100644 --- a/.github/workflows/set_dashboard_columns.yml +++ b/.github/workflows/assign_project_columns.yml @@ -1,14 +1,16 @@ -name: "set dashboard columns" +name: "assign_project_columns" on: issues: - types: [labeled] + types: + - labeled jobs: main: runs-on: ubuntu-latest steps: - uses: konradpabjan/move-labeled-or-milestoned-issue@v2.0 + continue-on-error: true with: action-token: "${{ secrets.REPO_MANAGEMENT }}" project-url: "https://github.com/roc-streaming/roc-toolkit/projects/2" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe0ebada0..11662bd11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,20 +2,8 @@ name: "build" on: push: - branches: - - master - - develop - - feature/* - tags: - - v* - pull_request: - branches: - - master - - develop - workflow_dispatch: - schedule: - cron: '0 0 * * 1' @@ -124,13 +112,13 @@ jobs: matrix: include: - script: linux-checks/conditional-build - image: rocstreaming/env-ubuntu-minimal + image: rocstreaming/env-ubuntu:nolibs - script: linux-checks/static-shared - image: rocstreaming/env-ubuntu-minimal + image: rocstreaming/env-ubuntu:nolibs - script: linux-checks/debug-build - image: rocstreaming/env-ubuntu-minimal + image: rocstreaming/env-ubuntu:nolibs - script: linux-checks/sanitizers image: rocstreaming/env-ubuntu diff --git a/.github/workflows/detect_conflicts.yml b/.github/workflows/detect_conflicts.yml index 25e119828..6fc3a4f6d 100644 --- a/.github/workflows/detect_conflicts.yml +++ b/.github/workflows/detect_conflicts.yml @@ -1,4 +1,4 @@ -name: "detect conflicts" +name: "detect_conflicts" on: push: @@ -6,15 +6,17 @@ on: - "*" tags: - "!*" - pull_request: - types: synchronize + pull_request_target: + types: + - synchronize jobs: main: runs-on: ubuntu-latest steps: - - name: Run the action to detect unmergeable PRs - uses: cats-oss/github-action-detect-unmergeable@v2.1.1 - env: - LABEL_NEED_REBASE: "needs rebase" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - uses: eps1lon/actions-label-merge-conflict@v2.1.0 + with: + dirtyLabel: "needs rebase" + repoToken: "${{ secrets.GITHUB_TOKEN }}" + commentOnDirty: ":robot: The latest upstream change made this pull request unmergeable. + Please resolve the merge conflicts." diff --git a/.github/workflows/remove_labels.yml b/.github/workflows/pr_closed.yml similarity index 60% rename from .github/workflows/remove_labels.yml rename to .github/workflows/pr_closed.yml index ceffa1bc0..8fd4b739f 100644 --- a/.github/workflows/remove_labels.yml +++ b/.github/workflows/pr_closed.yml @@ -1,4 +1,4 @@ -name: "remove labels" +name: "pr_closed" on: pull_request: @@ -6,9 +6,9 @@ on: - closed jobs: - remove-labels: + main: runs-on: ubuntu-latest steps: - - uses: andymckay/labeler@master + - uses: andymckay/labeler@1.0.4 with: - remove-labels: 'work in progress,ready for review,review in progress,needs revision' + remove-labels: 'work in progress,ready for review,review in progress,needs revision,needs rebase' diff --git a/.github/workflows/lint_pr.yml b/.github/workflows/pr_opened.yml similarity index 92% rename from .github/workflows/lint_pr.yml rename to .github/workflows/pr_opened.yml index 050f53be2..d3dbe4d30 100644 --- a/.github/workflows/lint_pr.yml +++ b/.github/workflows/pr_opened.yml @@ -1,4 +1,4 @@ -name: "lint pr" +name: "pr_opened" on: pull_request_target: @@ -6,11 +6,9 @@ on: - opened jobs: - - lint: + main: runs-on: ubuntu-latest steps: - - name: Check linked issue id: linked-issues uses: nearform-actions/github-action-check-linked-issues@v1.4.28 @@ -43,7 +41,7 @@ jobs: steps.mentioned-issues.outputs.result == 'false' uses: thollander/actions-comment-pull-request@v2 with: - message: "Upon creation, pull request description does not have a link to an issue. + message: ":robot: Upon creation, pull request description does not have a link to an issue. If there is a related issue, please add it to the description using any of the [supported formats](https://docs.github.com/en/get-started/\ writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls)." diff --git a/.github/workflows/pr_ready.yml b/.github/workflows/pr_ready.yml new file mode 100644 index 000000000..b27ca1a76 --- /dev/null +++ b/.github/workflows/pr_ready.yml @@ -0,0 +1,15 @@ +name: "pr_ready" + +on: + pull_request_target: + types: + - review_requested + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: andymckay/labeler@1.0.4 + with: + add-labels: 'ready for review' + remove-labels: 'work in progress,needs revision' diff --git a/.github/workflows/pr_wip.yml b/.github/workflows/pr_wip.yml new file mode 100644 index 000000000..50a00946d --- /dev/null +++ b/.github/workflows/pr_wip.yml @@ -0,0 +1,16 @@ +name: "pr_wip" + +on: + pull_request_target: + types: + - converted_to_draft + - review_request_removed + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: andymckay/labeler@1.0.4 + with: + add-labels: 'work in progress' + remove-labels: 'ready for review,needs revision' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf39a2cef..960bb71fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: push: tags: - v* - workflow_dispatch: jobs: diff --git a/.github/workflows/triggers.yml b/.github/workflows/triggers.yml index 16ef5b5ff..0ece5fe5c 100644 --- a/.github/workflows/triggers.yml +++ b/.github/workflows/triggers.yml @@ -6,8 +6,7 @@ on: - master jobs: - - triggers: + main: if: | github.repository_owner == 'roc-streaming' diff --git a/docs/sphinx/development/continuous_integration.rst b/docs/sphinx/development/continuous_integration.rst index 0cbab9193..41ce8ff6d 100644 --- a/docs/sphinx/development/continuous_integration.rst +++ b/docs/sphinx/development/continuous_integration.rst @@ -36,10 +36,9 @@ rocstreaming/env-ubuntu:20.04 ubuntu:20.04 x86_64 gcc-8, g rocstreaming/env-ubuntu:18.04 ubuntu:18.04 x86_64 gcc-6, clang-6 rocstreaming/env-ubuntu:16.04 ubuntu:16.04 x86_64 gcc-4.8, clang-3.7 rocstreaming/env-ubuntu:14.04 ubuntu:14.04 x86_64 gcc-4.4, clang-3.4 -rocstreaming/env-ubuntu-minimal ubuntu:latest x86_64 distro default +rocstreaming/env-ubuntu:nolibs ubuntu:latest x86_64 distro default rocstreaming/env-debian debian:stable x86_64 distro default rocstreaming/env-fedora fedora:latest x86_64 distro default -rocstreaming/env-centos centos:latest x86_64 distro default rocstreaming/env-opensuse opensuse/leap:latest x86_64 distro default rocstreaming/env-archlinux archlinux/base:latest x86_64 distro default rocstreaming/env-alpine alpine:latest x86_64 distro default diff --git a/scripts/ci_checks/linux-x86_64/centos.sh b/scripts/ci_checks/linux-x86_64/centos.sh deleted file mode 100755 index afe461c86..000000000 --- a/scripts/ci_checks/linux-x86_64/centos.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -scons -Q \ - --enable-werror \ - --enable-tests \ - --enable-examples \ - --build-3rdparty=libuv,libatomic_ops,openfec,cpputest \ - test