otclient-redemption/.github/workflows/ci.yml
Luan Santos 388b3ba2ea
feat(platform): add native Cocoa/AppKit windowing for macOS (#1559)
New Features:
- Native macOS app with Cocoa windowing, OpenGL view, improved input, clipboard and cursor handling.
- Platform-aware keyboard and shortcut behavior with clearer primary/meta/control semantics and normalized key combos.

Bug Fixes:
- Expanded detection for "connection refused" network errors.

Chores:
- macOS build/bundle and packaging improvements; new dependency overlay added; CI now runs macOS build when relevant.

Tests:
- AddressSanitizer support added for test builds.
2026-05-16 13:06:48 -03:00

225 lines
7.6 KiB
YAML

name: CI
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "src/**"
- "tests/**"
- "cmake/**"
- "android/**"
- "browser/**"
- "data/**"
- "mods/**"
- "modules/**"
- "tools/**"
- "vc18/**"
- "vcpkg.json"
- "CMakeLists.txt"
- "CMakePresets.json"
- "Dockerfile"
- "Dockerfile.browser"
- "Dockerfile.browser.sh"
- "build_luajit_android.sh"
- "setup_android_deps.sh"
- "init.lua"
- "otclientrc.lua"
- "cacert.pem"
- "config.ini"
- ".dockerignore"
- ".yamllint.yaml"
- ".reviewdog.yml"
- ".github/workflows/**"
merge_group:
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "cmake/**"
- "android/**"
- "browser/**"
- "data/**"
- "mods/**"
- "modules/**"
- "tools/**"
- "vc18/**"
- "vcpkg.json"
- "CMakeLists.txt"
- "CMakePresets.json"
- "Dockerfile"
- "Dockerfile.browser"
- "Dockerfile.browser.sh"
- "build_luajit_android.sh"
- "setup_android_deps.sh"
- "init.lua"
- "otclientrc.lua"
- "cacert.pem"
- "config.ini"
- ".dockerignore"
- ".yamllint.yaml"
- ".reviewdog.yml"
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect Build Scope
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
compile: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && 'true' || steps.filter.outputs.compile }}
macos: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && 'true' || steps.filter.outputs.macos }}
android: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && 'true' || steps.filter.outputs.android }}
docker: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && 'true' || steps.filter.outputs.docker }}
browser: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group') && 'true' || steps.filter.outputs.browser }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Detect changed paths
id: filter
if: github.event_name != 'workflow_dispatch' && github.event_name != 'merge_group'
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
with:
filters: |
compile:
- "src/**"
- "tests/**"
- "cmake/**"
- "vc18/**"
- "vcpkg.json"
- "CMakeLists.txt"
- "CMakePresets.json"
- ".yamllint.yaml"
- ".reviewdog.yml"
- ".github/workflows/ci.yml"
- ".github/workflows/reusable-build-linux.yml"
- ".github/workflows/reusable-build-windows.yml"
- ".github/workflows/reusable-checks.yml"
- ".github/workflows/reusable-tests-lua.yml"
macos:
- "src/**"
- "cmake/**"
- "vcpkg.json"
- "CMakeLists.txt"
- "CMakePresets.json"
- ".github/workflows/ci.yml"
- ".github/workflows/reusable-build-macos.yml"
android:
- "src/**"
- "android/**"
- "cmake/**"
- "CMakeLists.txt"
- "vcpkg.json"
- "build_luajit_android.sh"
- "setup_android_deps.sh"
- ".github/workflows/ci.yml"
- ".github/workflows/reusable-build-android-apk.yml"
docker:
- "Dockerfile"
- ".dockerignore"
- "src/**"
- "cmake/**"
- "vcpkg.json"
- "CMakeLists.txt"
- "CMakePresets.json"
- ".yamllint.yaml"
- ".github/workflows/ci.yml"
- ".github/workflows/reusable-build-docker.yml"
browser:
- "Dockerfile.browser"
- "Dockerfile.browser.sh"
- "browser/**"
- "src/**"
- "cmake/**"
- "vcpkg.json"
- "CMakeLists.txt"
- ".yamllint.yaml"
- ".github/workflows/ci.yml"
- ".github/workflows/reusable-build-browser.yml"
checks:
name: Fast Checks
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
permissions:
contents: read
checks: write
pull-requests: read
uses: ./.github/workflows/reusable-checks.yml
secrets: inherit
tests-lua:
name: Lua Syntax
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
permissions:
contents: read
uses: ./.github/workflows/reusable-tests-lua.yml
secrets: inherit
build-linux:
name: Build - Linux
needs: [changes, checks, tests-lua]
if: needs.changes.outputs.compile == 'true' && needs.checks.result == 'success' && needs.tests-lua.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
permissions:
contents: read
packages: read
uses: ./.github/workflows/reusable-build-linux.yml
secrets: inherit
build-windows:
name: Build - Windows
needs: [changes, checks, tests-lua]
if: needs.changes.outputs.compile == 'true' && needs.checks.result == 'success' && needs.tests-lua.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
permissions:
contents: read
packages: read
uses: ./.github/workflows/reusable-build-windows.yml
secrets: inherit
build-macos:
name: Build - macOS
needs: [changes, checks, tests-lua]
if: needs.changes.outputs.macos == 'true' && needs.checks.result == 'success' && needs.tests-lua.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
permissions:
contents: read
pull-requests: read
uses: ./.github/workflows/reusable-build-macos.yml
secrets: inherit
build-android-apk:
name: Build - Android APK
needs: [changes, checks, tests-lua]
if: needs.changes.outputs.android == 'true' && needs.checks.result == 'success' && needs.tests-lua.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
permissions:
contents: read
pull-requests: read
uses: ./.github/workflows/reusable-build-android-apk.yml
secrets: inherit
build-docker:
name: Build - Docker
needs: [changes, checks, tests-lua]
if: needs.changes.outputs.docker == 'true' && needs.checks.result == 'success' && needs.tests-lua.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
permissions:
contents: read
packages: write
uses: ./.github/workflows/reusable-build-docker.yml
secrets: inherit
build-browser:
name: Build - Browser
needs: [changes, checks, tests-lua]
if: needs.changes.outputs.browser == 'true' && needs.checks.result == 'success' && needs.tests-lua.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
permissions:
contents: read
uses: ./.github/workflows/reusable-build-browser.yml
secrets: inherit