diff --git a/.github/on-pr-merged-main.yml b/.github/on-pr-merged-main.yml deleted file mode 100644 index da944f2fb..000000000 --- a/.github/on-pr-merged-main.yml +++ /dev/null @@ -1,23 +0,0 @@ -# name: PR merged to main -# on: -# pull_request_target: -# types: -# - closed -# branches: -# - main - -# permissions: -# contents: write # so it can comment -# pull-requests: write # so it can create pull requests - -# jobs: -# backport: -# if: > -# github.event.pull_request.merged -# && github.event.action == 'closed' -# && contains(github.event.pull_request.labels.*.name, 'backport-to-dev') -# uses: ./.github/workflows/merge.yml -# with: -# target_branch: test2 -# pr_number: ${{github.event.pull_request.number}} -# commit_sha: ${{github.event.pull_request.merge_commit_sha}} diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 02a622f64..a3f642323 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -2,6 +2,9 @@ name: build and test on: workflow_call: inputs: + name: + type: string + default: "build and test" arch: type: string default: "64" @@ -57,6 +60,7 @@ defaults: jobs: do: runs-on: ubuntu-${{ inputs.ubuntu_version }} + name: "${{ inputs.name }}: ubuntu-${{ inputs.ubuntu_version }} ${{ inputs.compiler }} nats:${{ inputs.server_version }}" steps: - name: Checkout nats.c uses: actions/checkout@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 934d5581e..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: build -on: - pull_request: - push: - -permissions: - contents: write # so it can comment - -jobs: - build-debug: - name: debug - uses: ./.github/workflows/build-all-debug.yml - secrets: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - build-release: - name: release - if: | - contains(github.event.pull_request.labels.*.name, 'build-release') || - github.event.pull_request.head.ref == 'main' || - startsWith(github.event.pull_request.head.ref, 'release_') - uses: ./.github/workflows/build-all-release.yml diff --git a/.github/workflows/build-all-debug.yml b/.github/workflows/on-pr-debug.yml similarity index 89% rename from .github/workflows/build-all-debug.yml rename to .github/workflows/on-pr-debug.yml index 7f242a401..bf368a4b9 100644 --- a/.github/workflows/build-all-debug.yml +++ b/.github/workflows/on-pr-debug.yml @@ -1,12 +1,5 @@ -name: build all (Debug) - on: - workflow_call: - secrets: - CODECOV_TOKEN: - required: true - COVERALLS_REPO_TOKEN: - required: true + pull_request: permissions: contents: write # so it can comment diff --git a/.github/workflows/on-push-quick.yml b/.github/workflows/on-push-quick.yml new file mode 100644 index 000000000..ea67a2bf5 --- /dev/null +++ b/.github/workflows/on-push-quick.yml @@ -0,0 +1,21 @@ +on: + push: + +defaults: + run: + shell: bash --noprofile --norc -x -eo pipefail {0} + +jobs: + quick: + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + ubuntu_version: [latest, 20.04] + uses: ./.github/workflows/build-test.yml + name: "All: ubuntu:${{ matrix.ubuntu_version }} ${{ matrix.compiler }} nats:latest" + with: + server_version: main + ubuntu_version: ${{ matrix.ubuntu_version }} + compiler: ${{ matrix.compiler }} + diff --git a/.github/workflows/build-all-release.yml b/.github/workflows/on-push-release.yml similarity index 96% rename from .github/workflows/build-all-release.yml rename to .github/workflows/on-push-release.yml index 09792dd34..8d305c01d 100644 --- a/.github/workflows/build-all-release.yml +++ b/.github/workflows/on-push-release.yml @@ -1,7 +1,9 @@ -name: build all (Release) - on: - workflow_call: + push: + branches: + - main + - release_* + permissions: contents: write # so it can comment