Skip to content

Use new iPhone simulator #37

Use new iPhone simulator

Use new iPhone simulator #37

Workflow file for this run

---
name: CI
on: [push]
env:
MACOS_CI_SETUP_TOKEN: ${{ secrets.MACOS_CI_SETUP_TOKEN }}
VM_NAME: sequoia-for-pillarbox
VM_IMAGE: ghcr.io/cirruslabs/macos-sequoia-xcode:latest
jobs:
install-tools:
runs-on:
labels: [tart, macos]
steps:
- name: Clone macos-ci-setup repository
run: |
rm -rf ~/macos-ci-setup
git clone -b add-scripts https://[email protected]/SRGSSR/macos-ci-setup.git ~/macos-ci-setup
- name: Install tools
run: |
cd ~/macos-ci-setup
./create-vm-for-project.sh $VM_NAME $VM_IMAGE
./clone-repo-in-vm.sh "https://[email protected]/SRGSSR/fake-and-temporary-pa-for-runners.git" $VM_NAME
./brew-fetch-and-sync.sh $VM_NAME "mint shellcheck markdownlint-cli yamllint ffmpeg"
./run-vm-shell-command.sh $VM_NAME "brew install mint shellcheck markdownlint-cli yamllint ffmpeg"
./run-vm-shell-command.sh $VM_NAME "rbenv install --skip-existing 3.3.5"
./run-vm-shell-command.sh $VM_NAME "echo 'export PATH=\"$HOME/.rbenv/bin:$PATH\"' >> ~/.zshrc"
./run-vm-shell-command.sh $VM_NAME "rbenv init - >> ~/.zshrc"
./run-vm-shell-command.sh $VM_NAME "rbenv global 3.3.5"
./run-vm-shell-command.sh $VM_NAME "sudo gem install bundler -v 2.5.22"
./run-vm-shell-command.sh $VM_NAME "curl --location https://github.com/shaka-project/shaka-packager/releases/download/v3.2.0/packager-osx-arm64 -o /opt/homebrew/bin/shaka-packager"
./run-vm-shell-command.sh $VM_NAME "chmod a+x /opt/homebrew/bin/shaka-packager"
./run-vm-shell-command.sh $VM_NAME "source ~/.zshrc"
setup-project:
needs: install-tools
runs-on:
labels: [tart, macos]
steps:
- name: Setup project
run: |
cd ~/macos-ci-setup
./run-vm-shell-command.sh $VM_NAME "cd ~/_repo && rm -rf Configuration"
./run-vm-shell-command.sh $VM_NAME "cd ~/_repo && Scripts/checkout-configuration.sh https://[email protected]/SRGSSR/pillarbox-apple-configuration.git certificate HEAD Configuration"
./run-vm-shell-command.sh $VM_NAME "security unlock-keychain -p 'admin' ~/Library/Keychains/login.keychain-db && security import ~/_repo/Configuration/6YXTQTG8JJ_development.p12 -k ~/Library/Keychains/login.keychain-db -P '6YXTQTG8JJ' -T /usr/bin/security -T /usr/bin/codesign"
./run-vm-shell-command.sh $VM_NAME "security set-key-partition-list -S apple-tool:,apple: -s -k 'admin' ~/Library/Keychains/login.keychain-db"
./run-vm-shell-command.sh $VM_NAME "cd ~/_repo && make setup"
# check-quality:
# needs: setup-project
# runs-on:
# labels: [tart, macos]
# steps:
# - name: Run the quality check
# run: |
# ~/macos-ci-setup/run-vm-shell-command.sh $VM_NAME "cd ~/_repo && make check-quality"
run-streams:
needs: install-tools
runs-on:
labels: [tart, macos]
steps:
- name: Run test streams
run: |
~/macos-ci-setup/run-vm-shell-command.sh $VM_NAME "cd ~/_repo && make test-streams-start"
test-ios:
needs: [run-streams, setup-project]
runs-on:
labels: [tart, macos]
steps:
- name: Run the iOS tests
run: |
~/macos-ci-setup/run-vm-shell-command.sh $VM_NAME "cd ~/_repo && make test-ios"
test-tvos:
needs: [run-streams, setup-project]
runs-on:
labels: [tart, macos]
steps:
- name: Run the tvOS tests
run: |
~/macos-ci-setup/run-vm-shell-command.sh $VM_NAME "cd ~/_repo && make test-tvos"
archive-demo-ios:
needs: [test-ios, test-tvos]
runs-on:
labels: [tart, macos]
steps:
- name: Archive the iOS demo
run: |
~/macos-ci-setup/run-vm-shell-command.sh $VM_NAME "cd ~/_repo && security unlock-keychain -p 'admin' ~/Library/Keychains/login.keychain-db && make archive-demo-ios"
archive-demo-tvos:
needs: [test-ios, test-tvos]
runs-on:
labels: [tart, macos]
steps:
- name: Archive the tvOS demo
run: |
~/macos-ci-setup/run-vm-shell-command.sh $VM_NAME "cd ~/_repo && security unlock-keychain -p 'admin' ~/Library/Keychains/login.keychain-db && make archive-demo-tvos"
clean:
runs-on:
labels: [tart, macos]
needs: [archive-demo-ios, archive-demo-tvos]
if: always()
steps:
- name: Stop and remove the VM
run: |
set +e
tart stop $VM_NAME
tart delete $VM_NAME