From 08b27a580e82c711213a474e15c4b887e45c9754 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 23 Aug 2024 00:37:02 +0200 Subject: [PATCH] Update distributable dispatch workflows. --- .github/workflows/distributable-dispatch.yml | 71 -------------------- .github/workflows/linux-sanitizer.yml | 41 ----------- .github/workflows/linux-test.yml | 42 ++++++++++++ .github/workflows/macos-test.yml | 29 +++++++- .github/workflows/windows-test.yml | 17 +++++ 5 files changed, 87 insertions(+), 113 deletions(-) delete mode 100644 .github/workflows/distributable-dispatch.yml delete mode 100644 .github/workflows/linux-sanitizer.yml diff --git a/.github/workflows/distributable-dispatch.yml b/.github/workflows/distributable-dispatch.yml deleted file mode 100644 index af69f785f..000000000 --- a/.github/workflows/distributable-dispatch.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Distributable Dispatch - -on: - workflow_run: - workflows: ["Windows Test", "MacOS Test", "Linux Test", "Linux Sanitizer Test"] - types: - - completed - branches: ['v*.*.*', 'master'] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - windows-distributable: - name: Windows Distributable Dispatch - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' - steps: - - name: Windows Workflow Dispatch - uses: convictional/trigger-workflow-and-wait@v1.6.1 - with: - owner: metacall - repo: distributable-windows - github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} - workflow_file_name: ci.yml - wait_workflow: true - client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' - ref: ${{ github.head_ref || github.ref_name }} - - macos-distributable: - name: MacOS Distributable Dispatch - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' - steps: - - name: Homebrew Workflow Dispatch - uses: convictional/trigger-workflow-and-wait@v1.6.1 - with: - owner: metacall - repo: homebrew - github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} - workflow_file_name: test.yml - wait_workflow: true - client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' - ref: ${{ github.head_ref || github.ref_name }} - - name: MacOS Workflow Dispatch - uses: convictional/trigger-workflow-and-wait@v1.6.1 - with: - owner: metacall - repo: distributable-macos - github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} - workflow_file_name: ci.yml - wait_workflow: true - client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' - ref: ${{ github.head_ref || github.ref_name }} - - linux-distributable: - name: Linux Distributable Dispatch - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' - steps: - - name: Linux Workflow Dispatch - uses: convictional/trigger-workflow-and-wait@v1.6.1 - with: - owner: metacall - repo: distributable-linux - github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} - workflow_file_name: ci.yml - wait_workflow: true - client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' - ref: ${{ github.head_ref || github.ref_name }} diff --git a/.github/workflows/linux-sanitizer.yml b/.github/workflows/linux-sanitizer.yml deleted file mode 100644 index 25198eceb..000000000 --- a/.github/workflows/linux-sanitizer.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Linux Sanitizer Test - -on: - workflow_dispatch: - pull_request: - push: - tags: - - 'v*.*.*' - branches: - - master - - develop - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - linux-sanitizer-gcc: - name: Linux GCC Sanitizer Test - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:noble", "ubuntu:jammy"] - sanitizer: [address-sanitizer, thread-sanitizer] # TODO: memory-sanitizer not supported by GCC - - env: - SANITIZER_SKIP_SUMMARY: 1 - - steps: - - name: Check out the repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install, build and run thread sanitizer tests - run: ./docker-compose.sh test-${{ matrix.sanitizer }} - env: - METACALL_BUILD_TYPE: debug - METACALL_BASE_IMAGE: ${{ matrix.image }} diff --git a/.github/workflows/linux-test.yml b/.github/workflows/linux-test.yml index d36c887d7..6a72e494a 100644 --- a/.github/workflows/linux-test.yml +++ b/.github/workflows/linux-test.yml @@ -35,3 +35,45 @@ jobs: env: METACALL_BUILD_TYPE: ${{ matrix.build }} METACALL_BASE_IMAGE: ${{ matrix.image }} + + linux-sanitizer-test: + name: Linux GCC Sanitizer Test + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:noble", "ubuntu:jammy"] + sanitizer: [address-sanitizer, thread-sanitizer] # TODO: memory-sanitizer not supported by GCC + + env: + SANITIZER_SKIP_SUMMARY: 1 + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install, build and run thread sanitizer tests + run: ./docker-compose.sh test-${{ matrix.sanitizer }} + env: + METACALL_BUILD_TYPE: debug + METACALL_BASE_IMAGE: ${{ matrix.image }} + + linux-distributable: + name: Linux Distributable Dispatch + needs: [linux-test, linux-sanitizer-test] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' + steps: + - name: Linux Workflow Dispatch + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: metacall + repo: distributable-linux + github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} + workflow_file_name: ci.yml + wait_workflow: true + client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' + ref: ${{ github.head_ref || github.ref_name }} diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 8b9679863..e050cf1fb 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -15,7 +15,7 @@ concurrency: cancel-in-progress: true jobs: - mac-test: + macos-test: name: MacOS Clang Test runs-on: macos-latest @@ -95,3 +95,30 @@ jobs: bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS env: METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests + + macos-distributable: + name: MacOS Distributable Dispatch + needs: macos-test + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' + steps: + - name: Homebrew Workflow Dispatch + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: metacall + repo: homebrew + github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} + workflow_file_name: test.yml + wait_workflow: true + client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' + ref: ${{ github.head_ref || github.ref_name }} + - name: MacOS Workflow Dispatch + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: metacall + repo: distributable-macos + github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} + workflow_file_name: ci.yml + wait_workflow: true + client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' + ref: ${{ github.head_ref || github.ref_name }} diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index a46e1ebe4..41cd0ec4c 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -64,3 +64,20 @@ jobs: run: cmd.exe /c "powershell ..\tools\metacall-build.ps1 $Env:METACALL_BUILD_OPTIONS" env: METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests + + windows-distributable: + name: Windows Distributable Dispatch + needs: windows-test + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' + steps: + - name: Windows Workflow Dispatch + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: metacall + repo: distributable-windows + github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} + workflow_file_name: ci.yml + wait_workflow: true + client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' + ref: ${{ github.head_ref || github.ref_name }}