ci: run build workflow directly on push/prs

Calling this from another workflow only for these events doesn't make
much sense now

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-04-29 01:08:33 -04:00
parent 2dfb674e44
commit 77b88fc7ec
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86
2 changed files with 51 additions and 59 deletions

View File

@ -1,12 +1,61 @@
name: Build name: Build
on: on:
push:
branches-ignore:
- "renovate/**"
paths:
# File types
- "**.cpp"
- "**.h"
- "**.java"
# Directories
- "buildconfig/"
- "cmake/"
- "launcher/"
- "libraries/"
- "program_info/"
- "tests/"
# Files
- "CMakeLists.txt"
- "COPYING.md"
# Workflows
- ".github/workflows/build.yml"
pull_request:
paths:
# File types
- "**.cpp"
- "**.h"
# Directories
- "buildconfig/"
- "cmake/"
- "launcher/"
- "libraries/"
- "program_info/"
- "tests/"
# Files
- "CMakeLists.txt"
- "COPYING.md"
# Workflows
- ".github/workflows/build.yml"
workflow_call: workflow_call:
inputs: inputs:
build-type: build-type:
description: Type of build (Debug or Release) description: Type of build (Debug or Release)
type: string type: string
default: Debug default: Debug
workflow_dispatch:
inputs:
build-type:
description: Type of build (Debug or Release)
type: string
default: Debug
jobs: jobs:
build: build:
@ -40,7 +89,7 @@ jobs:
- os: macos-14 - os: macos-14
artifact-name: macOS artifact-name: macOS
base-cmake-preset: ${{ inputs.build-type == 'Debug' && 'macos_universal' || 'macos' }} base-cmake-preset: ${{ (inputs.build-type || 'Debug') == 'Debug' && 'macos_universal' || 'macos' }}
macosx-deployment-target: 11.0 macosx-deployment-target: 11.0
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -79,7 +128,7 @@ jobs:
id: cmake-preset id: cmake-preset
env: env:
BASE_CMAKE_PRESET: ${{ matrix.base-cmake-preset }} BASE_CMAKE_PRESET: ${{ matrix.base-cmake-preset }}
PRESET_TYPE: ${{ inputs.build-type == 'Debug' && 'debug' || 'ci' }} PRESET_TYPE: ${{ (inputs.build-type || 'Debug') == 'Debug' && 'debug' || 'ci' }}
run: | run: |
echo preset="$BASE_CMAKE_PRESET"_"$PRESET_TYPE" >> "$GITHUB_OUTPUT" echo preset="$BASE_CMAKE_PRESET"_"$PRESET_TYPE" >> "$GITHUB_OUTPUT"

View File

@ -1,57 +0,0 @@
name: Build Application
on:
push:
branches-ignore:
- "renovate/**"
paths:
# File types
- "**.cpp"
- "**.h"
- "**.java"
# Directories
- "buildconfig/"
- "cmake/"
- "launcher/"
- "libraries/"
- "program_info/"
- "tests/"
# Files
- "CMakeLists.txt"
- "COPYING.md"
# Workflows
- ".github/workflows/build.yml"
- ".github/workflows/trigger_builds.yml"
pull_request:
paths:
# File types
- "**.cpp"
- "**.h"
# Directories
- "buildconfig/"
- "cmake/"
- "launcher/"
- "libraries/"
- "program_info/"
- "tests/"
# Files
- "CMakeLists.txt"
- "COPYING.md"
# Workflows
- ".github/workflows/build.yml"
- ".github/workflows/trigger_builds.yml"
workflow_dispatch:
jobs:
build_debug:
name: Build Debug
uses: ./.github/workflows/build.yml
with:
build-type: Debug
secrets: inherit