Unify CI and justfile: all workflows call just recipes
Some checks failed
CI / Scraper / Test (pull_request) Failing after 9s
CI / UI / Build (pull_request) Failing after 9s
CI / Scraper / Lint (pull_request) Failing after 12s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (push) Has been cancelled
iOS CI / Test (push) Has been cancelled
iOS CI / Build (pull_request) Failing after 2s
iOS CI / Test (pull_request) Has been skipped
Some checks failed
CI / Scraper / Test (pull_request) Failing after 9s
CI / UI / Build (pull_request) Failing after 9s
CI / Scraper / Lint (pull_request) Failing after 12s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (push) Has been cancelled
iOS CI / Test (push) Has been cancelled
iOS CI / Build (pull_request) Failing after 2s
iOS CI / Test (pull_request) Has been skipped
- justfile: extract ios_scheme/ios_sim/ios_spm/runner_temp variables; add ios-resolve (SPM dep cache), ios-archive, ios-export recipes; pipe xcodebuild through xcpretty with raw fallback in ios-build/ios-test - ios.yaml: replace raw xcodebuild calls with just ios-build / just ios-test; install just via brew; uncommented archive job stub now calls just ios-archive && just ios-export; add justfile to path trigger - ci-scraper.yaml: install just via extractions/setup-just@v2; use just lint / just test; fix upload-artifact v3 -> v4; add justfile to path trigger - ci-ui.yaml: install just; use just ui-install / just ui-check / just ui-build; add justfile to path trigger
This commit is contained in:
@@ -5,17 +5,15 @@ on:
|
||||
branches: ["v2", "main"]
|
||||
paths:
|
||||
- "ios/**"
|
||||
- "justfile"
|
||||
- ".gitea/workflows/ios.yaml"
|
||||
pull_request:
|
||||
branches: ["v2", "main"]
|
||||
paths:
|
||||
- "ios/**"
|
||||
- "justfile"
|
||||
- ".gitea/workflows/ios.yaml"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ios/LibNovel
|
||||
|
||||
jobs:
|
||||
# ── build ─────────────────────────────────────────────────────────────────
|
||||
build:
|
||||
@@ -25,36 +23,14 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install just
|
||||
run: brew install just
|
||||
|
||||
- name: Install xcodegen
|
||||
run: brew install xcodegen
|
||||
|
||||
- name: Generate Xcode project
|
||||
run: xcodegen generate --spec project.yml --project .
|
||||
|
||||
- name: Resolve SPM packages
|
||||
run: |
|
||||
xcodebuild \
|
||||
-project LibNovel.xcodeproj \
|
||||
-scheme LibNovel \
|
||||
-resolvePackageDependencies \
|
||||
-clonedSourcePackagesDirPath .spm-cache
|
||||
|
||||
- name: Build (simulator)
|
||||
run: |
|
||||
xcodebuild \
|
||||
-project LibNovel.xcodeproj \
|
||||
-scheme LibNovel \
|
||||
-configuration Debug \
|
||||
-destination 'generic/platform=iOS Simulator' \
|
||||
-clonedSourcePackagesDirPath .spm-cache \
|
||||
CODE_SIGNING_ALLOWED=NO \
|
||||
| xcpretty || xcodebuild \
|
||||
-project LibNovel.xcodeproj \
|
||||
-scheme LibNovel \
|
||||
-configuration Debug \
|
||||
-destination 'generic/platform=iOS Simulator' \
|
||||
-clonedSourcePackagesDirPath .spm-cache \
|
||||
CODE_SIGNING_ALLOWED=NO
|
||||
run: just ios-build
|
||||
|
||||
# ── test ──────────────────────────────────────────────────────────────────
|
||||
test:
|
||||
@@ -65,30 +41,14 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install just
|
||||
run: brew install just
|
||||
|
||||
- name: Install xcodegen
|
||||
run: brew install xcodegen
|
||||
|
||||
- name: Generate Xcode project
|
||||
run: xcodegen generate --spec project.yml --project .
|
||||
|
||||
- name: Resolve SPM packages
|
||||
run: |
|
||||
xcodebuild \
|
||||
-project LibNovel.xcodeproj \
|
||||
-scheme LibNovel \
|
||||
-resolvePackageDependencies \
|
||||
-clonedSourcePackagesDirPath .spm-cache
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
xcodebuild test \
|
||||
-project LibNovel.xcodeproj \
|
||||
-scheme LibNovel \
|
||||
-configuration Debug \
|
||||
-destination 'platform=iOS Simulator,name=iPhone 17' \
|
||||
-clonedSourcePackagesDirPath .spm-cache \
|
||||
CODE_SIGNING_ALLOWED=NO \
|
||||
| xcpretty --report junit --output test-results.xml || true
|
||||
run: just ios-test
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
@@ -102,6 +62,7 @@ jobs:
|
||||
# Runs only on pushes to v2/main (not PRs).
|
||||
# Requires secrets: APPLE_CERTIFICATE_BASE64, APPLE_CERTIFICATE_PASSWORD,
|
||||
# APPLE_PROVISIONING_PROFILE_BASE64, KEYCHAIN_PASSWORD
|
||||
# Also requires ios/LibNovel/ExportOptions.plist to exist.
|
||||
#
|
||||
# archive:
|
||||
# name: Archive
|
||||
@@ -112,13 +73,12 @@ jobs:
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
#
|
||||
# - name: Install just
|
||||
# run: brew install just
|
||||
#
|
||||
# - name: Install xcodegen
|
||||
# run: brew install xcodegen
|
||||
#
|
||||
# - name: Generate Xcode project
|
||||
# run: xcodegen generate --spec project.yml --project .
|
||||
# working-directory: ios/LibNovel
|
||||
#
|
||||
# - name: Import signing certificate
|
||||
# env:
|
||||
# CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
|
||||
@@ -145,25 +105,5 @@ jobs:
|
||||
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
# cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/
|
||||
#
|
||||
# - name: Archive
|
||||
# run: |
|
||||
# xcodebuild archive \
|
||||
# -project LibNovel.xcodeproj \
|
||||
# -scheme LibNovel \
|
||||
# -configuration Release \
|
||||
# -archivePath $RUNNER_TEMP/LibNovel.xcarchive
|
||||
# working-directory: ios/LibNovel
|
||||
#
|
||||
# - name: Export IPA
|
||||
# run: |
|
||||
# xcodebuild -exportArchive \
|
||||
# -archivePath $RUNNER_TEMP/LibNovel.xcarchive \
|
||||
# -exportPath $RUNNER_TEMP/ipa \
|
||||
# -exportOptionsPlist ios/ExportOptions.plist
|
||||
#
|
||||
# - name: Upload IPA artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: LibNovel-release
|
||||
# path: ${{ runner.temp }}/ipa/LibNovel.ipa
|
||||
# retention-days: 30
|
||||
# - name: Archive & export IPA
|
||||
# run: just ios-archive && just ios-export
|
||||
|
||||
Reference in New Issue
Block a user