120 lines
4.0 KiB
YAML
120 lines
4.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate manifests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
- name: Validate test suite manifest
|
|
run: ./Scripts/run-tests.sh validate
|
|
- name: Check sensitive logs
|
|
run: |
|
|
python3 Scripts/check_sensitive_logs.py --self-test
|
|
python3 Scripts/check_sensitive_logs.py
|
|
|
|
lint:
|
|
name: SwiftLint
|
|
runs-on: macos-26
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
- name: Verify toolchain
|
|
run: |
|
|
set -euo pipefail
|
|
sudo xcode-select -s /Applications/Xcode_26.6.app
|
|
xcodebuild -version
|
|
test "$(xcodebuild -version | awk 'NR == 1 { print $2 }')" = "26.6"
|
|
test "$(xcrun --sdk iphonesimulator --show-sdk-version | cut -d. -f1)" = "26"
|
|
command -v swiftlint >/dev/null || brew install swiftlint
|
|
test "$(swiftlint version)" = "0.65.0"
|
|
- name: Run SwiftLint
|
|
run: swiftlint lint --quiet --strict
|
|
|
|
ios:
|
|
name: iOS / Extension
|
|
needs: [validate, lint]
|
|
runs-on: macos-26
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
- name: Verify toolchain
|
|
run: |
|
|
set -euo pipefail
|
|
sudo xcode-select -s /Applications/Xcode_26.6.app
|
|
xcodebuild -version
|
|
test "$(xcodebuild -version | awk 'NR == 1 { print $2 }')" = "26.6"
|
|
test "$(xcrun --sdk iphonesimulator --show-sdk-version | cut -d. -f1)" = "26"
|
|
- name: Install pinned XcodeGen
|
|
run: ./Scripts/install-xcodegen-ci.sh
|
|
- name: Generate project
|
|
run: ./Scripts/generate-xcodeproj.sh
|
|
- name: Run PR test preset
|
|
run: SKIP_GENERATE=1 ./Scripts/run-tests.sh pr
|
|
- name: Run simulator-stable UI regressions
|
|
run: |
|
|
set -euo pipefail
|
|
xcodebuild \
|
|
-project OSGKeyboard.xcodeproj \
|
|
-scheme OSGKeyboardUITests \
|
|
-destination 'platform=iOS Simulator,name=iPhone 17' \
|
|
-only-testing:OSGKeyboardUITests/AccountCenterUITests \
|
|
-only-testing:OSGKeyboardUITests/AssistantKeyboardUITests \
|
|
-only-testing:OSGKeyboardUITests/EditPagerUITests \
|
|
-onlyUsePackageVersionsFromResolvedFile \
|
|
test
|
|
- name: Build Release
|
|
run: |
|
|
set -euo pipefail
|
|
xcodebuild \
|
|
-project OSGKeyboard.xcodeproj \
|
|
-scheme OSGKeyboard \
|
|
-destination 'generic/platform=iOS Simulator' \
|
|
-configuration Release \
|
|
-onlyUsePackageVersionsFromResolvedFile \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
build
|
|
|
|
mac:
|
|
name: macOS
|
|
needs: [validate, lint]
|
|
runs-on: macos-26
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
- name: Verify toolchain
|
|
run: |
|
|
set -euo pipefail
|
|
sudo xcode-select -s /Applications/Xcode_26.6.app
|
|
xcodebuild -version
|
|
test "$(xcodebuild -version | awk 'NR == 1 { print $2 }')" = "26.6"
|
|
test "$(uname -m)" = "arm64"
|
|
- name: Install pinned XcodeGen
|
|
run: ./Scripts/install-xcodegen-ci.sh
|
|
- name: Generate project
|
|
run: ./Scripts/generate-xcodeproj.sh
|
|
- name: Run macOS tests
|
|
run: SKIP_GENERATE=1 ./Scripts/run-tests.sh mac
|
|
- name: Build Release
|
|
run: |
|
|
set -euo pipefail
|
|
xcodebuild \
|
|
-project OSGKeyboard.xcodeproj \
|
|
-scheme OSGKeyboardMac \
|
|
-destination 'platform=macOS' \
|
|
-configuration Release \
|
|
-onlyUsePackageVersionsFromResolvedFile \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
build
|