Add OS selection to workflow_dispatch

This commit is contained in:
Florian Albrechtskirchinger 2025-02-16 10:09:09 +01:00
parent 22406ef337
commit 027388814b
No known key found for this signature in database
GPG Key ID: 9C4E2AE92D3A9595

View File

@ -7,6 +7,18 @@ on:
inputs: inputs:
gtest_filter: gtest_filter:
description: 'Google Test filter' description: 'Google Test filter'
test_linux:
description: 'Test Linux'
type: boolean
default: true
test_macos:
description: 'Test MacOS'
type: boolean
default: true
test_windows:
description: 'Test Windows'
type: boolean
default: true
env: env:
GTEST_FILTER: ${{ github.event.inputs.gtest_filter || '*' }} GTEST_FILTER: ${{ github.event.inputs.gtest_filter || '*' }}
@ -14,7 +26,11 @@ env:
jobs: jobs:
ubuntu: ubuntu:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name if: >
(github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_linux == 'true')
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -27,7 +43,11 @@ jobs:
macos: macos:
runs-on: macos-latest runs-on: macos-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name if: >
(github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_macos == 'true')
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -38,7 +58,11 @@ jobs:
windows: windows:
runs-on: windows-latest runs-on: windows-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name if: >
(github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_windows == 'true')
steps: steps:
- name: Prepare Git for Checkout on Windows - name: Prepare Git for Checkout on Windows
run: | run: |