Skip to content

Commit d842dae

Browse files
authored
Fixing build issues (#117)
* Revert "i dont think swift version was helping" This reverts commit 6560329. * Revert "peg to older swift" This reverts commit 4c715aa. * Revert "peg to older xcode to speed things up" This reverts commit 239c10e. * Pin to macos-14 runner; use Production env for test execution to ensure data availability * Fix readme language * Use checkout@v4 * Remove redundant stage build * Increase sync timeout to avoid flaky tests
1 parent 6560329 commit d842dae

5 files changed

+20
-30
lines changed

.github/workflows/build-release.yaml

+16-26
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,16 @@ on:
99
jobs:
1010
test:
1111
name: Build and test
12-
runs-on: macos-13
12+
runs-on: macos-14
1313
environment:
14-
name: Test
14+
name: Production
1515
steps:
16-
# Older xcode used to avoid timeouts in fastlane that were introduced by Xcode 15...
17-
# https://github.com/orgs/community/discussions/68807
18-
- uses: maxim-lobanov/setup-xcode@v1
19-
with:
20-
xcode-version: '14.3.1'
21-
2216
- name: Checkout
2317
uses: actions/checkout@v4
24-
25-
- name: Install Pouch
26-
run: brew install sunshinejr/formulae/pouch
18+
19+
- name: Install tools
20+
run: |
21+
brew install sunshinejr/formulae/pouch
2722
2823
- name: Generate Secrets.swift
2924
env:
@@ -47,26 +42,21 @@ jobs:
4742
set -o pipefail
4843
xcodebuild build-for-testing test -scheme "Unit Tests" -project "Tree Tracker.xcodeproj" -destination "platform=$platform,name=$device" | xcpretty
4944
50-
build-publish:
51-
name: Build and Publish
45+
build-publish-prod:
46+
name: Build and publish - Production
5247
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' }}
53-
runs-on: macos-13
48+
runs-on: macos-14
5449
needs: test
5550
environment:
5651
name: Production
5752
steps:
58-
# Older xcode used to avoid timeouts in fastlane that were introduced by Xcode 15...
59-
# https://github.com/orgs/community/discussions/68807
60-
- uses: maxim-lobanov/setup-xcode@v1
61-
with:
62-
xcode-version: '14.3.1'
63-
6453
- name: Checkout
6554
uses: actions/checkout@v4
6655

67-
- name: Install Pouch
68-
run: brew install sunshinejr/formulae/pouch
69-
56+
- name: Install tools
57+
run: |
58+
brew install sunshinejr/formulae/pouch
59+
7060
- name: Generate Secrets.swift
7161
env:
7262
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
@@ -82,7 +72,7 @@ jobs:
8272

8373
- name: Set build number
8474
run: agvtool new-version $GITHUB_RUN_NUMBER
85-
75+
8676
- name: Configure Keychain
8777
env:
8878
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
@@ -122,11 +112,11 @@ jobs:
122112
run: |
123113
set -o pipefail
124114
xcodebuild -archivePath ~/build/Tree\ Tracker.xcarchive -exportOptionsPlist $GITHUB_WORKSPACE/Tree\ Tracker/ExportOptions.plist -exportPath ~/build -allowProvisioningUpdates -exportArchive | xcpretty
125-
115+
126116
- name: Publish
127117
if: ${{ success() && github.ref_name == 'main' && github.event_name != 'pull_request' }}
128118
env:
129119
APPLEID_USERNAME: ${{ secrets.APPLE_APPLE_ID }}
130120
APPLEID_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
131121
run: |
132-
xcrun altool --upload-app -t ios -f ~/build/Tree\ Tracker.ipa -u "$APPLEID_USERNAME" -p "$APPLEID_PASSWORD" --verbose
122+
xcrun altool --upload-app -t ios -f ~/build/Tree\ Tracker.ipa -u "$APPLEID_USERNAME" -p "$APPLEID_PASSWORD" --verbose

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If you wish, you can sign up for a free Rollbar account, generate your own API t
1616
If you choose not to setup Rollbar, simply add a dummy value for `ROLLBAR_AUTH_TOKEN` and any Rollbar calls will silently fail.
1717

1818
## Additional project config {#config}
19-
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.
19+
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.
2020

2121
```
2222
export AWS_BUCKET_NAME=

Unit Tests/ProtectEarthSiteServiceTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ProtectEarthSiteServiceTests: XCTestCase {
1414
siteService!.sync() { _ in
1515
expectation.fulfill()
1616
}
17-
waitForExpectations(timeout: 5)
17+
waitForExpectations(timeout: 10)
1818
}
1919

2020
override func tearDownWithError() throws {

Unit Tests/ProtectEarthSpeciesServiceTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ProtectEarthSpeciesServiceTests: XCTestCase {
1414
speciesService!.sync() { _ in
1515
expectation.fulfill()
1616
}
17-
waitForExpectations(timeout: 5)
17+
waitForExpectations(timeout: 10)
1818
}
1919

2020
override func tearDownWithError() throws {

Unit Tests/ProtectEarthSupervisorServiceTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ProtectEarthSupervisorServiceTests: XCTestCase {
1414
supervisorService!.sync() { _ in
1515
expectation.fulfill()
1616
}
17-
waitForExpectations(timeout: 5)
17+
waitForExpectations(timeout: 10)
1818
}
1919

2020
override func tearDownWithError() throws {

0 commit comments

Comments
 (0)