Add early failure in test-streams script #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: [push] | |
jobs: | |
install-tools: | |
runs-on: | |
labels: [tart, macos] | |
steps: | |
- name: Clone macos-ci-setup repository | |
env: | |
MACOS_CI_SETUP_TOKEN: ${{ secrets.MACOS_CI_SETUP_TOKEN }} | |
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 | |
env: | |
MACOS_CI_SETUP_TOKEN: ${{ secrets.MACOS_CI_SETUP_TOKEN }} | |
run: | | |
cd ~/macos-ci-setup | |
./create-vm-for-project-non-interactive.sh sonoma-fake-pillarbox ghcr.io/cirruslabs/macos-sonoma-xcode:latest | |
./clone-repo-in-vm.sh "https://[email protected]/SRGSSR/fake-and-temporary-pa-for-runners.git" sonoma-fake-pillarbox | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "brew install mint shellcheck markdownlint-cli yamllint ffmpeg" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "rbenv install --skip-existing 3.3.2" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "echo \"export PATH=\"$HOME/.rbenv/bin:$PATH\"\" > ~/.zshrc" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "rbenv global 3.3.2" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "gem install bundler -v 2.4.6" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "curl 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 sonoma-fake-pillarbox "chmod a+x /opt/homebrew/bin/shaka-packager" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "source ~/.zshrc" | |
setup-project: | |
needs: install-tools | |
runs-on: | |
labels: [tart, macos] | |
steps: | |
- name: Setup project | |
env: | |
MACOS_CI_SETUP_TOKEN: ${{ secrets.MACOS_CI_SETUP_TOKEN }} | |
run: | | |
cd ~/macos-ci-setup | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "cd ~/_repo && rm -rf Configuration" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "cd ~/_repo && Scripts/checkout-configuration.sh https://[email protected]/SRGSSR/pillarbox-apple-configuration.git dad52a4242c7997c179073caec03b8d6e718fc03 Configuration" | |
./run-vm-shell-command.sh sonoma-fake-pillarbox "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 sonoma-fake-pillarbox "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 sonoma-fake-pillarbox "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 sonoma-fake-pillarbox "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 sonoma-fake-pillarbox "cd ~/_repo && make test-tvos" | |
clean: | |
runs-on: | |
labels: [tart, macos] | |
needs: [install-tools, setup-project, run-streams, test-ios, test-tvos] # [install-tools, setup-project, check-quality, run-streams, test-ios, test-tvos] | |
if: always() | |
steps: | |
- name: Stop and remove the VM | |
run: | | |
set +e | |
tart stop sonoma-fake-pillarbox | |
tart delete sonoma-fake-pillarbox |