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

Support GitHub action workflow #12

Merged
merged 68 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
90756ba
Improve documentation (#1067)
defagos Nov 20, 2024
c7be7ad
Add method to respond to state changes at the user interface level (#…
defagos Nov 24, 2024
e7a9d86
Add article about resource optimization (#1072)
defagos Nov 24, 2024
7015231
Add hover support (#1073)
defagos Nov 25, 2024
d4c1701
Fix layout glitches during rotation (#1074)
defagos Nov 28, 2024
db443a8
Use pkgx for check-quality target
waliid Nov 19, 2024
a9e4488
Add check-quality job
waliid Nov 19, 2024
c493d1e
Use pkgx for fastlane target
waliid Nov 19, 2024
18bade0
Remove Gemfiles
waliid Nov 19, 2024
048fd5f
Use pkgx for server streams
waliid Nov 19, 2024
a6aaf12
Use pkgx for tests
waliid Nov 19, 2024
a5420c3
Add job for tests
waliid Nov 19, 2024
554b8b6
Update xcode version
waliid Nov 19, 2024
1cfa608
Uncomment rubocop quality check
waliid Nov 19, 2024
2c7ee14
Update documentation building
waliid Nov 20, 2024
f37085c
Comment tests
waliid Nov 20, 2024
b84ddec
Use pkgx for clean-imports target
waliid Nov 20, 2024
6f15445
Update pre-commit hook
waliid Nov 20, 2024
19a5de8
Add script to bypass microphone simulator popup
waliid Nov 20, 2024
b4a5299
Update workflow to bypass microphone access popup
waliid Nov 20, 2024
5c196cb
Fix bypass-simulator-trampoline.sh
waliid Nov 20, 2024
c46180d
Use pkgx for periphery
waliid Nov 21, 2024
16968ed
Add archive-demos job to the workflow
waliid Nov 21, 2024
2c77232
Use pkgx for demos archiving
waliid Nov 21, 2024
ac64ae6
Provide a way to decode an encoded Apple certificate
waliid Nov 21, 2024
01b9725
Add a script to configure private stuff
waliid Nov 21, 2024
4d5fb52
Add a step for the project configuration
waliid Nov 21, 2024
c70d22a
Update iPhone used for fastlane
waliid Nov 22, 2024
f3ae4d3
Try to clean gems
waliid Nov 23, 2024
33b6e6b
Remove gem cleanup
waliid Nov 24, 2024
2ff0d56
Put back other jobs
waliid Nov 24, 2024
93451bc
Reintroduce Gemfile for fastlane plugins
waliid Nov 25, 2024
39acf68
Prefer using bundle for fastlane
waliid Nov 25, 2024
d94c7e2
Remove tests
waliid Nov 25, 2024
3b7f9e3
Use pkgx bundle exec for fastlane
waliid Nov 26, 2024
4fc8f91
Remove xcodes
waliid Nov 26, 2024
f545418
Run on GitHub runner
waliid Nov 26, 2024
21d0747
Fix archiving with GitHub runners
waliid Nov 26, 2024
d7a4bbd
Put back tests
waliid Nov 26, 2024
5978f29
Display user keychain
waliid Nov 26, 2024
4fad450
Remove log
waliid Nov 26, 2024
d9ea141
Remove simulator trampoline step
waliid Nov 26, 2024
905a31e
Remove useless scripts
waliid Nov 26, 2024
fd6986e
Add workflow for nightlies
waliid Nov 26, 2024
e4803ee
Try using GitHub cache
waliid Nov 26, 2024
cdc1742
Use a default value
waliid Nov 26, 2024
bf3afd6
Update cache paths
waliid Nov 27, 2024
bbf214c
Inline steps
waliid Nov 27, 2024
a4e827a
Use Commanders Act binaries delivered by SRG SSR mirror
defagos Nov 27, 2024
6ef310e
Use recursive wild card for tests cache
waliid Nov 27, 2024
17615d1
Use another path for cache
waliid Nov 27, 2024
e6f9386
Fix quality
waliid Nov 27, 2024
2ac51ff
Remove cache management
waliid Nov 27, 2024
5235e3d
Try irgaly/xcode-cache@v1
waliid Nov 27, 2024
c9f3a8b
Remove cleanup
defagos Nov 27, 2024
0b5cae0
Revert "Remove cleanup"
waliid Nov 27, 2024
2d306c5
Remove irgaly/xcode-cache@v1
waliid Nov 27, 2024
7dbb2cc
Split configurations
waliid Nov 27, 2024
9947447
Revert "Remove tests"
waliid Nov 27, 2024
fc3d347
Try ubuntu-latest for some jobs
waliid Nov 27, 2024
8866086
Revert "Split configurations"
waliid Nov 27, 2024
c3994ff
Revert "Try ubuntu-latest for some jobs"
waliid Nov 27, 2024
c7003a7
Use secrets for ENV variables
waliid Nov 27, 2024
cf7d910
Use secrets for ENV variables
waliid Nov 27, 2024
1c3484c
Fix quality
waliid Nov 27, 2024
1f73086
Remove useless .env file
waliid Nov 27, 2024
df0068b
Remove Gemfile.lock
waliid Nov 28, 2024
e58a0dc
Update Gemfile.lock
waliid Nov 28, 2024
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
1 change: 0 additions & 1 deletion .env

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/nightlies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Nightlies

on: # yamllint disable-line rule:truthy
push:
branches: [main]

jobs:
deliver-demo-nightlies:
name: "🌙 Nightlies"
runs-on: macos-latest
strategy:
matrix:
platform: [ios, tvos]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Add Apple certificate
run: |
Scripts/add-apple-certificate.sh \
$RUNNER_TEMP \
${{ secrets.KEYCHAIN_PASSWORD }} \
${{ secrets.SRGSSR_APPLE_DEV_CERTIFICATE_B64 }}

- name: Configure environment
run: |
Scripts/configure-environment.sh \
${{ secrets.APP_STORE_CONNECT_API_KEY }}

- name: Archive the demo
run: |
make deliver-demo-nightly-${{ matrix.platform }}
env:
TEAM_ID: ${{ secrets.TEAM_ID }}
KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ISSUER_ID }}
TESTFLIGHT_GROUPS: ${{ vars.TESTFLIGHT_GROUPS }}
69 changes: 69 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
name: Pull Request

on: pull_request # yamllint disable-line rule:truthy

jobs:
check-quality:
name: "🔎 Check quality"
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run the quality check
run: make check-quality

build-documentation:
name: "📚 Build documentation"
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build the documentation
run: make doc

tests:
name: "🧪 Tests"
runs-on: macos-latest
strategy:
matrix:
platform: [ios, tvos]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run tests
run: make test-${{ matrix.platform }}

archive-demos:
name: "📦 Archives"
runs-on: macos-latest
strategy:
matrix:
platform: [ios, tvos]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Add Apple certificate
run: |
Scripts/add-apple-certificate.sh \
$RUNNER_TEMP \
${{ secrets.KEYCHAIN_PASSWORD }} \
${{ secrets.APPLE_DEV_CERTIFICATE }} \
${{ secrets.APPLE_DEV_CERTIFICATE_PASSWORD }}

- name: Configure environment
run: |
Scripts/configure-environment.sh \
${{ secrets.APP_STORE_CONNECT_API_KEY }}

- name: Archive the demo
run: make archive-demo-${{ matrix.platform }}
env:
TEAM_ID: ${{ secrets.TEAM_ID }}
KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ISSUER_ID }}
TESTFLIGHT_GROUPS: ${{ vars.TESTFLIGHT_GROUPS }}
21 changes: 18 additions & 3 deletions Demo/Sources/Players/PlaybackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ private struct MainView: View {
MetricsView(metricsCollector: metricsCollector)
}
.statusBarHidden(isFullScreen ? isUserInterfaceHidden : false)
.onContinuousHover { phase in
switch phase {
case .active:
visibilityTracker.reset()
case .ended:
break
}
}
.bind(visibilityTracker, to: player)
.bind(metricsCollector, to: player)
}
Expand Down Expand Up @@ -352,6 +360,7 @@ private struct SkipBackwardButton: View {
.opacity(player.canSkipBackward() ? 1 : 0)
.animation(.defaultLinear, value: player.canSkipBackward())
.keyboardShortcut("s", modifiers: [])
.hoverEffect()
}

private func skipBackward() {
Expand All @@ -375,6 +384,7 @@ private struct SkipForwardButton: View {
.opacity(player.canSkipForward() ? 1 : 0)
.animation(.defaultLinear, value: player.canSkipForward())
.keyboardShortcut("d", modifiers: [])
.hoverEffect()
}

private func skipForward() {
Expand All @@ -394,6 +404,7 @@ private struct FullScreenButton: View {
.font(.system(size: 20))
}
.keyboardShortcut("f", modifiers: [])
.hoverEffect()
}
}

Expand Down Expand Up @@ -431,6 +442,7 @@ private struct VolumeButton: View {
.font(.system(size: 20))
}
.keyboardShortcut("m", modifiers: [])
.hoverEffect()
}

private var imageName: String {
Expand All @@ -457,6 +469,7 @@ private struct SettingsMenu: View {
.tint(.white)
}
.menuOrder(.fixed)
.hoverEffect()
}

@ViewBuilder
Expand Down Expand Up @@ -560,6 +573,7 @@ private struct LiveButton: View {
.fontWeight(.ultraLight)
.font(.system(size: 20))
}
.hoverEffect()
.accessibilityLabel("Jump to live")
}
}
Expand Down Expand Up @@ -829,12 +843,13 @@ private struct PlaybackButton: View {
.resizable()
.tint(.white)
}
#if os(iOS)
.keyboardShortcut(.space, modifiers: [])
#endif
.aspectRatio(contentMode: .fit)
.frame(minWidth: 120, maxHeight: 90)
.accessibilityLabel(accessibilityLabel)
#if os(iOS)
.keyboardShortcut(.space, modifiers: [])
.hoverEffect()
#endif
}

private func play() {
Expand Down
6 changes: 6 additions & 0 deletions Demo/Sources/Showcase/Playlist/PlaylistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ private struct Toolbar: View {
Button(action: player.returnToPrevious) {
Image(systemName: "arrow.left")
}
.hoverEffect()
.accessibilityLabel("Previous")
.disabled(!player.canReturnToPrevious())
}
Expand All @@ -86,22 +87,26 @@ private struct Toolbar: View {
Button(action: toggleRepeatMode) {
Image(systemName: repeatModeImageName)
}
.hoverEffect()
.accessibilityLabel(repeatModeAccessibilityLabel)

Button(action: model.shuffle) {
Image(systemName: "shuffle")
}
.hoverEffect()
.accessibilityLabel("Shuffle")
.disabled(model.isEmpty)

Button(action: add) {
Image(systemName: "plus")
}
.hoverEffect()
.accessibilityLabel("Add")

Button(action: model.trash) {
Image(systemName: "trash")
}
.hoverEffect()
.accessibilityLabel("Delete all")
.disabled(model.isEmpty)
}
Expand All @@ -112,6 +117,7 @@ private struct Toolbar: View {
Button(action: player.advanceToNext) {
Image(systemName: "arrow.right")
}
.hoverEffect()
.accessibilityLabel("Next")
.disabled(!player.canAdvanceToNext())
}
Expand Down
1 change: 1 addition & 0 deletions Demo/Sources/Views/CloseButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct CloseButton: View {
#if os(iOS)
.keyboardShortcut(.escape, modifiers: [])
#endif
.hoverEffect()
}

init(topBarStyle: Bool = false) {
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
source 'https://rubygems.org'

gem 'fastlane'
gem 'rubocop'
gem 'xcode-install'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
44 changes: 9 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ GEM
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
artifactory (3.0.17)
ast (2.4.2)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.998.0)
aws-sdk-core (3.211.0)
aws-partitions (1.1014.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.95.0)
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.169.0)
aws-sdk-s3 (1.174.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -162,49 +161,28 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.5)
json (2.8.2)
jwt (2.9.3)
base64
language_server-protocol (3.17.0.3)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
nanaimo (0.4.0)
naturally (2.2.1)
nkf (0.2.0)
optparse (0.5.0)
optparse (0.6.0)
os (1.1.4)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
plist (3.7.1)
public_suffix (6.0.1)
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.9)
rouge (2.0.7)
rubocop (1.67.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.33.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.5)
Expand All @@ -228,10 +206,7 @@ GEM
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcode-install (2.8.1)
claide (>= 0.9.1)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.26.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -248,15 +223,14 @@ PLATFORMS
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
ruby
x86_64-darwin-21
x86_64-darwin-22

DEPENDENCIES
fastlane
fastlane-plugin-badge
fastlane-plugin-xcconfig
rubocop
xcode-install

BUNDLED WITH
2.3.7
2.5.23
Loading
Loading