Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing build issues #117

Merged
merged 8 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 16 additions & 26 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@ on:
jobs:
test:
name: Build and test
runs-on: macos-13
runs-on: macos-14
environment:
name: Test
name: Production
steps:
# Older xcode used to avoid timeouts in fastlane that were introduced by Xcode 15...
# https://github.com/orgs/community/discussions/68807
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3.1'

- name: Checkout
uses: actions/checkout@v4

- name: Install Pouch
run: brew install sunshinejr/formulae/pouch

- name: Install tools
run: |
brew install sunshinejr/formulae/pouch

- name: Generate Secrets.swift
env:
Expand All @@ -47,26 +42,21 @@ jobs:
set -o pipefail
xcodebuild build-for-testing test -scheme "Unit Tests" -project "Tree Tracker.xcodeproj" -destination "platform=$platform,name=$device" | xcpretty

build-publish:
name: Build and Publish
build-publish-prod:
name: Build and publish - Production
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' }}
runs-on: macos-13
runs-on: macos-14
needs: test
environment:
name: Production
steps:
# Older xcode used to avoid timeouts in fastlane that were introduced by Xcode 15...
# https://github.com/orgs/community/discussions/68807
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3.1'

- name: Checkout
uses: actions/checkout@v4

- name: Install Pouch
run: brew install sunshinejr/formulae/pouch

- name: Install tools
run: |
brew install sunshinejr/formulae/pouch

- name: Generate Secrets.swift
env:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
Expand All @@ -82,7 +72,7 @@ jobs:

- name: Set build number
run: agvtool new-version $GITHUB_RUN_NUMBER

- name: Configure Keychain
env:
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
Expand Down Expand Up @@ -122,11 +112,11 @@ jobs:
run: |
set -o pipefail
xcodebuild -archivePath ~/build/Tree\ Tracker.xcarchive -exportOptionsPlist $GITHUB_WORKSPACE/Tree\ Tracker/ExportOptions.plist -exportPath ~/build -allowProvisioningUpdates -exportArchive | xcpretty

- name: Publish
if: ${{ success() && github.ref_name == 'main' && github.event_name != 'pull_request' }}
env:
APPLEID_USERNAME: ${{ secrets.APPLE_APPLE_ID }}
APPLEID_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
run: |
xcrun altool --upload-app -t ios -f ~/build/Tree\ Tracker.ipa -u "$APPLEID_USERNAME" -p "$APPLEID_PASSWORD" --verbose
xcrun altool --upload-app -t ios -f ~/build/Tree\ Tracker.ipa -u "$APPLEID_USERNAME" -p "$APPLEID_PASSWORD" --verbose
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you wish, you can sign up for a free Rollbar account, generate your own API t
If you choose not to setup Rollbar, simply add a dummy value for `ROLLBAR_AUTH_TOKEN` and any Rollbar calls will silently fail.

## Additional project config {#config}
Now, to run the project, we'll need to generate the Secrets file. This means you need to run first install [`pouch`](https://github.com/sunshinejr/pouch) (the easiest is using `brew install sunshinejr/formulae/pouch`). Now, you need to have these environment variables available. It would be wise to prepare this file once and keep it somewhere obvious but take care not to check it in to Git. You can simply `source` the file whenever you need to regenerate Secrets.
Now, to run the project, we'll need to generate the Secrets file. This means you need to first install [`pouch`](https://github.com/sunshinejr/pouch) (the easiest is using `brew install sunshinejr/formulae/pouch`). Now, you need to have these environment variables available. It would be wise to prepare this file once and keep it somewhere obvious but take care not to check it in to Git. You can simply `source` the file whenever you need to regenerate Secrets.

```
export AWS_BUCKET_NAME=
Expand Down
2 changes: 1 addition & 1 deletion Unit Tests/ProtectEarthSiteServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ProtectEarthSiteServiceTests: XCTestCase {
siteService!.sync() { _ in
expectation.fulfill()
}
waitForExpectations(timeout: 5)
waitForExpectations(timeout: 10)
}

override func tearDownWithError() throws {
Expand Down
2 changes: 1 addition & 1 deletion Unit Tests/ProtectEarthSpeciesServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ProtectEarthSpeciesServiceTests: XCTestCase {
speciesService!.sync() { _ in
expectation.fulfill()
}
waitForExpectations(timeout: 5)
waitForExpectations(timeout: 10)
}

override func tearDownWithError() throws {
Expand Down
2 changes: 1 addition & 1 deletion Unit Tests/ProtectEarthSupervisorServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ProtectEarthSupervisorServiceTests: XCTestCase {
supervisorService!.sync() { _ in
expectation.fulfill()
}
waitForExpectations(timeout: 5)
waitForExpectations(timeout: 10)
}

override func tearDownWithError() throws {
Expand Down