Skip to content

Commit

Permalink
Support GitHub action workflow (#12)
Browse files Browse the repository at this point in the history
* Improve documentation (#1067)

* Add method to respond to state changes at the user interface level (#1070)

* Add article about resource optimization (#1072)

* Add hover support (#1073)

* Fix layout glitches during rotation (#1074)

* Use pkgx for check-quality target

* Add check-quality job

* Use pkgx for fastlane target

* Remove Gemfiles

* Use pkgx for server streams

* Use pkgx for tests

* Add job for tests

* Update xcode version

* Uncomment rubocop quality check

* Update documentation building

* Comment tests

* Use pkgx for clean-imports target

* Update pre-commit hook

* Add script to bypass microphone simulator popup

* Update workflow to bypass microphone access popup

* Fix bypass-simulator-trampoline.sh

* Use pkgx for periphery

* Add archive-demos job to the workflow

* Use pkgx for demos archiving

* Provide a way to decode an encoded Apple certificate

* Add a script to configure private stuff

* Add a step for the project configuration

* Update iPhone used for fastlane

* Try to clean gems

* Remove gem cleanup

* Put back other jobs

* Reintroduce Gemfile for fastlane plugins

* Prefer using bundle for fastlane

* Remove tests

* Use pkgx bundle exec for fastlane

* Remove xcodes

* Run on GitHub runner

* Fix archiving with GitHub runners

* Put back tests

* Display user keychain

* Remove log

* Remove simulator trampoline step

* Remove useless scripts

* Add workflow for nightlies

* Try using GitHub cache

* Use a default value

* Update cache paths

* Inline steps

* Use Commanders Act binaries delivered by SRG SSR mirror

* Use recursive wild card for tests cache

* Use another path for cache

* Fix quality

* Remove cache management

* Try irgaly/xcode-cache@v1

* Remove cleanup

* Revert "Remove cleanup"

This reverts commit 81ac46e.

* Remove irgaly/xcode-cache@v1

* Split configurations

* Revert "Remove tests"

This reverts commit 8855d1b.

* Try ubuntu-latest for some jobs

* Revert "Split configurations"

This reverts commit 296e4d5.

* Revert "Try ubuntu-latest for some jobs"

This reverts commit cee1d62.

* Use secrets for ENV variables

* Use secrets for ENV variables

* Fix quality

* Remove useless .env file

* Remove Gemfile.lock

* Update Gemfile.lock

---------

Co-authored-by: Samuel Défago <[email protected]>
  • Loading branch information
waliid and defagos authored Nov 28, 2024
1 parent 925325b commit 742432c
Show file tree
Hide file tree
Showing 30 changed files with 384 additions and 180 deletions.
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

0 comments on commit 742432c

Please sign in to comment.