-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy path.cirrus.yml
More file actions
103 lines (88 loc) · 5.25 KB
/
.cirrus.yml
File metadata and controls
103 lines (88 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Run command: `cirrus run buildReceiverMac --artifacts-dir receivers/electron/out`
build_electron_receiver_task:
name: buildReceiverMac
macos_instance:
image: ghcr.io/cirruslabs/macos-sequoia-xcode:26.2
buildReceiverMac_script:
# Local
# - source .secure_files/.env
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- sudo security add-certificates -k /Library/Keychains/System.keychain ./.secure_files/developerID_application.cer
- security unlock-keychain -p "admin" ~/Library/Keychains/login.keychain
- security import ./.secure_files/Certificates.p12 -k ~/Library/Keychains/login.keychain -P "$FCAST_CERTIFICATES_PASSWORD" -T /usr/bin/codesign
# Keychain ignores access control, causing to prompt for access and failing in CI environments...: https://stackoverflow.com/a/40039594
- "security set-key-partition-list -S apple-tool:,apple: -s -k admin ~/Library/Keychains/login.keychain"
- mkdir -p ~/.ssh/
- cp ./.secure_files/id_ed25519 ~/.ssh/id_ed25519
- cp ./.secure_files/id_ed25519.pub ~/.ssh/id_ed25519.pub
- chmod 700 ~/.ssh/
- chmod 600 ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519.pub
- cd receivers/electron
- npm install
- npm rebuild
- npm run build
- npm run make -- --platform="darwin" --arch="arm64"
- npm run make -- --platform="darwin" --arch="x64"
- scp -o StrictHostKeyChecking=no -r out/make/* root@$FCAST_DO_RUNNER_IP:/artifacts/
- tar -czf artifacts.tar out/make/
binary_artifacts:
path: receivers/electron/artifacts.tar
desktop_sender_task:
name: buildSenderMacosArm64
macos_instance:
image: ghcr.io/cirruslabs/macos-sequoia-xcode:26.2
buildReceiverMac_script:
- brew install rustup-init protobuf wget
- rustup-init -y
- rustup target add aarch64-apple-darwin
- source $HOME/.cargo/env
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
# Download and install gstreamer
- wget -q "https://gstreamer.freedesktop.org/data/pkg/osx/1.26.8/gstreamer-1.0-1.26.8-universal.pkg" -O /tmp/gst-1.0-1.26.8-universal.pkg
- wget -q "https://gstreamer.freedesktop.org/data/pkg/osx/1.26.8/gstreamer-1.0-devel-1.26.8-universal.pkg" -O /tmp/gst-1.0-devel-1.26.8-universal.pkg
- sudo installer -pkg /tmp/gst-1.0-1.26.8-universal.pkg -target /
- sudo installer -pkg /tmp/gst-1.0-devel-1.26.8-universal.pkg -target /
- export PKG_CONFIG_PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig
- export PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/bin:$PATH
- export DYLD_LIBRARY_PATH=/Library/Frameworks/GStreamer.framework/Libraries:$DYLD_LIBRARY_PATH
- cargo install apple-codesign
- cargo xtask sender build-macos-installer --sign --p12-file=./.secure_files/Certificates.p12 --p12-password-file=./.secure_files/p12_certs_password --api-key-file=./.secure_files/notary_key.json
binary_artifacts:
path: target/fcast-sender-*.*
sender_sdk_csharp_task:
name: crossCompileForDarwinCSharp
macos_instance:
image: ghcr.io/cirruslabs/macos-sequoia-xcode:26.2
buildSenderSdkDarwin_script:
- brew install rustup-init protobuf
- rustup-init -y
- rustup target add aarch64-apple-darwin x86_64-apple-darwin
- source $HOME/.cargo/env
- cargo build --release --target aarch64-apple-darwin -p fcast-sender-sdk --no-default-features --features fcast,chromecast,uniffi,logging,discovery,_uniffi_csharp
- cargo build --release --target x86_64-apple-darwin -p fcast-sender-sdk --no-default-features --features fcast,chromecast,uniffi,logging,discovery,_uniffi_csharp
binary_artifacts:
path: target/*-apple-darwin/release/libfcast_sender_sdk.dylib
desktop_receiver_task:
name: buildReceiverMacosArm64
macos_instance:
image: ghcr.io/cirruslabs/macos-sequoia-xcode:26.2
buildReceiverMac_script:
- brew install rustup-init wget
- rustup-init -y
- rustup target add aarch64-apple-darwin
- rustup default nightly
- source $HOME/.cargo/env
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
# Download and install gstreamer
- wget -q "https://gstreamer.freedesktop.org/data/pkg/osx/1.28.1/gstreamer-1.0-1.28.1-universal.pkg" -O /tmp/gst-1.0-1.28.1-universal.pkg
- wget -q "https://gstreamer.freedesktop.org/data/pkg/osx/1.28.1/gstreamer-1.0-devel-1.28.1-universal.pkg" -O /tmp/gst-1.0-devel-1.28.1-universal.pkg
- sudo installer -pkg /tmp/gst-1.0-1.28.1-universal.pkg -target /
- sudo installer -pkg /tmp/gst-1.0-devel-1.28.1-universal.pkg -target /
- export PKG_CONFIG_PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig
- export PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/bin:$PATH
- export DYLD_LIBRARY_PATH=/Library/Frameworks/GStreamer.framework/Libraries:$DYLD_LIBRARY_PATH
- cargo install apple-codesign
- cargo xtask receiver build-macos-installer --sign --p12-file=./.secure_files/Certificates.p12 --p12-password-file=./.secure_files/p12_certs_password --api-key-file=./.secure_files/notary_key.json
binary_artifacts:
path: target/fcast-receiver-*.*