Skip to content

Commit 9a10c5a

Browse files
committedAug 13, 2022
Squash commits: nightly build action improvements
* Use Xcode 14 beta * Switch build to use the xcodeproj instead of the workspace Run Xcode-select manually to select Xcode 14 Improve nightly action build * Derived data is cached to (hopefully) speed up build times * Combined a step - install step can be combined with create-dmg step * Add 15-min action timeout Update nightly action cache key Also increased timeout to 30 mins, 15 mins is cutting it too close Update nightly build badge with new nightly action name
1 parent fa10cdc commit 9a10c5a

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed
 

Diff for: ‎.github/workflows/main.yml

+26-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# This is a basic workflow to help you get started with Actions
2-
3-
name: Build Canary
1+
name: Build Nightly
42

53
# Controls when the workflow will run
64
on:
5+
pull_request: # Run for pull requests as well
76
# Triggers the workflow on push or pull request events but only for the main branch
87
push:
98
branches: [ main ]
@@ -14,16 +13,31 @@ on:
1413
jobs:
1514
build_nightly_release:
1615
runs-on: macos-12
16+
timeout-minutes: 30 # If a build exceeds 30 mins, it probably isn't ever going to complete
1717

1818
steps:
19-
- name: "Checkout Project"
20-
uses: actions/checkout@v3
19+
- uses: actions/checkout@v3
2120

22-
- name: "Select Xcode 13.3.1"
23-
uses: devbotsxyz/xcode-select@main
21+
- name: "Select Xcode 14.0"
22+
run: sudo xcode-select -s /Applications/Xcode_14.0.app
23+
24+
### Caching
25+
- uses: actions/cache@v2
26+
name: "Cache Derived Data"
2427
with:
25-
version: "13.4.1"
28+
path: |
29+
~/Library/Developer/Xcode/DerivedData/Swiftcord-*/Build
30+
~/Library/Developer/Xcode/DerivedData/Swiftcord-*/SourcePackages
31+
key: ${{ runner.os }}-derivedData-cache-${{ hashFiles(
32+
'Swiftcord.xcworkspace/xcshareddata/swiftpm/Package.resolved',
33+
'Swiftcord.xcodeproj/xcshareddata/swiftpm/Package.resolved'
34+
) }} # The xcworkspace will be removed soon
35+
restore-keys: |
36+
${{ runner.os }}-derivedData-cache
37+
- name: Avoid inode changes for DerivedData
38+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
2639

40+
### Certs
2741
- name: "Import Certificate: Development"
2842
env:
2943
BUILD_CERTIFICATE_BASE64: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA }}
@@ -68,22 +82,19 @@ jobs:
6882
TEAMID=`awk -F '=' '/DEVELOPMENT_TEAM/ {print $2; exit}' Swiftcord.xcodeproj/project.pbxproj`
6983
sed -i '' "s/$TEAMID/ RJNC97Y8QD;/g" Swiftcord.xcodeproj/project.pbxproj
7084
71-
- name: "Archive"
85+
- name: "Create Release Build Archive"
7286
run: |
73-
xcodebuild -workspace Swiftcord.xcworkspace -scheme Swiftcord -configuration Release archive -archivePath Swiftcord.xcarchive \
87+
xcodebuild -project Swiftcord.xcodeproj -scheme Swiftcord -configuration Release archive -archivePath Swiftcord.xcarchive \
7488
COMPILER_INDEX_STORE_ENABLE=NO APPCENTER_APP_SECRET="${{ secrets.APPCENTER_APP_SECRET }}" "OTHER_CODE_SIGN_FLAGS=--keychain $RUNNER_TEMP/app-signing.keychain-db" | xcpretty
7589
7690
- name: "Export & Sign Release Build"
7791
uses: devbotsxyz/xcode-export-archive@main
7892
with:
7993
workspace: Swiftcord.xcworkspace
8094
scheme: Swiftcord
81-
82-
- name: Install create-dmg
83-
run: npm install --global create-dmg
8495

85-
- name: Make Release Dmg
86-
run: create-dmg Export/Swiftcord.app
96+
- name: Create Release DMG
97+
run: npm install --global create-dmg && create-dmg Export/Swiftcord.app
8798

8899
- name: "Notarize Release Build"
89100
run: |

Diff for: ‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ since it was relatively new to me at that time. Hence, Swiftcord was born!
5959

6060
## Releases
6161

62-
### Nightly Builds (Latest fixes/features, might be unstable)
63-
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/SwiftcordApp/Swiftcord/Build%20Canary?style=for-the-badge)](https://nightly.link/SwiftcordApp/Swiftcord/workflows/main/main/Swiftcord_Canary.zip)
62+
### Nightly Builds (Latest fixes/features, built from the latest commit on `main`, might be unstable)
63+
[![Nightly build action status](https://img.shields.io/github/workflow/status/SwiftcordApp/Swiftcord/Build%20Nightly?style=for-the-badge)](https://nightly.link/SwiftcordApp/Swiftcord/workflows/main/main/Swiftcord_Canary.zip)
6464

6565
For the latest features and fixes, [a pre-built version of the latest commit is available here](https://nightly.link/SwiftcordApp/Swiftcord/workflows/main/main/Swiftcord_Canary.zip)
6666

0 commit comments

Comments
 (0)
Please sign in to comment.