How to build and test before release with Github Action for workspace #159010
Unanswered
StefanMiticon
asked this question in
Actions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
General
Body
Hi all,
I have a problem to write Github action script which will build and test workspace, it is complain that can not build precompiled header and can not found the import of the library which is added as static (.a) framework to the demo app from same workspace. Here is the repository: https://github.com/mapp-digital/MappIntelligence-iOS-v5
And my script looks like this:
`name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
jobs:
test_apple_platforms:
name: Test on iOS
runs-on: macos-latest
strategy:
matrix:
destination:
- "platform=iOS Simulator,name=iPhone 15"
test_spm:
name: Test SPM
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Create config file for build
run: |
mkdir -p MappIntelligenceDemoApp/MappIntelligenceDemoApp
echo "${{ secrets.APPOXEECONFIG }}" | base64 --decode > MappIntelligenceDemoApp/MappIntelligenceDemoApp/AppoxeeConfig.plist
echo "${{ secrets.SETUPFORLOCALTESTING }}" | base64 --decode > MappIntelligenceDemoApp/MappIntelligenceDemoApp/SetupForLocalTesting.plist
- name: Build for iOS
run: |
xcodebuild -scheme MappIntelligenceSDK
-destination "platform=iOS Simulator,name=iPhone 15"
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
clean build | xcbeautify
xcodebuild -scheme MappIntelligenceiOS
-destination "platform=iOS Simulator,name=iPhone 15"
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
clean build | xcbeautify
cd MappIntelligenceDemoApp
xcodebuild -scheme MappIntelligenceDemoApp
-destination "platform=iOS Simulator,name=iPhone 15"
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
GCC_PRECOMPILE_PREFIX_HEADER=NO
clean build | xcbeautify
test_cocoapods:
name: Test Cocoa Pods
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- name: Create config file for build
run: |
mkdir -p MappIntelligenceDemoApp/MappIntelligenceDemoApp
echo "${{ secrets.APPOXEECONFIG }}" | base64 --decode > MappIntelligenceDemoApp/MappIntelligenceDemoApp/AppoxeeConfig.plist
echo "${{ secrets.SETUPFORLOCALTESTING }}" | base64 --decode > MappIntelligenceDemoApp/MappIntelligenceDemoApp/SetupForLocalTesting.plist
- name: Switch XCode Version
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Install Dependences
run: |
cd Example
pod repo update
pod install
shell: bash
- name: Test Only
uses: ty0x2333/cocoapods-action@master
with:
scheme: 'exampleTests'
additional_build_params: -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5'
lint: false
release:
needs: [test_apple_platforms, test_spm, test_cocoapods]
name: Create a new GitHub release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: woke
uses: get-woke/woke-action@v0
with:
fail-on-error: true
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: '5.0.13'
release_name: Release 5.0.13
generate_release_notes: true
token: ${{ secrets.TOKEN_GB }}
`
The build and test are working perfectly locally. But when I run the Github action I got this errors:
Error: 'MappIntelligenceiOS/MappIntelligenceiOS.h' file not found
#import "MappIntelligenceiOS/MappIntelligenceiOS.h"
^
Error: failed to emit precompiled header '/Users/runner/Library/Developer/Xcode/DerivedData/MappIntelligenceDemoApp-frbmjklluyontebrqcaqtnnwndho/Build/Intermediates.noindex/PrecompiledHeaders/MappIntelligenceDemoApp-Bridging-Header-swift_9AVYD9M9FVBR-clang_3VX7DUTN1QACM.pch' for bridging header '/Users/runner/work/MappIntelligence-iOS-v5/MappIntelligence-iOS-v5/MappIntelligenceDemoApp/MappIntelligenceDemoApp/MappIntelligenceDemoApp-Bridging-Header.h'
2 errors generated.
thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions