-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
130 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,137 +1,12 @@ | ||
--- | ||
name: Continuous Integration | ||
on: [pull_request] | ||
env: | ||
token: ${{ secrets.PILLARBOX_CI_CD_TOKEN }} | ||
vm_name: sequoia-for-pillarbox | ||
vm_image: ghcr.io/cirruslabs/macos-sequoia-xcode:latest | ||
branch_name: ${{ github.head_ref }} | ||
scripts_path: "/tmp/.$vm_name/macos-ci-setup" | ||
ci_scripts_path: "${{ github.workspace }}/.github/workflows/scripts" | ||
repo_url: | ||
"https://${{ secrets.PILLARBOX_CI_CD_TOKEN }}@github.com/\ | ||
${{ github.repository }}.git" | ||
on: [push] | ||
jobs: | ||
install-tools: | ||
name: "πͺ Tools installation" | ||
runs-on: | ||
labels: [tart, macos] | ||
outputs: | ||
runner_group_label: | ||
${{ steps.runner-group-label.outputs.runner_group_label }} | ||
labels: [tart, wk] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Clone macos-ci-setup repository | ||
run: | | ||
${{ env.ci_scripts_path }}/clone-macos-ci-setup.sh \ | ||
${{ env.scripts_path }} ${{ env.token }} "add-scripts" | ||
- name: Get runner group by runner name | ||
id: runner-group-label | ||
run: | | ||
${{ env.ci_scripts_path }}/get-runner-group.sh \ | ||
${{ env.scripts_path }} \ | ||
$RUNNER_NAME $GITHUB_OUTPUT | ||
- name: Install tools | ||
run: | | ||
${{ env.ci_scripts_path }}/install-tools.sh \ | ||
${{ env.scripts_path }} \ | ||
${{ env.vm_name }} ${{ env.vm_image }} \ | ||
${{ env.branch_name }} ${{ env.repo_url }} | ||
run-streams: | ||
needs: install-tools | ||
name: "π₯ Run server streams" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run test streams | ||
run: | | ||
${{ env.ci_scripts_path }}/vm-run-test-streams.sh \ | ||
${{ env.scripts_path }} ${{ env.vm_name }} | ||
setup-project: | ||
needs: install-tools | ||
name: "π Setup project" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup project | ||
run: | | ||
${{ env.ci_scripts_path }}/setup-project.sh \ | ||
${{ env.scripts_path }} ${{ env.vm_name }} ${{ env.token }} | ||
check-quality: | ||
needs: [install-tools, setup-project] | ||
name: "π Check quality" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run the quality check | ||
run: | | ||
${{ env.ci_scripts_path }}/vm-check-quality.sh \ | ||
${{ env.scripts_path }} ${{ env.vm_name }} | ||
resolve-spm-dependencies: | ||
needs: [install-tools, run-streams, setup-project] | ||
name: "π Resolving SPM dependencies" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Resolve SPM dependencies | ||
run: | | ||
${{ env.ci_scripts_path }}/vm-resolve-spm-dependencies.sh \ | ||
${{ env.scripts_path }} ${{ env.vm_name }} | ||
tests: | ||
needs: [install-tools, resolve-spm-dependencies] | ||
name: "π§ͺ Tests" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
strategy: | ||
matrix: | ||
platform: [ios, tvos] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run tests | ||
run: | | ||
${{ env.ci_scripts_path }}/vm-test.sh \ | ||
${{ env.scripts_path }} ${{ env.vm_name }} ${{ matrix.platform }} | ||
archive-demos: | ||
needs: [install-tools, tests] | ||
name: "π¦ Archives" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
strategy: | ||
matrix: | ||
platform: [ios, tvos] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Archive the demo | ||
run: | | ||
${{ env.ci_scripts_path }}/vm-archive.sh \ | ||
${{ env.scripts_path }} ${{ env.vm_name }} ${{ matrix.platform }} | ||
stop: | ||
needs: [install-tools, archive-demos] | ||
name: "π Stop the VM" | ||
runs-on: ${{ needs.install-tools.outputs.runner_group_label }} | ||
if: always() | ||
steps: | ||
- name: Stop the VM | ||
run: | | ||
tart stop ${{ env.vm_name }} | ||
- uses: pkgxdev/setup@v1 | ||
with: | ||
+: ffmpeg |